Managing ebpf programs without libbpf-cargo #1145
havefuncoding1
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am working on a Rust-based solution for managing eBPF program in a generic way. Using libbpf-cargo is not an option since the genrated skel.rs files are tailored to specific ebpf programs. In my experiment, I can successfully load the eBPF object file (bpf.o), and bpftool prog list and bpftool map list correctly show the loaded programs and maps. However, eBPF map contents remain empty at runtime.
Does this mean I need to manually attach all tracepoints? If so, do I need to enumerate all SEC() section names in the eBPF object and explicitly call attach_kprobe, attach_tracepoint, etc.? This approach seems cumbersome—I'm wondering if there's a more convenient way to handle this dynamically.
For reference, everything works fine when using libbpf-cargo, so the eBPF implementation itself is correct.
Any insights or suggestions would be greatly appreciated!
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions