summaryrefslogtreecommitdiffstats
path: root/samples/bpf/xdpsock_ctrl_proc.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2022-01-20 07:14:22 +0100
committerAlexei Starovoitov <ast@kernel.org>2022-01-21 06:22:02 +0100
commitd4e34bfcbe880493cabd726453b3f52715756616 (patch)
tree0765e092317f43977888061284ae78afaa9c0f65 /samples/bpf/xdpsock_ctrl_proc.c
parentselftests/bpf: switch to new libbpf XDP APIs (diff)
downloadlinux-d4e34bfcbe880493cabd726453b3f52715756616.tar.xz
linux-d4e34bfcbe880493cabd726453b3f52715756616.zip
samples/bpf: adapt samples/bpf to bpf_xdp_xxx() APIs
Use new bpf_xdp_*() APIs across all XDP-related BPF samples. Signed-off-by: Andrii Nakryiko <andrii@kernel.org> Link: https://lore.kernel.org/r/20220120061422.2710637-5-andrii@kernel.org Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'samples/bpf/xdpsock_ctrl_proc.c')
-rw-r--r--samples/bpf/xdpsock_ctrl_proc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/samples/bpf/xdpsock_ctrl_proc.c b/samples/bpf/xdpsock_ctrl_proc.c
index cc4408797ab7..28b5f2a9fa08 100644
--- a/samples/bpf/xdpsock_ctrl_proc.c
+++ b/samples/bpf/xdpsock_ctrl_proc.c
@@ -173,7 +173,7 @@ main(int argc, char **argv)
unlink(SOCKET_NAME);
/* Unset fd for given ifindex */
- err = bpf_set_link_xdp_fd(ifindex, -1, 0);
+ err = bpf_xdp_detach(ifindex, 0, NULL);
if (err) {
fprintf(stderr, "Error when unsetting bpf prog_fd for ifindex(%d)\n", ifindex);
return err;