aboutsummaryrefslogtreecommitdiffstats
path: root/tools/bpf/bpftool/common.c
diff options
context:
space:
mode:
authorCong Wang <[email protected]>2021-03-31 02:32:30 +0000
committerAlexei Starovoitov <[email protected]>2021-04-01 17:56:14 +0000
commita7ba4558e69a3c2ae4ca521f015832ef44799538 (patch)
treede4e53cf984dcbd68b485660ae96431fa7402e22 /tools/bpf/bpftool/common.c
parentsock_map: Kill sock_map_link_no_progs() (diff)
downloadkernel-a7ba4558e69a3c2ae4ca521f015832ef44799538.tar.gz
kernel-a7ba4558e69a3c2ae4ca521f015832ef44799538.zip
sock_map: Introduce BPF_SK_SKB_VERDICT
Reusing BPF_SK_SKB_STREAM_VERDICT is possible but its name is confusing and more importantly we still want to distinguish them from user-space. So we can just reuse the stream verdict code but introduce a new type of eBPF program, skb_verdict. Users are not allowed to attach stream_verdict and skb_verdict programs to the same map. Signed-off-by: Cong Wang <[email protected]> Signed-off-by: Alexei Starovoitov <[email protected]> Acked-by: John Fastabend <[email protected]> Link: https://lore.kernel.org/bpf/[email protected]
Diffstat (limited to 'tools/bpf/bpftool/common.c')
-rw-r--r--tools/bpf/bpftool/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/bpf/bpftool/common.c b/tools/bpf/bpftool/common.c
index 65303664417e..1828bba19020 100644
--- a/tools/bpf/bpftool/common.c
+++ b/tools/bpf/bpftool/common.c
@@ -57,6 +57,7 @@ const char * const attach_type_name[__MAX_BPF_ATTACH_TYPE] = {
[BPF_SK_SKB_STREAM_PARSER] = "sk_skb_stream_parser",
[BPF_SK_SKB_STREAM_VERDICT] = "sk_skb_stream_verdict",
+ [BPF_SK_SKB_VERDICT] = "sk_skb_verdict",
[BPF_SK_MSG_VERDICT] = "sk_msg_verdict",
[BPF_LIRC_MODE2] = "lirc_mode2",
[BPF_FLOW_DISSECTOR] = "flow_dissector",