[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1320792301.26025.21.camel@edumazet-laptop>
Date: Tue, 08 Nov 2011 23:45:01 +0100
From: Eric Dumazet <eric.dumazet@...il.com>
To: David Miller <davem@...emloft.net>
Cc: netdev@...r.kernel.org
Subject: Re: [PATCH] neigh: increase unres_qlen by one magnitude
Le mardi 08 novembre 2011 à 17:24 -0500, David Miller a écrit :
> Pretty risky don't you think?
>
Yes :)
> So now we'll allow essentially any remote machine to force us to hold
> on to memory on the order of (32 * num_ips_in_subnet) for each IP
> address configured.
>
Exact limit is 32 * min(num_ips_in_subnet, 1024) : 32768 packets
(because gc_thresh3 is 1024 : max allowed number of neighbors)
> Just spam UDP or ICMP packets with a source address iterating over
> addresses in one of the host's subnets. If the subnet space is
> relatively large, chances are %99 of those IPs won't respond to ARP
> and we'll queue up the ICMP replies.
>
> Probably what will trigger first, actually, is we'll hit the per-cpu
> ICMP socket send buffer limit. Because we won't even get to the
> point in the TX path where we will early orphan the SKB.
>
> So essentially this will stop ICMP responses completely for all
> traffic processed on that cpu.
>
> I realize you're trying to address a very real problem, but I'm just
> not sure at all that unilaterally increasing the value like this is
> safe.
Since you speak of icmp sock, its limit is more governed by cumulative
skb truesizes.
Maybe we can do the same for unres_qlen, and setup a byte limit instead
of 3 packets limit (say 64Kbytes of truesize per destination)
--
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