Skip to content

Commit

Permalink
tcp: enable sockets to use MSG_FASTOPEN by default
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yuchung Cheng authored and David S. Miller committed Nov 5, 2013
1 parent f8785c5 commit 0d41cca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Documentation/networking/ip-sysctl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ tcp_fastopen - INTEGER
connect() to perform a TCP handshake automatically.

The values (bitmap) are
1: Enables sending data in the opening SYN on the client.
1: Enables sending data in the opening SYN on the client w/ MSG_FASTOPEN.
2: Enables TCP Fast Open on the server side, i.e., allowing data in
a SYN packet to be accepted and passed to the application before
3-way hand shake finishes.
Expand All @@ -464,7 +464,7 @@ tcp_fastopen - INTEGER
different ways of setting max_qlen without the TCP_FASTOPEN socket
option.

Default: 0
Default: 1

Note that the client & server side Fast Open flags (1 and 2
respectively) must be also enabled before the rest of flags can take
Expand Down
2 changes: 1 addition & 1 deletion net/ipv4/tcp_fastopen.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include <net/inetpeer.h>
#include <net/tcp.h>

int sysctl_tcp_fastopen __read_mostly;
int sysctl_tcp_fastopen __read_mostly = TFO_CLIENT_ENABLE;

struct tcp_fastopen_context __rcu *tcp_fastopen_ctx;

Expand Down

0 comments on commit 0d41cca

Please sign in to comment.