aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/networking/ip-sysctl.txt4
-rw-r--r--net/ipv4/tcp.c9
-rw-r--r--net/ipv4/tcp_input.c2
3 files changed, 8 insertions, 7 deletions
diff --git a/Documentation/networking/ip-sysctl.txt b/Documentation/networking/ip-sysctl.txt
index bd80ba5847d2..1619a8c80873 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -147,7 +147,7 @@ tcp_adv_win_scale - INTEGER
147 (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale), 147 (if tcp_adv_win_scale > 0) or bytes-bytes/2^(-tcp_adv_win_scale),
148 if it is <= 0. 148 if it is <= 0.
149 Possible values are [-31, 31], inclusive. 149 Possible values are [-31, 31], inclusive.
150 Default: 2 150 Default: 1
151 151
152tcp_allowed_congestion_control - STRING 152tcp_allowed_congestion_control - STRING
153 Show/set the congestion control choices available to non-privileged 153 Show/set the congestion control choices available to non-privileged
@@ -410,7 +410,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max
410 net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables 410 net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables
411 automatic tuning of that socket's receive buffer size, in which 411 automatic tuning of that socket's receive buffer size, in which
412 case this value is ignored. 412 case this value is ignored.
413 Default: between 87380B and 4MB, depending on RAM size. 413 Default: between 87380B and 6MB, depending on RAM size.
414 414
415tcp_sack - BOOLEAN 415tcp_sack - BOOLEAN
416 Enable select acknowledgments (SACKS). 416 Enable select acknowledgments (SACKS).
diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 8bb6adeb62c0..1272a88c2a63 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -3243,7 +3243,7 @@ void __init tcp_init(void)
3243{ 3243{
3244 struct sk_buff *skb = NULL; 3244 struct sk_buff *skb = NULL;
3245 unsigned long limit; 3245 unsigned long limit;
3246 int max_share, cnt; 3246 int max_rshare, max_wshare, cnt;
3247 unsigned int i; 3247 unsigned int i;
3248 unsigned long jiffy = jiffies; 3248 unsigned long jiffy = jiffies;
3249 3249
@@ -3303,15 +3303,16 @@ void __init tcp_init(void)
3303 tcp_init_mem(&init_net); 3303 tcp_init_mem(&init_net);
3304 /* Set per-socket limits to no more than 1/128 the pressure threshold */ 3304 /* Set per-socket limits to no more than 1/128 the pressure threshold */
3305 limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7); 3305 limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7);
3306 max_share = min(4UL*1024*1024, limit); 3306 max_wshare = min(4UL*1024*1024, limit);
3307 max_rshare = min(6UL*1024*1024, limit);
3307 3308
3308 sysctl_tcp_wmem[0] = SK_MEM_QUANTUM; 3309 sysctl_tcp_wmem[0] = SK_MEM_QUANTUM;
3309 sysctl_tcp_wmem[1] = 16*1024; 3310 sysctl_tcp_wmem[1] = 16*1024;
3310 sysctl_tcp_wmem[2] = max(64*1024, max_share); 3311 sysctl_tcp_wmem[2] = max(64*1024, max_wshare);
3311 3312
3312 sysctl_tcp_rmem[0] = SK_MEM_QUANTUM; 3313 sysctl_tcp_rmem[0] = SK_MEM_QUANTUM;
3313 sysctl_tcp_rmem[1] = 87380; 3314 sysctl_tcp_rmem[1] = 87380;
3314 sysctl_tcp_rmem[2] = max(87380, max_share); 3315 sysctl_tcp_rmem[2] = max(87380, max_rshare);
3315 3316
3316 pr_info("Hash tables configured (established %u bind %u)\n", 3317 pr_info("Hash tables configured (established %u bind %u)\n",
3317 tcp_hashinfo.ehash_mask + 1, tcp_hashinfo.bhash_size); 3318 tcp_hashinfo.ehash_mask + 1, tcp_hashinfo.bhash_size);
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index d99efd7dfb6c..257b61789eeb 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -85,7 +85,7 @@ int sysctl_tcp_ecn __read_mostly = 2;
85EXPORT_SYMBOL(sysctl_tcp_ecn); 85EXPORT_SYMBOL(sysctl_tcp_ecn);
86int sysctl_tcp_dsack __read_mostly = 1; 86int sysctl_tcp_dsack __read_mostly = 1;
87int sysctl_tcp_app_win __read_mostly = 31; 87int sysctl_tcp_app_win __read_mostly = 31;
88int sysctl_tcp_adv_win_scale __read_mostly = 2; 88int sysctl_tcp_adv_win_scale __read_mostly = 1;
89EXPORT_SYMBOL(sysctl_tcp_adv_win_scale); 89EXPORT_SYMBOL(sysctl_tcp_adv_win_scale);
90 90
91int sysctl_tcp_stdurg __read_mostly; 91int sysctl_tcp_stdurg __read_mostly;