diff options
author | Haishuang Yan <yanhaishuang@cmss.chinamobile.com> | 2016-12-28 04:52:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-29 11:38:31 -0500 |
commit | fee83d097b1620530f23bf6063f4ea251ba9c8c7 (patch) | |
tree | 64c2ff87e756a8e024308d7d9f076ae282d9c83f /net/ipv4/tcp.c | |
parent | 1946e672c173559155a3e210fe95dbf8b7b8ddf7 (diff) |
ipv4: Namespaceify tcp_max_syn_backlog knob
Different namespace application might require different maximal
number of remembered connection requests.
Signed-off-by: Haishuang Yan <yanhaishuang@cmss.chinamobile.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp.c')
-rw-r--r-- | net/ipv4/tcp.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c index 7f0d81c090ce..2e3807d8eba8 100644 --- a/net/ipv4/tcp.c +++ b/net/ipv4/tcp.c | |||
@@ -3378,9 +3378,7 @@ void __init tcp_init(void) | |||
3378 | 3378 | ||
3379 | 3379 | ||
3380 | cnt = tcp_hashinfo.ehash_mask + 1; | 3380 | cnt = tcp_hashinfo.ehash_mask + 1; |
3381 | |||
3382 | sysctl_tcp_max_orphans = cnt / 2; | 3381 | sysctl_tcp_max_orphans = cnt / 2; |
3383 | sysctl_max_syn_backlog = max(128, cnt / 256); | ||
3384 | 3382 | ||
3385 | tcp_init_mem(); | 3383 | tcp_init_mem(); |
3386 | /* Set per-socket limits to no more than 1/128 the pressure threshold */ | 3384 | /* Set per-socket limits to no more than 1/128 the pressure threshold */ |