xdp-tutorial
xdp-tutorial copied to clipboard
Avoid using bpf_object__find_program_by_title
As Andrii Nakryiko says in this post we should not use bpf_object__find_program_by_title :
It would be good to avoid using find_program_by_title(), as it's going to get deprecated and eventually removed. Looking up by section name ("title") is ambiguous now that libbpf supports many BPF programs per same section. There is find_program_by_name() which looks program by its C function name. I suggest using it.
In XDP-tutorial this is first introduced in basic02-prog-by-name/, but also used by common/common_user_bpf_xdp.c which gets included in all the userspace binaries.
Hi @anakryiko
Created this issue tracker to remind ourselves that we also need to fix and update XDP-tutorial. --Jesper