diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2022-01-19 22:14:20 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2022-01-20 21:22:02 -0800 |
commit | c86575eccab24d583db0169ded342eb215b781c9 (patch) | |
tree | a74865fea02a4eb0706022c5fb782fa3a96af7a8 /tools/bpf | |
parent | c359821ac65b7cda0e24f75f6ffd465c3f771204 (diff) | |
download | linux-c86575eccab24d583db0169ded342eb215b781c9.tar.bz2 |
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) |