All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Ido Schimmel <idosch@idosch.org>
Cc: Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, Ioana Ciornei <ioana.ciornei@nxp.com>,
	Vadym Kochan <vkochan@marvell.com>,
	Taras Chornyi <tchornyi@marvell.com>,
	Jiri Pirko <jiri@nvidia.com>, Ido Schimmel <idosch@nvidia.com>,
	Grygorii Strashko <grygorii.strashko@ti.com>,
	Ivan Vecera <ivecera@redhat.com>, Roopa Prabhu <roopa@nvidia.com>,
	Nikolay Aleksandrov <nikolay@nvidia.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vignesh Raghavendra <vigneshr@ti.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-omap@vger.kernel.org,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	Tobias Waldekranz <tobias@waldekranz.com>
Subject: Re: [PATCH resend net-next 2/2] net: bridge: switchdev: include local flag in FDB notifications
Date: Fri, 16 Apr 2021 20:33:19 +0300	[thread overview]
Message-ID: <20210416173319.id4y37ecdmwd2u52@skbuf> (raw)
In-Reply-To: <YHmroFOPM3Hl/5uP@shredder.lan>

On Fri, Apr 16, 2021 at 06:22:08PM +0300, Ido Schimmel wrote:
> On Wed, Apr 14, 2021 at 07:52:56PM +0300, Vladimir Oltean wrote:
> > From: Vladimir Oltean <vladimir.oltean@nxp.com>
> > 
> > As explained in bugfix commit 6ab4c3117aec ("net: bridge: don't notify
> > switchdev for local FDB addresses") as well as in this discussion:
> > https://lore.kernel.org/netdev/20210117193009.io3nungdwuzmo5f7@skbuf/
> > 
> > the switchdev notifiers for FDB entries managed to have a zero-day bug,
> > which was that drivers would not know what to do with local FDB entries,
> > because they were not told that they are local. The bug fix was to
> > simply not notify them of those addresses.
> > 
> > Let us now add the 'is_local' bit to bridge FDB entries, and make all
> > drivers ignore these entries by their own choice.
> > 
> > Co-developed-by: Tobias Waldekranz <tobias@waldekranz.com>
> > Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
> 
> Reviewed-by: Ido Schimmel <idosch@nvidia.com>

Thanks!

> One comment below
> 
> > diff --git a/net/bridge/br_switchdev.c b/net/bridge/br_switchdev.c
> > index c390f84adea2..a5e601e41cb9 100644
> > --- a/net/bridge/br_switchdev.c
> > +++ b/net/bridge/br_switchdev.c
> > @@ -114,13 +114,12 @@ br_switchdev_fdb_notify(const struct net_bridge_fdb_entry *fdb, int type)
> >  		.addr = fdb->key.addr.addr,
> >  		.vid = fdb->key.vlan_id,
> >  		.added_by_user = test_bit(BR_FDB_ADDED_BY_USER, &fdb->flags),
> > +		.is_local = test_bit(BR_FDB_LOCAL, &fdb->flags),
> >  		.offloaded = test_bit(BR_FDB_OFFLOADED, &fdb->flags),
> >  	};
> >  
> >  	if (!fdb->dst)
> >  		return;
> 
> Do you plan to eventually remove this check so that entries pointing to
> the bridge device itself will be notified? For example:
> 
> # bridge fdb add 00:01:02:03:04:05 dev br0 self local
> 
> > -	if (test_bit(BR_FDB_LOCAL, &fdb->flags))
> > -		return;
> >  
> >  	switch (type) {
> >  	case RTM_DELNEIGH:

Yes I do, it's this patch over here:
https://patchwork.kernel.org/project/netdevbpf/patch/20210224114350.2791260-10-olteanv@gmail.com/

One at a time though.

  reply	other threads:[~2021-04-16 17:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 16:52 [PATCH resend net-next 0/2] Pass the BR_FDB_LOCAL information to switchdev drivers Vladimir Oltean
2021-04-14 16:52 ` [PATCH resend net-next 1/2] net: bridge: switchdev: refactor br_switchdev_fdb_notify Vladimir Oltean
2021-04-16 15:19   ` Ido Schimmel
2021-04-19  8:50   ` Nikolay Aleksandrov
2021-04-14 16:52 ` [PATCH resend net-next 2/2] net: bridge: switchdev: include local flag in FDB notifications Vladimir Oltean
2021-04-16 10:11   ` Grygorii Strashko
2021-04-16 15:22   ` Ido Schimmel
2021-04-16 17:33     ` Vladimir Oltean [this message]
2021-04-19  8:51   ` Nikolay Aleksandrov

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=20210416173319.id4y37ecdmwd2u52@skbuf \
    --to=olteanv@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=grygorii.strashko@ti.com \
    --cc=idosch@idosch.org \
    --cc=idosch@nvidia.com \
    --cc=ioana.ciornei@nxp.com \
    --cc=ivecera@redhat.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@nvidia.com \
    --cc=roopa@nvidia.com \
    --cc=tchornyi@marvell.com \
    --cc=tobias@waldekranz.com \
    --cc=vigneshr@ti.com \
    --cc=vivien.didelot@gmail.com \
    --cc=vkochan@marvell.com \
    --cc=vladimir.oltean@nxp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.