aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
authorEric Dumazet <edumazet@google.com>2017-10-27 00:55:10 -0400
committerDavid S. Miller <davem@davemloft.net>2017-10-27 03:35:43 -0400
commitaf9b69a7a6ca6b817e8d6f416e7aa5b2a5bf1d91 (patch)
treee7f0fa12f6cbaaa16014e0fa462128ab76877626 /net/ipv4
parent94f0893e0c27219f4a726932618505aab6795973 (diff)
tcp: Namespace-ify sysctl_tcp_frto
Signed-off-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/sysctl_net_ipv4.c14
-rw-r--r--net/ipv4/tcp_input.c3
-rw-r--r--net/ipv4/tcp_ipv4.c1
3 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c
index a95123e1e7da..f1bcb9b7e082 100644
--- a/net/ipv4/sysctl_net_ipv4.c
+++ b/net/ipv4/sysctl_net_ipv4.c
@@ -438,13 +438,6 @@ static struct ctl_table ipv4_table[] = {
438 .extra1 = &one, 438 .extra1 = &one,
439 }, 439 },
440 { 440 {
441 .procname = "tcp_frto",
442 .data = &sysctl_tcp_frto,
443 .maxlen = sizeof(int),
444 .mode = 0644,
445 .proc_handler = proc_dointvec
446 },
447 {
448 .procname = "tcp_min_rtt_wlen", 441 .procname = "tcp_min_rtt_wlen",
449 .data = &sysctl_tcp_min_rtt_wlen, 442 .data = &sysctl_tcp_min_rtt_wlen,
450 .maxlen = sizeof(int), 443 .maxlen = sizeof(int),
@@ -1145,6 +1138,13 @@ static struct ctl_table ipv4_net_table[] = {
1145 .extra1 = &tcp_adv_win_scale_min, 1138 .extra1 = &tcp_adv_win_scale_min,
1146 .extra2 = &tcp_adv_win_scale_max, 1139 .extra2 = &tcp_adv_win_scale_max,
1147 }, 1140 },
1141 {
1142 .procname = "tcp_frto",
1143 .data = &init_net.ipv4.sysctl_tcp_frto,
1144 .maxlen = sizeof(int),
1145 .mode = 0644,
1146 .proc_handler = proc_dointvec
1147 },
1148 { } 1148 { }
1149}; 1149};
1150 1150
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 8ee2c84b0bc6..90d76f1c8f96 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -83,7 +83,6 @@
83int sysctl_tcp_challenge_ack_limit = 1000; 83int sysctl_tcp_challenge_ack_limit = 1000;
84 84
85int sysctl_tcp_max_orphans __read_mostly = NR_FILE; 85int sysctl_tcp_max_orphans __read_mostly = NR_FILE;
86int sysctl_tcp_frto __read_mostly = 2;
87int sysctl_tcp_min_rtt_wlen __read_mostly = 300; 86int sysctl_tcp_min_rtt_wlen __read_mostly = 300;
88int sysctl_tcp_moderate_rcvbuf __read_mostly = 1; 87int sysctl_tcp_moderate_rcvbuf __read_mostly = 1;
89int sysctl_tcp_invalid_ratelimit __read_mostly = HZ/2; 88int sysctl_tcp_invalid_ratelimit __read_mostly = HZ/2;
@@ -2026,7 +2025,7 @@ void tcp_enter_loss(struct sock *sk)
2026 * falsely raise the receive window, which results in repeated 2025 * falsely raise the receive window, which results in repeated
2027 * timeouts and stop-and-go behavior. 2026 * timeouts and stop-and-go behavior.
2028 */ 2027 */
2029 tp->frto = sysctl_tcp_frto && 2028 tp->frto = net->ipv4.sysctl_tcp_frto &&
2030 (new_recovery || icsk->icsk_retransmits) && 2029 (new_recovery || icsk->icsk_retransmits) &&
2031 !inet_csk(sk)->icsk_mtup.probe_size; 2030 !inet_csk(sk)->icsk_mtup.probe_size;
2032} 2031}
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
index 1fe30fb99308..49757c758211 100644
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2492,6 +2492,7 @@ static int __net_init tcp_sk_init(struct net *net)
2492 net->ipv4.sysctl_tcp_dsack = 1; 2492 net->ipv4.sysctl_tcp_dsack = 1;
2493 net->ipv4.sysctl_tcp_app_win = 31; 2493 net->ipv4.sysctl_tcp_app_win = 31;
2494 net->ipv4.sysctl_tcp_adv_win_scale = 1; 2494 net->ipv4.sysctl_tcp_adv_win_scale = 1;
2495 net->ipv4.sysctl_tcp_frto = 2;
2495 2496
2496 net->ipv4.sysctl_tcp_fastopen = TFO_CLIENT_ENABLE; 2497 net->ipv4.sysctl_tcp_fastopen = TFO_CLIENT_ENABLE;
2497 spin_lock_init(&net->ipv4.tcp_fastopen_ctx_lock); 2498 spin_lock_init(&net->ipv4.tcp_fastopen_ctx_lock);