On 3/8/24 4:59 PM, Andrii Nakryiko wrote:
On Tue, Mar 5, 2024 at 12:22 PM Yonghong Song <yonghong.song@xxxxxxxxx> wrote:
Add link support for sk_msg program. This will make user space
easy to manage as most common used programs have alrady have
link support.
So we have:
SEC("sk_skb/stream_parser") mapping to SK_SKB/BPF_SK_SKB_STREAM_PARSER.
SEC("sk_skb/stream_verdict") mapping to SK_SKB/BPF_SK_SKB_STREAM_VERDICT.
SEC("sk_msg") mapping to SK_MSG/BPF_SK_MSG_VERDICT.
Are those all kind of in the same category and should we support link
for both SK_MSG and SK_SKB? I'm not too familiar, maybe John or
someone else can clarify.
I can add sk_skb bpf_link support as well. Yes, sk_msg and sk_skb are
similar to each other.
Signed-off-by: Yonghong Song <yonghong.song@xxxxxxxxx>
---
include/linux/bpf.h | 13 +++
include/uapi/linux/bpf.h | 5 ++
kernel/bpf/syscall.c | 3 +
net/core/skmsg.c | 153 +++++++++++++++++++++++++++++++++
net/core/sock_map.c | 6 +-
tools/include/uapi/linux/bpf.h | 5 ++
6 files changed, 181 insertions(+), 4 deletions(-)
[...]