linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] man/man7/socket.7: fix documentation for SO_ATTACH_REUSEPORT_EBPF
@ 2025-10-27 13:17 Vincent Bernat
  2025-10-27 13:24 ` Alejandro Colomar
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Bernat @ 2025-10-27 13:17 UTC (permalink / raw)
  To: Alejandro Colomar, linux-man; +Cc: Vincent Bernat, Craig Gallek

When using eBPF, 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>
---
 man/man7/socket.7 | 17 +++++++++++------
 1 file changed, 11 insertions(+), 6 deletions(-)

diff --git a/man/man7/socket.7 b/man/man7/socket.7
index b4d58a23d5da..d85fdd931e42 100644
--- a/man/man7/socket.7
+++ b/man/man7/socket.7
@@ -354,20 +354,25 @@ 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 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
+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 must return a decision and the
+.B bpf_sk_select_reuseport
+helper should 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)),
-- 
2.51.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-03 20:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).