samples: bpf: convert some XDP samples from bpf_load to libbpf
Now that we can use full powers of libbpf in BPF samples, we should perhaps make the simplest XDP programs not depend on bpf_load helpers. This way newcomers will be exposed to the recommended library from the start. Use of bpf_prog_load_xattr() will also make it trivial to later on request offload of the programs by simply adding ifindex to the xattr. Signed-off-by:Jakub Kicinski <jakub.kicinski@netronome.com> Reviewed-by:
Quentin Monnet <quentin.monnet@netronome.com> Signed-off-by:
Daniel Borkmann <daniel@iogearbox.net>
Showing
- samples/bpf/Makefile 4 additions, 4 deletionssamples/bpf/Makefile
- samples/bpf/xdp1_user.c 21 additions, 10 deletionssamples/bpf/xdp1_user.c
- samples/bpf/xdp_adjust_tail_user.c 22 additions, 14 deletionssamples/bpf/xdp_adjust_tail_user.c
- samples/bpf/xdp_rxq_info_user.c 31 additions, 15 deletionssamples/bpf/xdp_rxq_info_user.c
Loading
Please register or sign in to comment