From: Alejandro Colomar <alx@kernel.org>
To: Craig Gallek <kraig@google.com>
Cc: Vincent Bernat <vincent@bernat.ch>,
linux-man@vger.kernel.org, Martin KaFai Lau <kafai@fb.com>
Subject: Re: [PATCH v3] man/man7/socket.7: fix documentation for SO_ATTACH_REUSEPORT_EBPF
Date: Wed, 31 Dec 2025 17:00:23 +0100 [thread overview]
Message-ID: <aVVH5RBYHnDb1s5E@devuan> (raw)
In-Reply-To: <CAEfhGiwbaAuvZ=aVQoRw8+ZQPmMQnwp3WFO5ELCMPJOOa3FnWQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3229 bytes --]
Hi Vincent, Craig,
On Tue, Dec 02, 2025 at 10:49:03AM -0500, Craig Gallek wrote:
> On Mon, Dec 1, 2025 at 2:57 PM Vincent Bernat <vincent@bernat.ch> wrote:
> >
> > When using eBPF, there are two possible cases depending on the program
> > type. Only the first case was described. In the second case, the program
> > should not return an index, but a decision (SK_PASS/SK_DROP). The socket
> > should be selected using the sk_select_reuseport helper.
> >
> > Cc: Craig Gallek <kraig@google.com>
> > Signed-off-by: Vincent Bernat <vincent@bernat.ch>
> > ---
I have applied the patch, with some important reorganization of the
text.
<https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=41788bdd42312828532c4ddbadc0a4d28426d4fd>
> > man/man7/socket.7 | 23 ++++++++++++++++++++---
> > 1 file changed, 20 insertions(+), 3 deletions(-)
> >
> > diff --git a/man/man7/socket.7 b/man/man7/socket.7
> > index b4d58a23d5da..e4e85dc9345d 100644
> > --- a/man/man7/socket.7
> > +++ b/man/man7/socket.7
> > @@ -354,20 +354,34 @@ the sockets in the reuseport group (that is, all sockets which have
> > .B SO_REUSEPORT
> > set and are using the same local address to receive packets).
> > .IP
> > -The BPF program must return an index between 0 and N\-1 representing
> > +The classic BPF program must return an index between 0 and N\-1 representing
> > the socket which should receive the packet
> > (where N is the number of sockets in the group).
> > If the BPF program returns an invalid index,
> > socket selection will fall back to the plain
> > .B SO_REUSEPORT
> > mechanism.
> > -.IP
> > Sockets are numbered in the order in which they are added to the group
> > (that is, the order of
> > .BR bind (2)
> > calls for UDP sockets or the order of
> > .BR listen (2)
> > calls for TCP sockets).
> > +.IP
> > +The extended BPF program can be of two types:
> > +.B BPF_PROG_TYPE_SOCKET_FILTER
> > +or
> > +.BR BPF_PROG_TYPE_SK_REUSEPORT .
> > +In the first case, the extended BPF program must return an index between 0 and N\-1,
> > +like a classic BPF program.
> > +In the second case, it must return an action
> > +.RB ( SK_PASS
> > +or
> > +.BR SK_DROP )
> > +and the
> > +.B bpf_sk_select_reuseport
> > +helper can be used to select the socket which should receive the packet.
> > +.IP
> > New sockets added to a reuseport group will inherit the BPF program.
> > When a socket is removed from a reuseport group (via
> > .BR close (2)),
> > @@ -386,7 +400,10 @@ takes the same argument type as
> > .BR SO_ATTACH_BPF .
> > .IP
> > UDP support for this feature is available since Linux 4.5;
> > -TCP support is available since Linux 4.6.
> > +TCP support is available since Linux 4.6;
> > +support for
> > +.B BPF_PROG_TYPE_SK_REUSEPORT
> > +program type is available since Linux 4.19.
> > .TP
> > .B SO_BINDTODEVICE
> > Bind this socket to a particular device like \[lq]eth0\[rq],
> > --
> > 2.51.0
>
> Looks good to me, thank you for the clean up!
Thanks! I took this as an Acked-by. (I prefer them to be explicitly
stated, though.)
Have a lovely day!
Alex
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
prev parent reply other threads:[~2025-12-31 16:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-27 13:17 [PATCH] man/man7/socket.7: fix documentation for SO_ATTACH_REUSEPORT_EBPF Vincent Bernat
2025-10-27 13:24 ` Alejandro Colomar
2025-10-27 19:11 ` Vincent Bernat
[not found] ` <CAEfhGiz9OLu=arVoPFJhYTr3h-wB5QR5sOkgNDMzwR+74NUEBw@mail.gmail.com>
2025-11-03 20:28 ` Vincent Bernat
2025-11-24 16:47 ` Alejandro Colomar
2025-12-01 5:44 ` [PATCH v2] " Vincent Bernat
2025-12-01 5:49 ` Vincent Bernat
2025-12-01 14:03 ` Alejandro Colomar
2025-12-01 19:57 ` [PATCH v3] " Vincent Bernat
2025-12-02 15:49 ` Craig Gallek
2025-12-31 16:00 ` Alejandro Colomar [this message]
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=aVVH5RBYHnDb1s5E@devuan \
--to=alx@kernel.org \
--cc=kafai@fb.com \
--cc=kraig@google.com \
--cc=linux-man@vger.kernel.org \
--cc=vincent@bernat.ch \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox