-
Notifications
You must be signed in to change notification settings - Fork 264
chore(ebpf): update bpf header files #1928
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
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]>
timraymond
left a comment
There was a problem hiding this 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 |
There was a problem hiding this comment.
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?
| RUN apt-get install -y bpftool libbpf-dev | ||
|
|
||
| RUN ln -s /usr/bin/clang-14 /usr/bin/clang | ||
| RUN tdnf install -y clang lld bpftool libbpf-devel gnupg file git make lsb-release wget |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for consolidating this step to a single layer 💯
| } | ||
|
|
||
| #ifdef ADVANCED_METRICS | ||
| #if ADVANCED_METRICS == 1 |
There was a problem hiding this comment.
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
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
git commit -S -s ...). See this documentation on signing commits.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.