Skip to contentSkip to conversation

socket.7: document SO_REUSEPORT socket option.

PATCH In review David Wilson 2 participants 2 messages Dec 20, 2014 – Feb 5, 2015 1 message not in the archive Man-pages: manual pages for Linux -- Sections 2, 3, 4, 5, and 7

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 socket.7: document SO_REUSEPORT socket option.

---
 man7/socket.7 | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
man7/socket.7 +14 -0
index ff98e3e..ff4c46b 100644
@@ -662,6 +662,20 @@ with a specific port then it is not possible
 to bind to this port for any local address.
 Argument is an integer boolean flag.
 .TP
+.BR SO_REUSEPORT " (since Linux 3.9)"
+Indicates that attempts to bind an identical listening address to
+multiple
+.B AF_INET
+or
+.B AF_INET6
+sockets by the same UID may succeed. This option allows
+.BR accept (2)
+load distribution in a multi-threaded server to be improved by
+using a distinct listener socket for each thread. This must be set
+on each socket prior to calling
+.BR bind (2)
+on the socket.
+.TP
 .BR SO_RXQ_OVFL " (since Linux 2.6.33)"
 .\" commit 3b885787ea4112eaa80945999ea0901bf742707f
 Indicates that an unsigned 32-bit value ancillary message (cmsg)
Signature · 6 lines
2.1.1

--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to a message not in the archive
Quoted 1 line · David Wilson

Thanks, David. Applied.

Cheers,

Michael

Quoted 30 lines
---
 man7/socket.7 | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
man7/socket.7 +14 -0
index ff98e3e..ff4c46b 100644
@@ -662,6 +662,20 @@ with a specific port then it is not possible
 to bind to this port for any local address.
 Argument is an integer boolean flag.
 .TP
+.BR SO_REUSEPORT " (since Linux 3.9)"
+Indicates that attempts to bind an identical listening address to
+multiple
+.B AF_INET
+or
+.B AF_INET6
+sockets by the same UID may succeed. This option allows
+.BR accept (2)
+load distribution in a multi-threaded server to be improved by
+using a distinct listener socket for each thread. This must be set
+on each socket prior to calling
+.BR bind (2)
+on the socket.
+.TP
 .BR SO_RXQ_OVFL " (since Linux 2.6.33)"
 .\" commit 3b885787ea4112eaa80945999ea0901bf742707f
 Indicates that an unsigned 32-bit value ancillary message (cmsg)
Signature · 7 lines
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html