-
Notifications
You must be signed in to change notification settings - Fork 302
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
feat(aya-ebpf): BTF maps #1117
base: main
Are you sure you want to change the base?
feat(aya-ebpf): BTF maps #1117
Conversation
✅ Deploy Preview for aya-rs-docs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
match btf.string_at(m.name_offset)?.as_ref() { | ||
"__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.
Because of this quirk, the eBPF programs written with aya-ebpf are not loadable by libbpf. We would have to port exactly the same quirk there.
But I didn't see any issues on the kernel side with it.
f327ceb
to
d102383
Compare
Good job, I am expecting socket_map!!! |
The only major blocker in getting this green are failing ring buf integration tests: https://github.com/aya-rs/aya/actions/runs/12353399024/job/34472421762?pr=1117 The issue is that for some reason, the type stored in the ring buf shows as |
@vadorovsky, this pull request is now in conflict and requires a rebase. |
d102383
to
e75dbed
Compare
6fb04c5
to
69c00ac
Compare
69c00ac
to
15aacab
Compare
Before this change, Aya supported only legacy BPF map definitions, which are instances of the `bpf_map_def` struct and end up in the `maps` ELF section. This change introduces BTF maps, with custom structs indicating the metadata of the map, which end up in the `.maps` section. Legacy maps are not supported by libbpf anymore and not even by the kernel for newer types of maps like inode/task storage. Add support of BTF maps in aya-ebpf under the `btf-maps` feature flag. Usage of this feature requires emitting debug info for the eBPF crate and passing the `--btf` flag to bpf-linker.
15aacab
to
484234c
Compare
Before this change, Aya supported only legacy BPF map definitions, which are instances of the
bpf_map_def
struct and end up in themaps
ELF section. This change introduces BTF maps, with custom structs indicating the metadata of the map, which end up in the.maps
section.Legacy maps are not supported by libbpf anymore and not even by the kernel for newer types of maps like inode/task storage.
Add support of BTF maps in aya-ebpf under the
btf-maps
feature flag.Usage of this feature requires emitting debug info for the eBPF crate and passing the
--btf
flag to bpf-linker.This change is