From: David Miller <davem@davemloft.net>
To: herbert@gondor.apana.org.au
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH 2/2] macvlan: Move broadcasts into a work queue
Date: Sun, 20 Apr 2014 18:20:02 -0400 (EDT) [thread overview]
Message-ID: <20140420.182002.1685565462581318762.davem@davemloft.net> (raw)
In-Reply-To: <20140417054559.GB23959@gondor.apana.org.au>
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: Thu, 17 Apr 2014 13:45:59 +0800
> Currently broadcasts are handled in network RX context, where
> the packets are sent through netif_rx. This means that the number
> of macvlans will be constrained by the capacity of netif_rx.
>
> For example, setting up 4096 macvlans practically causes all
> broadcast packets to be dropped as the default netif_rx queue
> size simply can't handle 4096 skbs being stuffed into it all
> at once.
>
> Fundamentally, we need to ensure that the amount of work handled
> in each netif_rx backlog run is constrained. As broadcasts are
> anything but constrained, it either needs to be limited per run
> or moved to process context.
>
> This patch picks the second option and moves all broadcast handling
> bar the trivial case of packets going to a single interface into
> a work queue. Obviously there also needs to be a limit on how
> many broadcast packets we postpone in this way. I've arbitrarily
> chosen tx_queue_len of the master device as the limit (act_mirred
> also happens to use this parameter in a similar way).
>
> In order to ensure we don't exceed the backlog queue we will use
> netif_rx_ni instead of netif_rx for broadcast packets.
>
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Applied.
next prev parent reply other threads:[~2014-04-20 22:20 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-07 7:53 [0/2] macvlan: Handle broadcasts in work queue Herbert Xu
2014-04-17 5:45 ` [PATCH 1/2] net: Add __dev_forward_skb Herbert Xu
2014-04-20 22:19 ` David Miller
2014-04-17 5:45 ` [PATCH 2/2] macvlan: Move broadcasts into a work queue Herbert Xu
2014-04-20 22:20 ` David Miller [this message]
[not found] <<20140407075347.GA26461@gondor.apana.org.au>
2014-04-07 7:55 ` [PATCH 1/2] net: Add __dev_forward_skb Herbert Xu
2014-04-07 18:48 ` Stephen Hemminger
2014-04-08 7:15 ` Herbert Xu
2014-04-08 16:27 ` David Miller
2014-04-07 7:55 ` [PATCH 2/2] macvlan: Move broadcasts into a work queue Herbert Xu
2014-04-07 14:07 ` Eric Dumazet
2014-04-07 14:23 ` Herbert Xu
2014-04-08 16:48 ` Ben Greear
2014-04-08 17:23 ` Herbert Xu
2014-04-11 1:40 ` David Miller
2014-04-11 1:59 ` Herbert Xu
2014-04-11 2:09 ` Eric Dumazet
2014-04-11 2:13 ` Herbert Xu
2014-04-11 8:45 ` David Laight
2014-04-11 16:11 ` Ben Greear
2014-04-11 16:20 ` Ben Greear
2014-04-11 16:17 ` Ben Greear
2014-04-08 16:55 ` Stephen Hemminger
2014-04-08 17:14 ` Joe Perches
2014-04-09 8:50 ` Herbert Xu
2014-04-09 10:10 ` David Laight
2014-04-10 12:59 ` Herbert Xu
2014-04-10 14:50 ` David Laight
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=20140420.182002.1685565462581318762.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--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;
as well as URLs for NNTP newsgroup(s).