diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2022-01-19 22:14:22 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-01-20 21:22:02 -0800 |
commit | d4e34bfcbe880493cabd726453b3f52715756616 (patch) | |
tree | 0765e092317f43977888061284ae78afaa9c0f65 /samples/bpf/xdpsock_ctrl_proc.c | |
parent | 544356524dd6ff5b0bb9099861ab8493a4387def (diff) |
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.c | 2 |
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; |