Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] neigh: increase unres_qlen by one magnitude
Date: Tue, 08 Nov 2011 23:45:01 +0100	[thread overview]
Message-ID: <1320792301.26025.21.camel@edumazet-laptop> (raw)
In-Reply-To: <20111108.172448.2101648110512252549.davem@davemloft.net>

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)

  reply	other threads:[~2011-11-08 22:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-08 20:11 [PATCH] neigh: increase unres_qlen by one magnitude Eric Dumazet
2011-11-08 22:24 ` David Miller
2011-11-08 22:45   ` Eric Dumazet [this message]
2011-11-08 22:48     ` David Miller
2011-11-09  0:14       ` [PATCH] neigh: replace unres_qlen by unres_qlen_bytes Eric Dumazet
2011-11-09  1:05         ` Stephen Hemminger
2011-11-09  5:18         ` David Miller
2011-11-09  7:55           ` Eric Dumazet
2011-11-09 11:04             ` [PATCH V3 net-next] neigh: new unresolved queue limits Eric Dumazet
2011-11-09 11:10               ` Eric Dumazet

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320792301.26025.21.camel@edumazet-laptop \
    --to=eric.dumazet@gmail.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox