Commit af9b69a7 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

tcp: Namespace-ify sysctl_tcp_frto

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 94f0893e
...@@ -141,6 +141,7 @@ struct netns_ipv4 { ...@@ -141,6 +141,7 @@ struct netns_ipv4 {
int sysctl_tcp_dsack; int sysctl_tcp_dsack;
int sysctl_tcp_app_win; int sysctl_tcp_app_win;
int sysctl_tcp_adv_win_scale; int sysctl_tcp_adv_win_scale;
int sysctl_tcp_frto;
struct inet_timewait_death_row tcp_death_row; struct inet_timewait_death_row tcp_death_row;
int sysctl_max_syn_backlog; int sysctl_max_syn_backlog;
int sysctl_tcp_fastopen; int sysctl_tcp_fastopen;
......
...@@ -247,7 +247,6 @@ extern int sysctl_tcp_max_orphans; ...@@ -247,7 +247,6 @@ extern int sysctl_tcp_max_orphans;
extern long sysctl_tcp_mem[3]; extern long sysctl_tcp_mem[3];
extern int sysctl_tcp_wmem[3]; extern int sysctl_tcp_wmem[3];
extern int sysctl_tcp_rmem[3]; extern int sysctl_tcp_rmem[3];
extern int sysctl_tcp_frto;
extern int sysctl_tcp_nometrics_save; extern int sysctl_tcp_nometrics_save;
extern int sysctl_tcp_moderate_rcvbuf; extern int sysctl_tcp_moderate_rcvbuf;
extern int sysctl_tcp_tso_win_divisor; extern int sysctl_tcp_tso_win_divisor;
......
...@@ -437,13 +437,6 @@ static struct ctl_table ipv4_table[] = { ...@@ -437,13 +437,6 @@ static struct ctl_table ipv4_table[] = {
.proc_handler = proc_dointvec_minmax, .proc_handler = proc_dointvec_minmax,
.extra1 = &one, .extra1 = &one,
}, },
{
.procname = "tcp_frto",
.data = &sysctl_tcp_frto,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec
},
{ {
.procname = "tcp_min_rtt_wlen", .procname = "tcp_min_rtt_wlen",
.data = &sysctl_tcp_min_rtt_wlen, .data = &sysctl_tcp_min_rtt_wlen,
...@@ -1145,6 +1138,13 @@ static struct ctl_table ipv4_net_table[] = { ...@@ -1145,6 +1138,13 @@ static struct ctl_table ipv4_net_table[] = {
.extra1 = &tcp_adv_win_scale_min, .extra1 = &tcp_adv_win_scale_min,
.extra2 = &tcp_adv_win_scale_max, .extra2 = &tcp_adv_win_scale_max,
}, },
{
.procname = "tcp_frto",
.data = &init_net.ipv4.sysctl_tcp_frto,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec
},
{ } { }
}; };
......
...@@ -83,7 +83,6 @@ ...@@ -83,7 +83,6 @@
int sysctl_tcp_challenge_ack_limit = 1000; int sysctl_tcp_challenge_ack_limit = 1000;
int sysctl_tcp_max_orphans __read_mostly = NR_FILE; int sysctl_tcp_max_orphans __read_mostly = NR_FILE;
int sysctl_tcp_frto __read_mostly = 2;
int sysctl_tcp_min_rtt_wlen __read_mostly = 300; int sysctl_tcp_min_rtt_wlen __read_mostly = 300;
int sysctl_tcp_moderate_rcvbuf __read_mostly = 1; int sysctl_tcp_moderate_rcvbuf __read_mostly = 1;
int sysctl_tcp_invalid_ratelimit __read_mostly = HZ/2; int sysctl_tcp_invalid_ratelimit __read_mostly = HZ/2;
...@@ -2026,7 +2025,7 @@ void tcp_enter_loss(struct sock *sk) ...@@ -2026,7 +2025,7 @@ void tcp_enter_loss(struct sock *sk)
* falsely raise the receive window, which results in repeated * falsely raise the receive window, which results in repeated
* timeouts and stop-and-go behavior. * timeouts and stop-and-go behavior.
*/ */
tp->frto = sysctl_tcp_frto && tp->frto = net->ipv4.sysctl_tcp_frto &&
(new_recovery || icsk->icsk_retransmits) && (new_recovery || icsk->icsk_retransmits) &&
!inet_csk(sk)->icsk_mtup.probe_size; !inet_csk(sk)->icsk_mtup.probe_size;
} }
......
...@@ -2492,6 +2492,7 @@ static int __net_init tcp_sk_init(struct net *net) ...@@ -2492,6 +2492,7 @@ static int __net_init tcp_sk_init(struct net *net)
net->ipv4.sysctl_tcp_dsack = 1; net->ipv4.sysctl_tcp_dsack = 1;
net->ipv4.sysctl_tcp_app_win = 31; net->ipv4.sysctl_tcp_app_win = 31;
net->ipv4.sysctl_tcp_adv_win_scale = 1; net->ipv4.sysctl_tcp_adv_win_scale = 1;
net->ipv4.sysctl_tcp_frto = 2;
net->ipv4.sysctl_tcp_fastopen = TFO_CLIENT_ENABLE; net->ipv4.sysctl_tcp_fastopen = TFO_CLIENT_ENABLE;
spin_lock_init(&net->ipv4.tcp_fastopen_ctx_lock); spin_lock_init(&net->ipv4.tcp_fastopen_ctx_lock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment