Skip to content

Improve BPF header layout and Lima/vmlinux tooling - #8

Open
allir wants to merge 2 commits into
mainfrom
review-fixes
Open

Improve BPF header layout and Lima/vmlinux tooling#8
allir wants to merge 2 commits into
mainfrom
review-fixes

Conversation

@allir

@allir allir commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator
  • Move vendored libbpf headers under bpf/libbpf/bpf/ so BPF sources use standard <bpf/...> includes, matching upstream layout
  • Only re-dump vmlinux.h when the running kernel differs from the recorded version; on macOS, verify the committed dump exists instead of erroring
  • Name Lima VMs by architecture and add lima-vmlinuxh-{amd64,arm64,all} targets so each arch's dump comes from a matching guest (emulated when non-native)
  • Add bpf/.clangd so clangd resolves the BPF sources with the same flags bpf2go uses
  • Add .gitattributes (mark vmlinux dumps as generated, libbpf as vendored) and ignore the stray go build binary
  • Move lima/ebpf-demo.yaml to tools/lima/

allir added 2 commits July 22, 2026 13:41
- 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant