libbpf: Add support for BPF XDP link
Sync UAPI header and add support for using bpf_link-based XDP attachment. Make xdp/ prog type set expected attach type. Kernel didn't enforce attach_type for XDP programs before, so there is no backwards compatiblity issues there. Also fix section_names selftest to recognize that xdp prog types now have expected attach type. Signed-off-by:Andrii Nakryiko <andriin@fb.com> Signed-off-by:
Alexei Starovoitov <ast@kernel.org> Link: https://lore.kernel.org/bpf/20200722064603.3350758-8-andriin@fb.com
Showing
- tools/include/uapi/linux/bpf.h 9 additions, 1 deletiontools/include/uapi/linux/bpf.h
- tools/lib/bpf/libbpf.c 8 additions, 1 deletiontools/lib/bpf/libbpf.c
- tools/lib/bpf/libbpf.h 2 additions, 0 deletionstools/lib/bpf/libbpf.h
- tools/lib/bpf/libbpf.map 1 addition, 0 deletionstools/lib/bpf/libbpf.map
- tools/testing/selftests/bpf/prog_tests/section_names.c 1 addition, 1 deletiontools/testing/selftests/bpf/prog_tests/section_names.c
Loading
Please register or sign in to comment