Skip to content
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

Improving eBPF generator Docker image #1428

Merged
merged 3 commits into from
Dec 4, 2024
Merged

Conversation

mariomac
Copy link
Contributor

@mariomac mariomac commented Dec 3, 2024

With this image, we don't need anymore to ship all the "bpf_helpers.h" etc... include files in our bpf source code, as it already ships the official BPF library.

I tested it in another project with the following headers:

#include <linux/bpf.h>
#include <linux/if_ether.h>
#include <linux/in.h>
#include <linux/ip.h>
#include <linux/tcp.h>
#include <linux/udp.h>

#include <bpf/bpf_endian.h>
#include <bpf/bpf_helpers.h>

The code compiled perfectly without requiring to bundle any library in the bpf/headers folder.

However in Beyla it wouldn't be so direct, as we still need to ship our own copy of "vmlinux.h", because the /usr/include/aarch64-linux-gnu/linux/vmlinux.h copy inside the container seems to be incomplete.

Copy link

codecov bot commented Dec 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.97%. Comparing base (f517939) to head (1fefac3).
Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1428      +/-   ##
==========================================
- Coverage   81.02%   80.97%   -0.06%     
==========================================
  Files         147      147              
  Lines       15033    15033              
==========================================
- Hits        12181    12173       -8     
- Misses       2260     2267       +7     
- Partials      592      593       +1     
Flag Coverage Δ
integration-test 59.18% <ø> (-0.03%) ⬇️
k8s-integration-test 59.53% <ø> (+0.01%) ⬆️
oats-test 33.70% <ø> (-0.05%) ⬇️
unittests 51.60% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@grcevski grcevski left a comment

Choose a reason for hiding this comment

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

LGTM!

@mariomac mariomac merged commit 9e52409 into grafana:main Dec 4, 2024
13 checks passed
@mariomac mariomac deleted the ebpf-generator branch December 4, 2024 09:08
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.

2 participants