From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net,
roopa@cumulusnetworks.com, bridge@lists.linux-foundation.org,
nbd@nbd.name
Subject: Re: [PATCH net-next] net: bridge: update multicast stats from maybe_deliver()
Date: Thu, 4 Apr 2019 14:21:55 +0200 [thread overview]
Message-ID: <20190404122155.grjs6beng6ubt5gr@salvia> (raw)
In-Reply-To: <952568d9-771f-982c-9a75-5dfc01a461fb@cumulusnetworks.com>
On Thu, Apr 04, 2019 at 03:02:19PM +0300, Nikolay Aleksandrov wrote:
> On 04/04/2019 14:56, Pablo Neira Ayuso wrote:
> > Simplify this code by updating bridge multicast stats from
> > maybe_deliver().
> >
> > Note that commit 6db6f0eae605 ("bridge: multicast to unicast"), in case
> > the port flag BR_MULTICAST_TO_UNICAST is set, never updates the previous
> > port pointer, therefore it is always going to be different from the
> > existing port in this deduplicated list iteration.
> >
> > Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
> > ---
> > net/bridge/br_forward.c | 15 ++++-----------
> > 1 file changed, 4 insertions(+), 11 deletions(-)
This is removing two branches, it is less code to maintain and easier
to read than:
if (prev == p)
> This was intentional, the reason I didn't add that call to maybe_deliver() is to avoid
> these checks for the standard unicast fast-path. We need to avoid touching the mcast
> cache lines (and checks) when using unicast.
maybe_deliver() is called from br_flood() and br_multicast_flood(),
not the standard unicast fast-path.
Thanks.
next prev parent reply other threads:[~2019-04-04 12:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-04 11:56 [PATCH net-next] net: bridge: update multicast stats from maybe_deliver() Pablo Neira Ayuso
2019-04-04 12:02 ` Nikolay Aleksandrov
2019-04-04 12:06 ` Nikolay Aleksandrov
2019-04-04 12:21 ` Pablo Neira Ayuso [this message]
2019-04-04 12:24 ` Nikolay Aleksandrov
2019-04-04 17:50 ` David Miller
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=20190404122155.grjs6beng6ubt5gr@salvia \
--to=pablo@netfilter.org \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.com \
/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