projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c359821
)
bpftool: use new API for attaching XDP program
author
Andrii Nakryiko
<andrii@kernel.org>
Thu, 20 Jan 2022 06:14:20 +0000
(22:14 -0800)
committer
Alexei Starovoitov
<ast@kernel.org>
Fri, 21 Jan 2022 05:22:02 +0000
(21:22 -0800)
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>
tools/bpf/bpftool/net.c
patch
|
blob
|
history
diff --git
a/tools/bpf/bpftool/net.c
b/tools/bpf/bpftool/net.c
index 649053704bd7126db4955326b3ec83f457b431ec..526a332c48e6ebaaa2c9738d0e4fb05324ff19e3 100644
(file)
--- 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)