[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100825071701.GA14962@kryten>
Date: Wed, 25 Aug 2010 17:17:01 +1000
From: Anton Blanchard <anton@...ba.org>
To: netdev@...r.kernel.org
Cc: miltonm@....com
Subject: [PATCH] tcp: Fix sysctl_tcp_max_orphans when PAGE_SIZE != 4k
We were hard coding 4096 when sizing sysctl_tcp_max_orphans which
causes problems when PAGE_SIZE is not 4k. We calculate an order based on
PAGE_SHIFT so the count should be based on PAGE_SIZE
Signed-off-By: Milton Miller <miltonm@....com>
Signed-off-by: Anton Blanchard <anton@...ba.org>
---
Index: powerpc.git/net/ipv4/tcp.c
===================================================================
--- powerpc.git.orig/net/ipv4/tcp.c 2010-08-25 17:04:51.190305401 +1000
+++ powerpc.git/net/ipv4/tcp.c 2010-08-25 17:05:15.463884764 +1000
@@ -3270,7 +3270,7 @@ void __init tcp_init(void)
;
if (order >= 4) {
tcp_death_row.sysctl_max_tw_buckets = 180000;
- sysctl_tcp_max_orphans = 4096 << (order - 4);
+ sysctl_tcp_max_orphans = PAGE_SIZE << (order - 4);
sysctl_max_syn_backlog = 1024;
} else if (order < 3) {
tcp_death_row.sysctl_max_tw_buckets >>= (3 - order);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists