summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/xdping.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2021-09-28 19:19:38 +0300
committerAlexei Starovoitov <ast@kernel.org>2021-09-28 23:51:19 +0300
commit8fffa0e3451abdd84e4b4e427f7e66040eb24f43 (patch)
treed2ce43e779b153b109da250117af6e3279d19d2f /tools/testing/selftests/bpf/xdping.c
parent9673268f03ba72efcc00fa95f3fe3744fcae0dd0 (diff)
downloadlinux-8fffa0e3451abdd84e4b4e427f7e66040eb24f43.tar.xz
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/xdping.c')
-rw-r--r--tools/testing/selftests/bpf/xdping.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/testing/selftests/bpf/xdping.c b/tools/testing/selftests/bpf/xdping.c
index 842d9155d36c..79a3453dab25 100644
--- a/tools/testing/selftests/bpf/xdping.c
+++ b/tools/testing/selftests/bpf/xdping.c
@@ -178,9 +178,8 @@ int main(int argc, char **argv)
return 1;
}
- main_prog = bpf_object__find_program_by_title(obj,
- server ? "xdpserver" :
- "xdpclient");
+ main_prog = bpf_object__find_program_by_name(obj,
+ server ? "xdping_server" : "xdping_client");
if (main_prog)
prog_fd = bpf_program__fd(main_prog);
if (!main_prog || prog_fd < 0) {