[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1354293469.3299.81.camel@edumazet-glaptop>
Date: Fri, 30 Nov 2012 08:37:49 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Jesper Dangaard Brouer <brouer@...hat.com>
Cc: David Miller <davem@...emloft.net>, fw@...len.de,
netdev@...r.kernel.org, pablo@...filter.org, tgraf@...g.ch,
amwang@...hat.com, kaber@...sh.net, paulmck@...ux.vnet.ibm.com,
herbert@...dor.hengli.com.au
Subject: Re: [net-next PATCH V2 1/9] net: frag evictor, avoid killing warm
frag queues
On Fri, 2012-11-30 at 16:45 +0100, Jesper Dangaard Brouer wrote:
> On Fri, 2012-11-30 at 06:52 -0800, Eric Dumazet wrote:
>
> > I dont know how you expect that many
> > datagrams being correctly reassembled with ipfrag_high_thresh=262144
>
> That's my point... I'm showing that its not possible, with out current
> implementation!
What I was saying is that the limits are too small, and we should
increase them for this particular need.
This has little to do with the underlying algo.
Assuming we have a hash table size of 1024 buckets, you could
easily add the following :
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index 448e685..bc1bdf9 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -849,13 +849,13 @@ static inline void ip4_frags_ctl_register(void)
static int __net_init ipv4_frags_init_net(struct net *net)
{
/*
- * Fragment cache limits. We will commit 256K at one time. Should we
- * cross that limit we will prune down to 192K. This should cope with
+ * Fragment cache limits. We will commit 4M at one time. Should we
+ * cross that limit we will prune down to 3M. This should cope with
* even the most extreme cases without allowing an attacker to
* measurably harm machine performance.
*/
- net->ipv4.frags.high_thresh = 256 * 1024;
- net->ipv4.frags.low_thresh = 192 * 1024;
+ net->ipv4.frags.high_thresh = 4 << 20;
+ net->ipv4.frags.low_thresh = 3 << 20;
/*
* Important NOTE! Fragment queue must be destroyed before MSL expires.
* RFC791 is wrong proposing to prolongate timer each fragment arrival
--
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