diff options
author | Eric Dumazet <edumazet@google.com> | 2017-10-27 10:47:28 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-28 06:24:39 -0400 |
commit | bd239704295c66196e6b77c5717ec4aec076ddd5 (patch) | |
tree | 26e8dc3319b42d82ec0210017f0529c284da5cf4 /net | |
parent | 26e9596e5b8f11025b57b12e7265df649129ab00 (diff) |
tcp: Namespace-ify sysctl_tcp_min_rtt_wlen
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/ipv4/sysctl_net_ipv4.c | 14 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 3 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 1 |
3 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv4/sysctl_net_ipv4.c b/net/ipv4/sysctl_net_ipv4.c index 00b4aea3705b..029692d2e4ae 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_min_rtt_wlen", | ||
442 | .data = &sysctl_tcp_min_rtt_wlen, | ||
443 | .maxlen = sizeof(int), | ||
444 | .mode = 0644, | ||
445 | .proc_handler = proc_dointvec | ||
446 | }, | ||
447 | { | ||
448 | .procname = "tcp_low_latency", | 441 | .procname = "tcp_low_latency", |
449 | .data = &sysctl_tcp_low_latency, | 442 | .data = &sysctl_tcp_low_latency, |
450 | .maxlen = sizeof(int), | 443 | .maxlen = sizeof(int), |
@@ -1145,6 +1138,13 @@ static struct ctl_table ipv4_net_table[] = { | |||
1145 | .extra1 = &one, | 1138 | .extra1 = &one, |
1146 | .extra2 = &gso_max_segs, | 1139 | .extra2 = &gso_max_segs, |
1147 | }, | 1140 | }, |
1141 | { | ||
1142 | .procname = "tcp_min_rtt_wlen", | ||
1143 | .data = &init_net.ipv4.sysctl_tcp_min_rtt_wlen, | ||
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 928048a4e2c5..da1ef666d1f9 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -80,7 +80,6 @@ | |||
80 | #include <linux/static_key.h> | 80 | #include <linux/static_key.h> |
81 | 81 | ||
82 | int sysctl_tcp_max_orphans __read_mostly = NR_FILE; | 82 | int sysctl_tcp_max_orphans __read_mostly = NR_FILE; |
83 | int sysctl_tcp_min_rtt_wlen __read_mostly = 300; | ||
84 | int sysctl_tcp_invalid_ratelimit __read_mostly = HZ/2; | 83 | int sysctl_tcp_invalid_ratelimit __read_mostly = HZ/2; |
85 | 84 | ||
86 | #define FLAG_DATA 0x01 /* Incoming frame contained data. */ | 85 | #define FLAG_DATA 0x01 /* Incoming frame contained data. */ |
@@ -2915,8 +2914,8 @@ static void tcp_fastretrans_alert(struct sock *sk, const int acked, | |||
2915 | 2914 | ||
2916 | static void tcp_update_rtt_min(struct sock *sk, u32 rtt_us) | 2915 | static void tcp_update_rtt_min(struct sock *sk, u32 rtt_us) |
2917 | { | 2916 | { |
2917 | u32 wlen = sock_net(sk)->ipv4.sysctl_tcp_min_rtt_wlen * HZ; | ||
2918 | struct tcp_sock *tp = tcp_sk(sk); | 2918 | struct tcp_sock *tp = tcp_sk(sk); |
2919 | u32 wlen = sysctl_tcp_min_rtt_wlen * HZ; | ||
2920 | 2919 | ||
2921 | minmax_running_min(&tp->rtt_min, wlen, tcp_jiffies32, | 2920 | minmax_running_min(&tp->rtt_min, wlen, tcp_jiffies32, |
2922 | rtt_us ? : jiffies_to_usecs(1)); | 2921 | rtt_us ? : jiffies_to_usecs(1)); |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 6192f26145d3..ced35af5737a 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -2504,6 +2504,7 @@ static int __net_init tcp_sk_init(struct net *net) | |||
2504 | /* rfc5961 challenge ack rate limiting */ | 2504 | /* rfc5961 challenge ack rate limiting */ |
2505 | net->ipv4.sysctl_tcp_challenge_ack_limit = 1000; | 2505 | net->ipv4.sysctl_tcp_challenge_ack_limit = 1000; |
2506 | net->ipv4.sysctl_tcp_min_tso_segs = 2; | 2506 | net->ipv4.sysctl_tcp_min_tso_segs = 2; |
2507 | net->ipv4.sysctl_tcp_min_rtt_wlen = 300; | ||
2507 | 2508 | ||
2508 | net->ipv4.sysctl_tcp_fastopen = TFO_CLIENT_ENABLE; | 2509 | net->ipv4.sysctl_tcp_fastopen = TFO_CLIENT_ENABLE; |
2509 | spin_lock_init(&net->ipv4.tcp_fastopen_ctx_lock); | 2510 | spin_lock_init(&net->ipv4.tcp_fastopen_ctx_lock); |