selftests/bpf: Normalize XDP section names in selftests
authorAndrii Nakryiko <andrii@kernel.org>
Tue, 28 Sep 2021 16:19:38 +0000 (09:19 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 12:23:26 +0000 (14:23 +0200)
commita5c1c0920cf6b3d70343806b97381992c789314a
tree1419179291ebf769132d6959683311f908db308e
parentf00346b30a7cfa9e5777585dc691fba89ec2e99b
selftests/bpf: Normalize XDP section names in selftests

[ Upstream commit 8fffa0e3451abdd84e4b4e427f7e66040eb24f43 ]

Convert almost all SEC("xdp_blah") uses to strict SEC("xdp") to comply
with strict libbpf 1.0 logic of exact section name match for XDP program
types. There is only one exception, which is only tested through
iproute2 and defines multiple XDP programs within the same BPF object.
Given iproute2 still works in non-strict libbpf mode and it doesn't have
means to specify XDP programs by its name (not section name/title),
leave that single file alone for now until iproute2 gains lookup by
function/program name.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Dave Marchevsky <davemarchevsky@fb.com>
Link: https://lore.kernel.org/bpf/20210928161946.2512801-3-andrii@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
19 files changed:
tools/testing/selftests/bpf/progs/test_map_in_map.c
tools/testing/selftests/bpf/progs/test_tcp_check_syncookie_kern.c
tools/testing/selftests/bpf/progs/test_xdp.c
tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_grow.c
tools/testing/selftests/bpf/progs/test_xdp_adjust_tail_shrink.c
tools/testing/selftests/bpf/progs/test_xdp_devmap_helpers.c
tools/testing/selftests/bpf/progs/test_xdp_link.c
tools/testing/selftests/bpf/progs/test_xdp_loop.c
tools/testing/selftests/bpf/progs/test_xdp_noinline.c
tools/testing/selftests/bpf/progs/test_xdp_with_cpumap_helpers.c
tools/testing/selftests/bpf/progs/test_xdp_with_devmap_helpers.c
tools/testing/selftests/bpf/progs/xdp_dummy.c
tools/testing/selftests/bpf/progs/xdp_redirect_multi_kern.c
tools/testing/selftests/bpf/progs/xdping_kern.c
tools/testing/selftests/bpf/test_tcp_check_syncookie.sh
tools/testing/selftests/bpf/test_xdp_redirect.sh
tools/testing/selftests/bpf/test_xdp_redirect_multi.sh
tools/testing/selftests/bpf/test_xdp_veth.sh
tools/testing/selftests/bpf/xdping.c