From: Vladimir Oltean <olteanv@gmail.com> To: Tobias Waldekranz <tobias@waldekranz.com> Cc: davem@davemloft.net, kuba@kernel.org, andrew@lunn.ch, vivien.didelot@gmail.com, f.fainelli@gmail.com, roopa@nvidia.com, nikolay@nvidia.com, netdev@vger.kernel.org, jiri@resnulli.us, idosch@idosch.org, stephen@networkplumber.org Subject: Re: [RFC net-next 2/7] net: bridge: switchdev: Include local flag in FDB notifications Date: Mon, 18 Jan 2021 23:03:40 +0200 [thread overview] Message-ID: <20210118210340.5nlr4bq32nssvhvz@skbuf> (raw) In-Reply-To: <87o8hmj8w0.fsf@waldekranz.com> On Mon, Jan 18, 2021 at 09:19:11PM +0100, Tobias Waldekranz wrote: > > My only hope is that we could just offload the entries pointing towards > > br0, and ignore the local ones. > > That was my initial approach. Unfortunately that breaks down when the > bridge inherits its address from a port, i.e. the default case. > > When the address is added to the bridge (fdb->dst == NULL), fdb_insert > will find the previous local entry that is set on the port and bail out > before sending a notification: > > if (fdb) { > /* it is okay to have multiple ports with same > * address, just use the first one. > */ > if (test_bit(BR_FDB_LOCAL, &fdb->flags)) > return 0; > br_warn(br, "adding interface %s with same address as a received packet (addr:%pM, vlan:%u)\n", > source ? source->dev->name : br->dev->name, addr, vid); > fdb_delete(br, fdb, true); > } > > You could change this so that a notification always is sent out. Or you > could give precedence to !fdb->dst and update the existing entry. I'm afraid my competence ends here. IMO the problem is really the struct net_bridge_port *source argument of fdb_insert. The behavior we want is that all is_local FDB entries are coming from br0, and none from the brports (aka source == NULL, so the callers that had something non-NULL for source should be deleted). "You can't always get what you want" though. > > But for that I would need the bridge maintainers to clarify what is > > the difference between then, as I asked in your other patch. > > I am pretty sure they mean the same thing, I believe that !fdb->dst > implies is_local. It is just that "bridge fdb add ADDR dev br0 self" is > a new(er) thing, and before that there was "local" entries on ports. > Maybe I should try to get rid of the local flag in the bridge first, and > then come back to this problem once that is done? Either way, I agree > that 5/7 is all we want to add to DSA to get this working. Please expand on what you plan to do. The is_local bit is part of the bridge UAPI, how do you plan to get rid of it?
next prev parent reply other threads:[~2021-01-18 21:05 UTC|newest] Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-01-16 1:25 [RFC net-next 0/7] net: dsa: Sync local bridge FDB addresses to hardware Tobias Waldekranz 2021-01-16 1:25 ` [RFC net-next 1/7] net: bridge: switchdev: Refactor br_switchdev_fdb_notify Tobias Waldekranz 2021-01-17 17:24 ` Vladimir Oltean 2021-01-16 1:25 ` [RFC net-next 2/7] net: bridge: switchdev: Include local flag in FDB notifications Tobias Waldekranz 2021-01-17 19:30 ` Vladimir Oltean 2021-01-18 18:58 ` Tobias Waldekranz 2021-01-18 19:27 ` Vladimir Oltean 2021-01-18 20:19 ` Tobias Waldekranz 2021-01-18 21:03 ` Vladimir Oltean [this message] 2021-01-18 21:17 ` Nikolay Aleksandrov 2021-01-18 21:22 ` Nikolay Aleksandrov 2021-01-18 21:39 ` Nikolay Aleksandrov 2021-01-18 21:50 ` Vladimir Oltean 2021-01-18 21:53 ` Nikolay Aleksandrov 2021-01-18 22:06 ` Vladimir Oltean 2021-01-18 22:09 ` Vladimir Oltean 2021-01-18 22:42 ` Nikolay Aleksandrov 2021-01-19 0:42 ` Vladimir Oltean 2021-01-19 10:14 ` Nikolay Aleksandrov 2021-01-18 19:28 ` Ido Schimmel 2021-01-16 1:25 ` [RFC net-next 3/7] net: bridge: switchdev: Send FDB notifications for host addresses Tobias Waldekranz 2021-01-18 11:28 ` Vladimir Oltean 2021-01-16 1:25 ` [RFC net-next 4/7] net: dsa: Include local addresses in assisted CPU port learning Tobias Waldekranz 2021-01-16 1:25 ` [RFC net-next 5/7] net: dsa: Include bridge " Tobias Waldekranz 2021-01-16 1:25 ` [RFC net-next 6/7] net: dsa: Sync static FDB entries on foreign interfaces to hardware Tobias Waldekranz 2021-01-16 1:25 ` [RFC net-next 7/7] net: dsa: mv88e6xxx: Request assisted learning on CPU port Tobias Waldekranz 2021-02-01 6:24 ` DENG Qingfang 2021-02-03 9:27 ` Tobias Waldekranz 2021-02-03 10:14 ` Vladimir Oltean 2021-02-03 10:42 ` Tobias Waldekranz
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=20210118210340.5nlr4bq32nssvhvz@skbuf \ --to=olteanv@gmail.com \ --cc=andrew@lunn.ch \ --cc=davem@davemloft.net \ --cc=f.fainelli@gmail.com \ --cc=idosch@idosch.org \ --cc=jiri@resnulli.us \ --cc=kuba@kernel.org \ --cc=netdev@vger.kernel.org \ --cc=nikolay@nvidia.com \ --cc=roopa@nvidia.com \ --cc=stephen@networkplumber.org \ --cc=tobias@waldekranz.com \ --cc=vivien.didelot@gmail.com \ --subject='Re: [RFC net-next 2/7] net: bridge: switchdev: Include local flag in FDB notifications' \ /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
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).