aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/xdping.c
diff options
context:
space:
mode:
authorDaniel Borkmann <[email protected]>2022-01-24 23:01:28 +0100
committerDaniel Borkmann <[email protected]>2022-01-24 23:02:29 +0100
commit0bfb95f59a6613e30c0672b8ef2c9502302bf6bb (patch)
tree0bc4adab9fabe7e2bbf96d851f776eb6d4bff01d /tools/testing/selftests/bpf/xdping.c
parentb4ec6a19231224f6b08dc54ea07da4c4090e8ee3 (diff)
selftests, bpf: Do not yet switch to new libbpf XDP APIs
Revert commit 544356524dd6 ("selftests/bpf: switch to new libbpf XDP APIs") for now given this will heavily conflict with 4b27480dcaa7 ("bpf/selftests: convert xdp_link test to ASSERT_* macros") upon merge. Andrii agreed to redo the conversion cleanly after trees merged. Signed-off-by: Daniel Borkmann <[email protected]> Acked-by: Alexei Starovoitov <[email protected]> Acked-by: Andrii Nakryiko <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/xdping.c')
-rw-r--r--tools/testing/selftests/bpf/xdping.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/bpf/xdping.c b/tools/testing/selftests/bpf/xdping.c
index c567856fd1bc..baa870a759a2 100644
--- a/tools/testing/selftests/bpf/xdping.c
+++ b/tools/testing/selftests/bpf/xdping.c
@@ -29,7 +29,7 @@ static __u32 xdp_flags = XDP_FLAGS_UPDATE_IF_NOEXIST;
static void cleanup(int sig)
{
- bpf_xdp_detach(ifindex, xdp_flags, NULL);
+ bpf_set_link_xdp_fd(ifindex, -1, xdp_flags);
if (sig)
exit(1);
}
@@ -203,7 +203,7 @@ int main(int argc, char **argv)
printf("XDP setup disrupts network connectivity, hit Ctrl+C to quit\n");
- if (bpf_xdp_attach(ifindex, prog_fd, xdp_flags, NULL) < 0) {
+ if (bpf_set_link_xdp_fd(ifindex, prog_fd, xdp_flags) < 0) {
fprintf(stderr, "Link set xdp fd failed for %s\n", ifname);
goto done;
}