aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/net.c
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2022-01-19 22:14:20 -0800
committerAlexei Starovoitov <ast@kernel.org>2022-01-20 21:22:02 -0800
commitc86575eccab24d583db0169ded342eb215b781c9 (patch)
treea74865fea02a4eb0706022c5fb782fa3a96af7a8 /tools/bpf/bpftool/net.c
parentlibbpf: streamline low-level XDP APIs (diff)
downloadlinux-dev-c86575eccab24d583db0169ded342eb215b781c9.tar.xz
linux-dev-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/bpftool/net.c')
-rw-r--r--tools/bpf/bpftool/net.c2
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)