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

tcp: Namespace-ify sysctl_tcp_thin_linear_timeouts

Note that sysctl_tcp_thin_dupack was not used, I deleted it.
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e20223f1
...@@ -130,6 +130,7 @@ struct netns_ipv4 { ...@@ -130,6 +130,7 @@ struct netns_ipv4 {
int sysctl_tcp_timestamps; int sysctl_tcp_timestamps;
int sysctl_tcp_early_retrans; int sysctl_tcp_early_retrans;
int sysctl_tcp_recovery; int sysctl_tcp_recovery;
int sysctl_tcp_thin_linear_timeouts;
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;
......
...@@ -263,8 +263,6 @@ extern int sysctl_tcp_moderate_rcvbuf; ...@@ -263,8 +263,6 @@ extern int sysctl_tcp_moderate_rcvbuf;
extern int sysctl_tcp_tso_win_divisor; extern int sysctl_tcp_tso_win_divisor;
extern int sysctl_tcp_workaround_signed_windows; extern int sysctl_tcp_workaround_signed_windows;
extern int sysctl_tcp_slow_start_after_idle; extern int sysctl_tcp_slow_start_after_idle;
extern int sysctl_tcp_thin_linear_timeouts;
extern int sysctl_tcp_thin_dupack;
#define TCP_RACK_LOSS_DETECTION 0x1 /* Use RACK to detect losses */ #define TCP_RACK_LOSS_DETECTION 0x1 /* Use RACK to detect losses */
......
...@@ -620,13 +620,6 @@ static struct ctl_table ipv4_table[] = { ...@@ -620,13 +620,6 @@ static struct ctl_table ipv4_table[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_allowed_congestion_control, .proc_handler = proc_allowed_congestion_control,
}, },
{
.procname = "tcp_thin_linear_timeouts",
.data = &sysctl_tcp_thin_linear_timeouts,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec
},
{ {
.procname = "tcp_min_tso_segs", .procname = "tcp_min_tso_segs",
.data = &sysctl_tcp_min_tso_segs, .data = &sysctl_tcp_min_tso_segs,
...@@ -1145,6 +1138,13 @@ static struct ctl_table ipv4_net_table[] = { ...@@ -1145,6 +1138,13 @@ static struct ctl_table ipv4_net_table[] = {
.mode = 0644, .mode = 0644,
.proc_handler = proc_dointvec, .proc_handler = proc_dointvec,
}, },
{
.procname = "tcp_thin_linear_timeouts",
.data = &init_net.ipv4.sysctl_tcp_thin_linear_timeouts,
.maxlen = sizeof(int),
.mode = 0644,
.proc_handler = proc_dointvec
},
{ } { }
}; };
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
#include <linux/gfp.h> #include <linux/gfp.h>
#include <net/tcp.h> #include <net/tcp.h>
int sysctl_tcp_thin_linear_timeouts __read_mostly;
/** /**
* tcp_write_err() - close socket and save error info * tcp_write_err() - close socket and save error info
* @sk: The socket the error has appeared on. * @sk: The socket the error has appeared on.
...@@ -522,7 +520,7 @@ void tcp_retransmit_timer(struct sock *sk) ...@@ -522,7 +520,7 @@ void tcp_retransmit_timer(struct sock *sk)
* linear-timeout retransmissions into a black hole * linear-timeout retransmissions into a black hole
*/ */
if (sk->sk_state == TCP_ESTABLISHED && if (sk->sk_state == TCP_ESTABLISHED &&
(tp->thin_lto || sysctl_tcp_thin_linear_timeouts) && (tp->thin_lto || net->ipv4.sysctl_tcp_thin_linear_timeouts) &&
tcp_stream_is_thin(tp) && tcp_stream_is_thin(tp) &&
icsk->icsk_retransmits <= TCP_THIN_LINEAR_RETRIES) { icsk->icsk_retransmits <= TCP_THIN_LINEAR_RETRIES) {
icsk->icsk_backoff = 0; icsk->icsk_backoff = 0;
......
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