aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorYuchung Cheng <ycheng@google.com>2012-07-19 02:43:09 -0400
committerDavid S. Miller <davem@davemloft.net>2012-07-19 14:02:03 -0400
commitcf60af03ca4e71134206809ea892e49b92a88896 (patch)
tree478ee362f10d0737fbc4e6642e2966abe0cd1397 /Documentation
parent8e4178c1c7b52f7c99f5fd22ef7af6b2bff409e3 (diff)
net-tcp: Fast Open client - sendmsg(MSG_FASTOPEN)
sendmsg() (or sendto()) with MSG_FASTOPEN is a combo of connect(2) and write(2). The application should replace connect() with it to send data in the opening SYN packet. For blocking socket, sendmsg() blocks until all the data are buffered locally and the handshake is completed like connect() call. It returns similar errno like connect() if the TCP handshake fails. For non-blocking socket, it returns the number of bytes queued (and transmitted in the SYN-data packet) if cookie is available. If cookie is not available, it transmits a data-less SYN packet with Fast Open cookie request option and returns -EINPROGRESS like connect(). Using MSG_FASTOPEN on connecting or connected socket will result in simlar errno like repeating connect() calls. Therefore the application should only use this flag on new sockets. The buffer size of sendmsg() is independent of the MSS of the connection. Signed-off-by: Yuchung Cheng <ycheng@google.com> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/networking/ip-sysctl.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index e1e021594cff..03964e088180 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -468,6 +468,17 @@ tcp_syncookies - BOOLEAN
468 SYN flood warnings in logs not being really flooded, your server 468 SYN flood warnings in logs not being really flooded, your server
469 is seriously misconfigured. 469 is seriously misconfigured.
470 470
471tcp_fastopen - INTEGER
472 Enable TCP Fast Open feature (draft-ietf-tcpm-fastopen) to send data
473 in the opening SYN packet. To use this feature, the client application
474 must not use connect(). Instead, it should use sendmsg() or sendto()
475 with MSG_FASTOPEN flag which performs a TCP handshake automatically.
476
477 The values (bitmap) are:
478 1: Enables sending data in the opening SYN on the client
479
480 Default: 0
481
471tcp_syn_retries - INTEGER 482tcp_syn_retries - INTEGER
472 Number of times initial SYNs for an active TCP connection attempt 483 Number of times initial SYNs for an active TCP connection attempt
473 will be retransmitted. Should not be higher than 255. Default value 484 will be retransmitted. Should not be higher than 255. Default value