diff options
author | Yuchung Cheng <ycheng@google.com> | 2013-10-31 12:19:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-11-04 19:57:47 -0500 |
commit | 0d41cca490c274352211efac50e9598d39a9dc80 (patch) | |
tree | f6caab17ac51ad2f8a3cc49f886363948b873f93 | |
parent | f8785c55141d698d988c6a1ffe4530bc7fa6e886 (diff) |
tcp: enable sockets to use MSG_FASTOPEN by default
Applications have started to use Fast Open (e.g., Chrome browser has
such an optional flag) and the feature has gone through several
generations of kernels since 3.7 with many real network tests. It's
time to enable this flag by default for applications to test more
conveniently and extensively.
Signed-off-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | Documentation/networking/ip-sysctl.txt | 4 | ||||
-rw-r--r-- | net/ipv4/tcp_fastopen.c | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt index a46d78583ae1..6c0098359ca6 100644 --- a/Documentation/networking/ip-sysctl.txt +++ b/Documentation/networking/ip-sysctl.txt | |||
@@ -451,7 +451,7 @@ tcp_fastopen - INTEGER | |||
451 | connect() to perform a TCP handshake automatically. | 451 | connect() to perform a TCP handshake automatically. |
452 | 452 | ||
453 | The values (bitmap) are | 453 | The values (bitmap) are |
454 | 1: Enables sending data in the opening SYN on the client. | 454 | 1: Enables sending data in the opening SYN on the client w/ MSG_FASTOPEN. |
455 | 2: Enables TCP Fast Open on the server side, i.e., allowing data in | 455 | 2: Enables TCP Fast Open on the server side, i.e., allowing data in |
456 | a SYN packet to be accepted and passed to the application before | 456 | a SYN packet to be accepted and passed to the application before |
457 | 3-way hand shake finishes. | 457 | 3-way hand shake finishes. |
@@ -464,7 +464,7 @@ tcp_fastopen - INTEGER | |||
464 | different ways of setting max_qlen without the TCP_FASTOPEN socket | 464 | different ways of setting max_qlen without the TCP_FASTOPEN socket |
465 | option. | 465 | option. |
466 | 466 | ||
467 | Default: 0 | 467 | Default: 1 |
468 | 468 | ||
469 | Note that the client & server side Fast Open flags (1 and 2 | 469 | Note that the client & server side Fast Open flags (1 and 2 |
470 | respectively) must be also enabled before the rest of flags can take | 470 | respectively) must be also enabled before the rest of flags can take |
diff --git a/net/ipv4/tcp_fastopen.c b/net/ipv4/tcp_fastopen.c index 766032b4a6c3..f195d9316e55 100644 --- a/net/ipv4/tcp_fastopen.c +++ b/net/ipv4/tcp_fastopen.c | |||
@@ -8,7 +8,7 @@ | |||
8 | #include <net/inetpeer.h> | 8 | #include <net/inetpeer.h> |
9 | #include <net/tcp.h> | 9 | #include <net/tcp.h> |
10 | 10 | ||
11 | int sysctl_tcp_fastopen __read_mostly; | 11 | int sysctl_tcp_fastopen __read_mostly = TFO_CLIENT_ENABLE; |
12 | 12 | ||
13 | struct tcp_fastopen_context __rcu *tcp_fastopen_ctx; | 13 | struct tcp_fastopen_context __rcu *tcp_fastopen_ctx; |
14 | 14 | ||