RFC: ANDROID: net: ipv4: tcp: Namespace-ify sysctl_tcp_default_init_rwnd
Signed-off-by: Amit Pundir <amit.pundir@linaro.org>
This commit is contained in:
@@ -159,6 +159,7 @@ struct netns_ipv4 {
|
||||
int sysctl_tcp_invalid_ratelimit;
|
||||
int sysctl_tcp_pacing_ss_ratio;
|
||||
int sysctl_tcp_pacing_ca_ratio;
|
||||
int sysctl_tcp_default_init_rwnd;
|
||||
int sysctl_tcp_wmem[3];
|
||||
int sysctl_tcp_rmem[3];
|
||||
int sysctl_tcp_comp_sack_nr;
|
||||
|
||||
@@ -248,8 +248,6 @@ extern long sysctl_tcp_mem[3];
|
||||
#define TCP_RACK_STATIC_REO_WND 0x2 /* Use static RACK reo wnd */
|
||||
#define TCP_RACK_NO_DUPTHRESH 0x4 /* Do not use DUPACK threshold in RACK */
|
||||
|
||||
extern int sysctl_tcp_default_init_rwnd;
|
||||
|
||||
extern atomic_long_t tcp_memory_allocated;
|
||||
extern struct percpu_counter tcp_sockets_allocated;
|
||||
extern unsigned long tcp_memory_pressure;
|
||||
|
||||
@@ -540,13 +540,6 @@ static struct ctl_table ipv4_table[] = {
|
||||
.mode = 0444,
|
||||
.proc_handler = proc_tcp_available_ulp,
|
||||
},
|
||||
{
|
||||
.procname = "tcp_default_init_rwnd",
|
||||
.data = &sysctl_tcp_default_init_rwnd,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_tcp_default_init_rwnd
|
||||
},
|
||||
{
|
||||
.procname = "icmp_msgs_per_sec",
|
||||
.data = &sysctl_icmp_msgs_per_sec,
|
||||
@@ -1196,6 +1189,13 @@ static struct ctl_table ipv4_net_table[] = {
|
||||
.extra1 = &zero,
|
||||
.extra2 = &thousand,
|
||||
},
|
||||
{
|
||||
.procname = "tcp_default_init_rwnd",
|
||||
.data = &init_net.ipv4.sysctl_tcp_default_init_rwnd,
|
||||
.maxlen = sizeof(int),
|
||||
.mode = 0644,
|
||||
.proc_handler = proc_tcp_default_init_rwnd
|
||||
},
|
||||
{
|
||||
.procname = "tcp_wmem",
|
||||
.data = &init_net.ipv4.sysctl_tcp_wmem,
|
||||
|
||||
@@ -81,7 +81,6 @@
|
||||
#include <net/busy_poll.h>
|
||||
|
||||
int sysctl_tcp_max_orphans __read_mostly = NR_FILE;
|
||||
int sysctl_tcp_default_init_rwnd __read_mostly = TCP_INIT_CWND * 2;
|
||||
|
||||
#define FLAG_DATA 0x01 /* Incoming frame contained data. */
|
||||
#define FLAG_WIN_UPDATE 0x02 /* Incoming ACK was a window update. */
|
||||
|
||||
@@ -2575,6 +2575,7 @@ static int __net_init tcp_sk_init(struct net *net)
|
||||
net->ipv4.sysctl_tcp_invalid_ratelimit = HZ/2;
|
||||
net->ipv4.sysctl_tcp_pacing_ss_ratio = 200;
|
||||
net->ipv4.sysctl_tcp_pacing_ca_ratio = 120;
|
||||
net->ipv4.sysctl_tcp_default_init_rwnd = TCP_INIT_CWND * 2;
|
||||
if (net != &init_net) {
|
||||
memcpy(net->ipv4.sysctl_tcp_rmem,
|
||||
init_net.ipv4.sysctl_tcp_rmem,
|
||||
|
||||
Reference in New Issue
Block a user