]> git.baikalelectronics.ru Git - kernel.git/commit
samples: bpf: convert some XDP samples from bpf_load to libbpf
authorJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 10 May 2018 17:24:43 +0000 (10:24 -0700)
committerDaniel Borkmann <daniel@iogearbox.net>
Thu, 10 May 2018 23:44:17 +0000 (01:44 +0200)
commit1982673d457716bb387c8087e8b9144ee5d2c228
tree880940e6af0c8352acc8c5f2158ec1457a2dc08c
parentb7b017df2da9fd697f9c0463f228d17fb83cd629
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>
samples/bpf/Makefile
samples/bpf/xdp1_user.c
samples/bpf/xdp_adjust_tail_user.c
samples/bpf/xdp_rxq_info_user.c