Skip to content

Conversation

@nddq
Copy link
Member

@nddq nddq commented Nov 4, 2025

This patch updates the bpf header files from upstream libbpf, as well as introduce Make commands to help updating these files in the future. Also update the Dockerfiles for building the agent and generating Go codes.

Description

Please provide a brief description of the changes made in this pull request.

Related Issue

If this pull request is related to any issue, please mention it here. Additionally, make sure that the issue is assigned to you before submitting this pull request.

Checklist

  • I have read the contributing documentation.
  • I signed and signed-off the commits (git commit -S -s ...). See this documentation on signing commits.
  • I have correctly attributed the author(s) of the code.
  • I have tested the changes locally.
  • I have followed the project's style guidelines.
  • I have updated the documentation, if necessary.
  • I have added tests, if applicable.

Screenshots (if applicable) or Testing Completed

Please add any relevant screenshots or GIFs to showcase the changes made.

Additional Notes

Add any additional notes or context about the pull request here.


Please refer to the CONTRIBUTING.md file for more information on how to contribute to this project.

@nddq nddq requested a review from a team as a code owner November 4, 2025 21:20
@nddq nddq requested review from nairashu and vipul-21 November 4, 2025 21:20
@nddq nddq force-pushed the nddq/bpfHeaders branch 2 times, most recently from ecc0cac to 604acb8 Compare November 5, 2025 19:24
Copy link
Member

@timraymond timraymond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to assume that the Makefile and the Dockerfiles should be the prime focus of reviews here... and the others are just generated from those. Is that right, or is there anything else that should have eyes on it?

ARG VERSION
ENV GOARCH=${GOARCH}
ENV GOOS=${GOOS}
ENV CGO_ENABLED=0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would using //go:build ignore in placeholder.go remove the need to set CGO_ENABLED=0?

Copy link
Member Author

@nddq nddq Dec 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wouldn't work since we still need to do blank imports on those placeholder packages so that everything is vendored when you do go mod vendor

}

#ifdef ADVANCED_METRICS
#if ADVANCED_METRICS == 1
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need this line? If ADVANCED_METRICS is defined to be anything, you could consider it truthy. Just thinking of the traditional inclusion guard of:

#ifndef SOMETHING_H
#define SOMETHING_H
// ...
#endif

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could, but im keeping it uniform with the other ADVANCED_METRICS check in the same file, we can do this refactor in a different PR

@invidian
Copy link

invidian commented Dec 1, 2025

Any updates on this PR?

This patch updates the bpf header files, as well as introduce Make
commands to help updating these files in the future. Also update the
Dockerfile for building the agent and generating Go codes.

Signed-off-by: Quang Nguyen <[email protected]>
@nddq nddq requested a review from timraymond December 2, 2025 22:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants