From: Yonghong Song <yonghong.song@linux.dev>
To: Jakub Sitnicki <jakub@cloudflare.com>,
Andrii Nakryiko <andrii.nakryiko@gmail.com>
Cc: bpf@vger.kernel.org, Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
John Fastabend <john.fastabend@gmail.com>,
kernel-team@fb.com, Martin KaFai Lau <martin.lau@kernel.org>
Subject: Re: [RFC PATCH bpf-next 1/5] bpf: Add link support for sk_msg prog
Date: Mon, 11 Mar 2024 14:58:13 -0700 [thread overview]
Message-ID: <3ea1a77e-75d4-41ef-b745-ff101b1918a2@linux.dev> (raw)
In-Reply-To: <878r2pswie.fsf@cloudflare.com>
On 3/10/24 12:23 PM, Jakub Sitnicki wrote:
> On Fri, Mar 08, 2024 at 04:59 PM -08, Andrii Nakryiko wrote:
>> On Tue, Mar 5, 2024 at 12:22 PM Yonghong Song <yonghong.song@linux.dev> 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.
> We also have the most recent SK_SKB/BPF_SK_SKB_VERDICT [1], which is
> what one would use instead of SK_SKB/BPF_SK_SKB_STREAM_* prog pair when
> chopping the stream of bytes into frames is not needed. For instance,
> because we're redirecting from a UDP socket.
>
> I have a cheatsheet that clarifies in which redirect-with-sockmap
> configuration what program type + attach type is used [2].
>
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a7ba4558e69a3c2ae4ca521f015832ef44799538
> [2] https://github.com/jsitnicki/srecon-2023-sockmap/blob/main/sockmap-cheatsheet.png
Thanks. I will take a look. Yes, agree, we only need to implement
the recommended one, which is SK_SKB/BPF_SK_SKB_VERDICT if I understand correctly.
next prev parent reply other threads:[~2024-03-11 21:58 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 20:21 [RFC PATCH bpf-next 0/5] Add bpf_link support for sk_msg prog Yonghong Song
2024-03-05 20:22 ` [RFC PATCH bpf-next 1/5] bpf: Add link " Yonghong Song
2024-03-08 20:31 ` kernel test robot
2024-03-09 0:59 ` Andrii Nakryiko
2024-03-09 18:41 ` Yonghong Song
2024-03-10 19:23 ` Jakub Sitnicki
2024-03-11 21:58 ` Yonghong Song [this message]
2024-03-11 8:30 ` Jiri Olsa
2024-03-11 22:07 ` Yonghong Song
2024-03-05 20:22 ` [RFC PATCH bpf-next 2/5] libbpf: Refactor bpf_program_attach_fd() Yonghong Song
2024-03-09 1:02 ` Andrii Nakryiko
2024-03-09 18:43 ` Yonghong Song
2024-03-05 20:22 ` [RFC PATCH bpf-next 3/5] libbpf: Add link support for BPF_PROG_TYPE_SK_MSG Yonghong Song
2024-03-09 1:01 ` Andrii Nakryiko
2024-03-09 18:49 ` Yonghong Song
2024-03-05 20:22 ` [RFC PATCH bpf-next 4/5] bpftool: Add link dump support for BPF_LINK_TYPE_SK_MSG Yonghong Song
2024-03-08 16:07 ` Jakub Sitnicki
2024-03-11 21:54 ` Yonghong Song
2024-03-05 20:22 ` [RFC PATCH bpf-next 5/5] selftests/bpf: Add some tests with new bpf_program__attach_sk_msg() API Yonghong Song
2024-03-06 19:19 ` [RFC PATCH bpf-next 0/5] Add bpf_link support for sk_msg prog John Fastabend
2024-03-07 22:47 ` Yonghong Song
2024-03-07 13:01 ` Jakub Sitnicki
2024-03-11 21:53 ` Yonghong Song
2024-03-10 19:52 ` Jakub Sitnicki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3ea1a77e-75d4-41ef-b745-ff101b1918a2@linux.dev \
--to=yonghong.song@linux.dev \
--cc=andrii.nakryiko@gmail.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jakub@cloudflare.com \
--cc=john.fastabend@gmail.com \
--cc=kernel-team@fb.com \
--cc=martin.lau@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.