summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/bpf/test_xdp_redirect_multi.sh
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-09-28 09:19:38 -0700
committerAlexei Starovoitov <ast@kernel.org>2021-09-28 13:51:19 -0700
commit8fffa0e3451abdd84e4b4e427f7e66040eb24f43 (patch)
treed2ce43e779b153b109da250117af6e3279d19d2f /tools/testing/selftests/bpf/test_xdp_redirect_multi.sh
parent9673268f03ba72efcc00fa95f3fe3744fcae0dd0 (diff)
downloadlinux-8fffa0e3451abdd84e4b4e427f7e66040eb24f43.tar.bz2
selftests/bpf: Normalize XDP section names in selftests
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
Diffstat (limited to 'tools/testing/selftests/bpf/test_xdp_redirect_multi.sh')
-rwxr-xr-xtools/testing/selftests/bpf/test_xdp_redirect_multi.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/bpf/test_xdp_redirect_multi.sh b/tools/testing/selftests/bpf/test_xdp_redirect_multi.sh
index 1538373157e3..351955c2bdfd 100755
--- a/tools/testing/selftests/bpf/test_xdp_redirect_multi.sh
+++ b/tools/testing/selftests/bpf/test_xdp_redirect_multi.sh
@@ -88,7 +88,7 @@ setup_ns()
# Add a neigh entry for IPv4 ping test
ip -n ns$i neigh add 192.0.2.253 lladdr 00:00:00:00:00:01 dev veth0
ip -n ns$i link set veth0 $mode obj \
- xdp_dummy.o sec xdp_dummy &> /dev/null || \
+ xdp_dummy.o sec xdp &> /dev/null || \
{ test_fail "Unable to load dummy xdp" && exit 1; }
IFACES="$IFACES veth$i"
veth_mac[$i]=$(ip link show veth$i | awk '/link\/ether/ {print $2}')