aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/net/ipv4/tcp_ipv4.c
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2019-10-30 10:05:46 -0700
committerDavid S. Miller <davem@davemloft.net>2019-10-31 14:02:01 -0700
commit623d0c2db02043e43b698fdd8de1bd398b8e7b37 (patch)
tree53142e1249ec020cf559130f197077fd53c51139 /net/ipv4/tcp_ipv4.c
parentnet: increase SOMAXCONN to 4096 (diff)
downloadwireguard-linux-623d0c2db02043e43b698fdd8de1bd398b8e7b37.tar.xz
wireguard-linux-623d0c2db02043e43b698fdd8de1bd398b8e7b37.zip
tcp: increase tcp_max_syn_backlog max value
tcp_max_syn_backlog default value depends on memory size and TCP ehash size. Before this patch, the max value was 2048 [1], which is considered too small nowadays. Increase it to 4096 to match the recent SOMAXCONN change. [1] This is with TCP ehash size being capped to 524288 buckets. Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Willy Tarreau <w@1wt.eu> Cc: Yue Cao <ycao009@ucr.edu> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
-rw-r--r--net/ipv4/tcp_ipv4.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 6be568334848..b74192695955 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2681,7 +2681,7 @@ static int __net_init tcp_sk_init(struct net *net)
net->ipv4.tcp_death_row.sysctl_max_tw_buckets = cnt / 2;
net->ipv4.tcp_death_row.hashinfo = &tcp_hashinfo;
- net->ipv4.sysctl_max_syn_backlog = max(128, cnt / 256);
+ net->ipv4.sysctl_max_syn_backlog = max(128, cnt / 128);
net->ipv4.sysctl_tcp_sack = 1;
net->ipv4.sysctl_tcp_window_scaling = 1;
net->ipv4.sysctl_tcp_timestamps = 1;