diff options
author | Eric Dumazet <edumazet@google.com> | 2017-10-27 00:55:08 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-27 03:35:43 -0400 |
commit | 0c12654ac6d9004b9538b2a969b2b59e9a5ed831 (patch) | |
tree | 3e4254c0dd76f695a78741e9662f9ecd4337d489 /net/ipv4/tcp_input.c | |
parent | 6496f6bde0c323fba5e8c5b5cbf3a7bf28dad7ed (diff) |
tcp: Namespace-ify sysctl_tcp_app_win
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/tcp_input.c')
-rw-r--r-- | net/ipv4/tcp_input.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index fd77037ac800..6af4b58ac6d5 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -79,7 +79,6 @@ | |||
79 | #include <linux/unaligned/access_ok.h> | 79 | #include <linux/unaligned/access_ok.h> |
80 | #include <linux/static_key.h> | 80 | #include <linux/static_key.h> |
81 | 81 | ||
82 | int sysctl_tcp_app_win __read_mostly = 31; | ||
83 | int sysctl_tcp_adv_win_scale __read_mostly = 1; | 82 | int sysctl_tcp_adv_win_scale __read_mostly = 1; |
84 | EXPORT_SYMBOL(sysctl_tcp_adv_win_scale); | 83 | EXPORT_SYMBOL(sysctl_tcp_adv_win_scale); |
85 | 84 | ||
@@ -428,6 +427,7 @@ static void tcp_fixup_rcvbuf(struct sock *sk) | |||
428 | */ | 427 | */ |
429 | void tcp_init_buffer_space(struct sock *sk) | 428 | void tcp_init_buffer_space(struct sock *sk) |
430 | { | 429 | { |
430 | int tcp_app_win = sock_net(sk)->ipv4.sysctl_tcp_app_win; | ||
431 | struct tcp_sock *tp = tcp_sk(sk); | 431 | struct tcp_sock *tp = tcp_sk(sk); |
432 | int maxwin; | 432 | int maxwin; |
433 | 433 | ||
@@ -446,14 +446,14 @@ void tcp_init_buffer_space(struct sock *sk) | |||
446 | if (tp->window_clamp >= maxwin) { | 446 | if (tp->window_clamp >= maxwin) { |
447 | tp->window_clamp = maxwin; | 447 | tp->window_clamp = maxwin; |
448 | 448 | ||
449 | if (sysctl_tcp_app_win && maxwin > 4 * tp->advmss) | 449 | if (tcp_app_win && maxwin > 4 * tp->advmss) |
450 | tp->window_clamp = max(maxwin - | 450 | tp->window_clamp = max(maxwin - |
451 | (maxwin >> sysctl_tcp_app_win), | 451 | (maxwin >> tcp_app_win), |
452 | 4 * tp->advmss); | 452 | 4 * tp->advmss); |
453 | } | 453 | } |
454 | 454 | ||
455 | /* Force reservation of one segment. */ | 455 | /* Force reservation of one segment. */ |
456 | if (sysctl_tcp_app_win && | 456 | if (tcp_app_win && |
457 | tp->window_clamp > 2 * tp->advmss && | 457 | tp->window_clamp > 2 * tp->advmss && |
458 | tp->window_clamp + tp->advmss > maxwin) | 458 | tp->window_clamp + tp->advmss > maxwin) |
459 | tp->window_clamp = max(2 * tp->advmss, maxwin - tp->advmss); | 459 | tp->window_clamp = max(2 * tp->advmss, maxwin - tp->advmss); |