bpftools/linux-observability-with-bpf

bpf_load.h no longer exists in Linux as of 5.11

Dantali0n opened this issue · 4 comments

Hello,

Kernel 5.11 marks the removal of bpf_load.h which your code examples depend on:

https://elixir.bootlin.com/linux/v5.11/source/samples/bpf/bpf_load.h

Thanks for bringing this up @Dantali0n ! I think it’s time for me to update this whole thing to libbpf at this point . However, I kind of like the idea that the readers were able to use eBPF without any library so I’ll carefully need to think about the boundaries. https://github.com/libbpf/libbpf

I think the functionality of "bpf_load.h" is merged in "bpf.h" itself.....
I say this because when I compile the bpf_load.c file with include of "bpf.h" and omit "bpf_load.h" it smooth sails...
Pls explain if this is the case...
Thx

Hi,
Can you tell me where is the file "/kernel-src/samples/bpf"
From where is this being referred to in the Makefile ..?
Regards
Ranga

bpf_load.c is also removed and I get a compilation error when trying to build the example of chapter 2.