OSDN Git Service

sock_map: Introduce BPF_SK_SKB_VERDICT
authorCong Wang <cong.wang@bytedance.com>
Wed, 31 Mar 2021 02:32:30 +0000 (19:32 -0700)
committerAlexei Starovoitov <ast@kernel.org>
Thu, 1 Apr 2021 17:56:14 +0000 (10:56 -0700)
commita7ba4558e69a3c2ae4ca521f015832ef44799538
treede4e53cf984dcbd68b485660ae96431fa7402e22
parentb017055255d620b365299c3824610e0098414664
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 <cong.wang@bytedance.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: John Fastabend <john.fastabend@gmail.com>
Link: https://lore.kernel.org/bpf/20210331023237.41094-10-xiyou.wangcong@gmail.com
include/linux/skmsg.h
include/uapi/linux/bpf.h
kernel/bpf/syscall.c
net/core/skmsg.c
net/core/sock_map.c
tools/bpf/bpftool/common.c
tools/bpf/bpftool/prog.c
tools/include/uapi/linux/bpf.h