From 4aca87515a5083ae0e31ce3177189fd43b6d05ac Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Sat, 3 Jan 2015 13:58:15 +0100 Subject: patch to Vanilla Tomato 1.28 --- release/src/linux/linux/net/ipv4/route.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'release/src/linux/linux/net/ipv4/route.c') diff --git a/release/src/linux/linux/net/ipv4/route.c b/release/src/linux/linux/net/ipv4/route.c index dfae0871..f3cf20df 100644 --- a/release/src/linux/linux/net/ipv4/route.c +++ b/release/src/linux/linux/net/ipv4/route.c @@ -2465,6 +2465,7 @@ void __init ip_rt_init(void) panic("IP: failed to allocate ip_dst_cache\n"); goal = num_physpages >> (26 - PAGE_SHIFT); +// goal = num_physpages >> (21 - PAGE_SHIFT); for (order = 0; (1UL << order) < goal; order++) /* NOTHING */; @@ -2494,9 +2495,18 @@ void __init ip_rt_init(void) rt_hash_table[i].chain = NULL; } +// ip_rt_max_size = (rt_hash_mask + 1) * 2; +// ipv4_dst_ops.gc_thresh = (ip_rt_max_size / 4); + ipv4_dst_ops.gc_thresh = (rt_hash_mask + 1); ip_rt_max_size = (rt_hash_mask + 1) * 16; +// printk("gc_thresh=%d\n", ipv4_dst_ops.gc_thresh); +// printk("ip_rt_max_size=%d\n", ip_rt_max_size); +// printk("rt_hash_mask=%d\n", rt_hash_mask); +// printk("goal=%d\n", goal); + + devinet_init(); ip_fib_init(); -- cgit v1.2.3-54-g00ecf