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
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]>
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?

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
Copy link
Member

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
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

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.

3 participants