Improve BPF header layout and Lima/vmlinux tooling - #8
Open
allir wants to merge 2 commits into
Open
Conversation
- Vendor libbpf headers into bpf/libbpf/bpf/ and switch the BPF sources to
#include <bpf/...>; drop the sed include-rewrite from the vendoring script.
- Bump the vendoring script's default libbpf version to 1.7.0.
- Re-dump vmlinux only when the running kernel differs from the recorded
version; fix the OS guard (compared 'Darwin' against a lowercased OS).
- Name lima VMs per arch (ebpf-demo-{amd64,arm64}); add per-arch
lima-vmlinuxh-{amd64,arm64} and a parallel lima-vmlinuxh-all.
- Move the lima config under tools/lima/ and add bpf/.clangd.
- Drop the undefined 'prereq' dependency from the all target.
Mark generated vmlinux headers as linguist-generated and vendored libbpf headers as linguist-vendored to keep language stats honest.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
bpf/libbpf/bpf/so BPF sources use standard<bpf/...>includes, matching upstream layoutvmlinux.hwhen the running kernel differs from the recorded version; on macOS, verify the committed dump exists instead of erroringlima-vmlinuxh-{amd64,arm64,all}targets so each arch's dump comes from a matching guest (emulated when non-native)bpf/.clangdso clangd resolves the BPF sources with the same flags bpf2go uses.gitattributes(mark vmlinux dumps as generated, libbpf as vendored) and ignore the straygo buildbinarylima/ebpf-demo.yamltotools/lima/