[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210416173319.id4y37ecdmwd2u52@skbuf>
Date: Fri, 16 Apr 2021 20:33:19 +0300
From: Vladimir Oltean <olteanv@...il.com>
To: Ido Schimmel <idosch@...sch.org>
Cc: Jakub Kicinski <kuba@...nel.org>,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Ioana Ciornei <ioana.ciornei@....com>,
Vadym Kochan <vkochan@...vell.com>,
Taras Chornyi <tchornyi@...vell.com>,
Jiri Pirko <jiri@...dia.com>, Ido Schimmel <idosch@...dia.com>,
Grygorii Strashko <grygorii.strashko@...com>,
Ivan Vecera <ivecera@...hat.com>,
Roopa Prabhu <roopa@...dia.com>,
Nikolay Aleksandrov <nikolay@...dia.com>,
Andrew Lunn <andrew@...n.ch>,
Vivien Didelot <vivien.didelot@...il.com>,
Florian Fainelli <f.fainelli@...il.com>,
Vignesh Raghavendra <vigneshr@...com>,
Linus Walleij <linus.walleij@...aro.org>,
linux-omap@...r.kernel.org,
Vladimir Oltean <vladimir.oltean@....com>,
Tobias Waldekranz <tobias@...dekranz.com>
Subject: Re: [PATCH resend net-next 2/2] net: bridge: switchdev: include
local flag in FDB notifications
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@....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@...dekranz.com>
> > Signed-off-by: Tobias Waldekranz <tobias@...dekranz.com>
> > Signed-off-by: Vladimir Oltean <vladimir.oltean@....com>
>
> Reviewed-by: Ido Schimmel <idosch@...dia.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.
Powered by blists - more mailing lists