Aya relies on the pinning field in BPF map definitions. libbpf doesn't
provide that field, so instead of using their bpf_map_def struct, here
we define our bpf_elf_map struct which has it.
Our structure is similar to those available in Cilium[0] and some
selftests in the kernel tree[1].
Aya relies on the
pinning
field in BPF map definitions. libbpf doesn't provide that field, so instead of using their bpf_map_def struct, here we define our bpf_elf_map struct which has it.Our structure is similar to those available in Cilium[0] and some selftests in the kernel tree[1].
[0] https://github.com/cilium/cilium/blob/v1.11.1/bpf/include/bpf/loader.h#L19-L29 [1] https://elixir.bootlin.com/linux/v5.16.8/source/samples/bpf/tc_l2_redirect_kern.c#L23
Fixes: #169 Signed-off-by: Michal Rostecki mrostecki@opensuse.org