diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2022-01-20 07:14:20 +0100 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-01-21 06:22:02 +0100 |
commit | c86575eccab24d583db0169ded342eb215b781c9 (patch) | |
tree | a74865fea02a4eb0706022c5fb782fa3a96af7a8 /tools/bpf | |
parent | libbpf: streamline low-level XDP APIs (diff) | |
download | linux-c86575eccab24d583db0169ded342eb215b781c9.tar.xz linux-c86575eccab24d583db0169ded342eb215b781c9.zip |
bpftool: use new API for attaching XDP program
Switch to new bpf_xdp_attach() API to avoid deprecation warnings.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/r/20220120061422.2710637-3-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/bpf')
-rw-r--r-- | tools/bpf/bpftool/net.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/bpf/bpftool/net.c b/tools/bpf/bpftool/net.c index 649053704bd7..526a332c48e6 100644 --- a/tools/bpf/bpftool/net.c +++ b/tools/bpf/bpftool/net.c @@ -551,7 +551,7 @@ static int do_attach_detach_xdp(int progfd, enum net_attach_type attach_type, if (attach_type == NET_ATTACH_TYPE_XDP_OFFLOAD) flags |= XDP_FLAGS_HW_MODE; - return bpf_set_link_xdp_fd(ifindex, progfd, flags); + return bpf_xdp_attach(ifindex, progfd, flags, NULL); } static int do_attach(int argc, char **argv) |