diff options
author | Jerry Chu <hkchu@google.com> | 2012-08-31 08:29:11 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-08-31 20:02:18 -0400 |
commit | 1046716368979dee857a2b8a91c4a8833f21b9cb (patch) | |
tree | fdda70278e6fa56c27d242fb1a0ec9b7e3e81d38 /Documentation | |
parent | 2a35cfa591ac63f17815c2d9432b799e37527980 (diff) |
tcp: TCP Fast Open Server - header & support functions
This patch adds all the necessary data structure and support
functions to implement TFO server side. It also documents a number
of flags for the sysctl_tcp_fastopen knob, and adds a few Linux
extension MIBs.
In addition, it includes the following:
1. a new TCP_FASTOPEN socket option an application must call to
supply a max backlog allowed in order to enable TFO on its listener.
2. A number of key data structures:
"fastopen_rsk" in tcp_sock - for a big socket to access its
request_sock for retransmission and ack processing purpose. It is
non-NULL iff 3WHS not completed.
"fastopenq" in request_sock_queue - points to a per Fast Open
listener data structure "fastopen_queue" to keep track of qlen (# of
outstanding Fast Open requests) and max_qlen, among other things.
"listener" in tcp_request_sock - to point to the original listener
for book-keeping purpose, i.e., to maintain qlen against max_qlen
as part of defense against IP spoofing attack.
3. various data structure and functions, many in tcp_fastopen.c, to
support server side Fast Open cookie operations, including
/proc/sys/net/ipv4/tcp_fastopen_key to allow manual rekeying.
Signed-off-by: H.K. Jerry Chu <hkchu@google.com>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'Documentation')
-rw-r--r-- | Documentation/networking/ip-sysctl.txt | 29 |
1 files changed, 22 insertions, 7 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index d64e53124b8c..c7fc10724948 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -467,16 +467,31 @@ tcp_syncookies - BOOLEAN | |||
467 | tcp_fastopen - INTEGER | 467 | tcp_fastopen - INTEGER |
468 | Enable TCP Fast Open feature (draft-ietf-tcpm-fastopen) to send data | 468 | Enable TCP Fast Open feature (draft-ietf-tcpm-fastopen) to send data |
469 | in the opening SYN packet. To use this feature, the client application | 469 | in the opening SYN packet. To use this feature, the client application |
470 | must not use connect(). Instead, it should use sendmsg() or sendto() | 470 | must use sendmsg() or sendto() with MSG_FASTOPEN flag rather than |
471 | with MSG_FASTOPEN flag which performs a TCP handshake automatically. | 471 | connect() to perform a TCP handshake automatically. |
472 | 472 | ||
473 | The values (bitmap) are: | 473 | The values (bitmap) are |
474 | 1: Enables sending data in the opening SYN on the client | 474 | 1: Enables sending data in the opening SYN on the client. |
475 | 5: Enables sending data in the opening SYN on the client regardless | 475 | 2: Enables TCP Fast Open on the server side, i.e., allowing data in |
476 | of cookie availability. | 476 | a SYN packet to be accepted and passed to the application before |
477 | 3-way hand shake finishes. | ||
478 | 4: Send data in the opening SYN regardless of cookie availability and | ||
479 | without a cookie option. | ||
480 | 0x100: Accept SYN data w/o validating the cookie. | ||
481 | 0x200: Accept data-in-SYN w/o any cookie option present. | ||
482 | 0x400/0x800: Enable Fast Open on all listeners regardless of the | ||
483 | TCP_FASTOPEN socket option. The two different flags designate two | ||
484 | different ways of setting max_qlen without the TCP_FASTOPEN socket | ||
485 | option. | ||
477 | 486 | ||
478 | Default: 0 | 487 | Default: 0 |
479 | 488 | ||
489 | Note that the client & server side Fast Open flags (1 and 2 | ||
490 | respectively) must be also enabled before the rest of flags can take | ||
491 | effect. | ||
492 | |||
493 | See include/net/tcp.h and the code for more details. | ||
494 | |||
480 | tcp_syn_retries - INTEGER | 495 | tcp_syn_retries - INTEGER |
481 | Number of times initial SYNs for an active TCP connection attempt | 496 | Number of times initial SYNs for an active TCP connection attempt |
482 | will be retransmitted. Should not be higher than 255. Default value | 497 | will be retransmitted. Should not be higher than 255. Default value |