man/man7/tcp.7: Document effect of TCP_DEFER_ACCEPT on clientsocket
TCP_DEFER_ACCEPT has an interesting little-known effect on client sockets. I don't think it's very useful but should still be documented.
See here for reference:
<https://elixir.bootlin.com/linux/v6.19.6/source/net/ipv4/tcp_input.c#L6781-L6796>
---
man/man7/tcp.7 | 5 +++++
1 file changed, 5 insertions(+)
man/man7/tcp.7 +0 -0
@@ -1091,6 +1091,11 @@ Allow a listener to be awakened only when data arrives on the socket.
Takes an integer value (seconds), this can
bound the maximum number of attempts TCP will make to
complete the connection.
+.IP
+On a client socket, if non-zero, delays sending the final ACK of the three-way +handshake until the socket has data to send, in which case the ACK is +piggybacked on the first data segment, or a delayed-ACK timeout is reached. +.IP
This option should not be used in code intended to be portable. .TP
.BR TCP_INFO " (since Linux 2.4)"
Signature · 1 line
2.53.0
Alejandro Colomar
maintainerHi Ran,
Quoted 7 lines · Ran Benita
TCP_DEFER_ACCEPThas an interesting little-known effect on client sockets. I don't think it's very useful but should still be documented.See here for reference:
<https://elixir.bootlin.com/linux/v6.19.6/source/net/ipv4/tcp_input.c#L6781-L6796>Signed-off-by Ran Benita <[email protected]>
Thanks! Please see some comments below.
Have a lovely night!
Alex
Quoted 9 lines
---
man/man7/tcp.7 | 5 +++++1 file changed, 5 insertions(+)man/man7/tcp.7 +0
-0@@ -1091,6 +1091,11 @@ Allow a listener to be awakened only when data arrives on the socket.
Quoted 5 lines
Takes an integer value (seconds), this can
bound the maximum number of attempts TCP will make to
complete the connection.
+.IP
+On a client socket, if non-zero, delays sending the final ACK of the three-way
s/non-zero/nonzero/
$ grep -rho 'non[^ ]*zero' | sort | uniq -c
72 non-zero
4 non\-zero
2119 nonzero
3 nonzero non-zero
2 nonzero/non-zero
2 nonzero\h'|\n[3cl1]u'non-zeroman/man7/tcp.7
Quoted 2 lines
man/man7/tcp.7 +2
-0+handshake until the socket has data to send, in which case the ACK is +piggybacked on the first data segment, or a delayed-ACK timeout is reached.
Please use semantic newlines. See man-pages(7):
$ MANWIDTH=72 man man-pages | awk '/Use semantic newlines/,/^$/'
Use semantic newlines
In the source of a manual page, new sentences should be started on
new lines, long sentences should be split into lines at clause
breaks (commas, semicolons, colons, and so on), and long clauses
should be split at phrase boundaries. This convention, sometimes
known as "semantic newlines", makes it easier to see the effect of
patches, which often operate at the level of individual sentences,
clauses, or phrases.Quoted 7 lines
+.IP
This option should not be used in code intended to be portable. .TP
.BRTCP_INFO" (since Linux 2.4)"Signature · 1 line
2.53.0
Signature · 1 line
<https://www.alejandro-colomar.es>
PATCH v2 1/1 man/man7/tcp.7: Document effect of TCP_DEFER_ACCEPT on client socket
In reply to Ran BenitaTCP_DEFER_ACCEPT has an interesting little-known effect on client sockets. I don't think it's very useful but should still be documented.
See here for reference:
<https://elixir.bootlin.com/linux/v6.19.6/source/net/ipv4/tcp_input.c#L6781-L6796>
---
Thanks for taking a look. I fixed the following:
- Change non-zero -> nonzero
- Use semantic newlines
man/man7/tcp.7 | 6 ++++++ 1 file changed, 6 insertions(+)
man/man7/tcp.7 +6 -0
@@ -1091,6 +1091,12 @@ Allow a listener to be awakened only when data arrives on the socket. Takes an integer value (seconds), this can bound the maximum number of attempts TCP will make to complete the connection. +.IP +On a client socket, if nonzero, +delays sending the final ACK of the three-way handshake until the socket has data to send, +in which case the ACK is piggybacked on the first data segment, +or a delayed-ACK timeout is reached. +.IP This option should not be used in code intended to be portable. .TP .BR TCP_INFO " (since Linux 2.4)"
Signature · 1 line
2.53.0
Alejandro Colomar
maintainerRe: [PATCH v2] man/man7/tcp.7: Document effect of TCP_DEFER_ACCEPT on client socket
Hi Ran,
Quoted 7 lines · Ran Benita
TCP_DEFER_ACCEPThas an interesting little-known effect on client sockets. I don't think it's very useful but should still be documented.See here for reference:
<https://elixir.bootlin.com/linux/v6.19.6/source/net/ipv4/tcp_input.c#L6781-L6796>Signed-off-by Ran Benita <[email protected]>
Thanks! I've applied the patch.
Have a lovely night!
Alex
Quoted 28 lines
---
Thanks for taking a look. I fixed the following:
- Change non-zero -> nonzero
- Use semantic newlinesman/man7/tcp.7 | 6 ++++++ 1 file changed, 6 insertions(+)man/man7/tcp.7 +6
-0@@ -1091,6 +1091,12 @@ Allow a listener to be awakened only when data arrives on the socket. Takes an integer value (seconds), this can bound the maximum number of attempts TCP will make to complete the connection. +.IP +On a client socket, if nonzero, +delays sending the final ACK of the three-way handshake until the socket has data to send, +in which case the ACK is piggybacked on the first data segment, +or a delayed-ACK timeout is reached. +.IP This option should not be used in code intended to be portable. .TP .BR TCP_INFO " (since Linux 2.4)"Signature · 1 line
2.53.0
Signature · 1 line
<https://www.alejandro-colomar.es>