Re: [Bridge] [PATCH v5 net-next 00/15] RX filtering in DSA

2021-06-29 Thread David Miller
From: Vladimir Oltean Date: Tue, 29 Jun 2021 22:09:23 +0300 > On Tue, Jun 29, 2021 at 09:58:22PM +0300, Vladimir Oltean wrote: >> On Tue, Jun 29, 2021 at 11:52:13AM -0700, David Miller wrote: >> > From: Vladimir Oltean >> > Date: Tue, 29 Jun 2021 17:06:43 +0300 >> > >> > > Changes in v5: >> >

Re: [Bridge] [PATCH v5 net-next 00/15] RX filtering in DSA

2021-06-29 Thread Vladimir Oltean
On Tue, Jun 29, 2021 at 09:58:22PM +0300, Vladimir Oltean wrote: > On Tue, Jun 29, 2021 at 11:52:13AM -0700, David Miller wrote: > > From: Vladimir Oltean > > Date: Tue, 29 Jun 2021 17:06:43 +0300 > > > > > Changes in v5: > > > - added READ_ONCE and WRITE_ONCE for fdb->dst > > > - removed a

Re: [Bridge] [PATCH v5 net-next 00/15] RX filtering in DSA

2021-06-29 Thread Vladimir Oltean
On Tue, Jun 29, 2021 at 11:52:13AM -0700, David Miller wrote: > From: Vladimir Oltean > Date: Tue, 29 Jun 2021 17:06:43 +0300 > > > Changes in v5: > > - added READ_ONCE and WRITE_ONCE for fdb->dst > > - removed a paranoid WARN_ON in DSA > > - added some documentation regarding how 'bridge fdb'

Re: [Bridge] [PATCH v5 net-next 00/15] RX filtering in DSA

2021-06-29 Thread David Miller
From: Vladimir Oltean Date: Tue, 29 Jun 2021 17:06:43 +0300 > Changes in v5: > - added READ_ONCE and WRITE_ONCE for fdb->dst > - removed a paranoid WARN_ON in DSA > - added some documentation regarding how 'bridge fdb' is supposed to be > used with DSA Vlad, I applied v4, could you please

Re: [Bridge] [PATCH v5 net-next 00/15] RX filtering in DSA

2021-06-29 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (refs/heads/master): On Tue, 29 Jun 2021 17:06:43 +0300 you wrote: > From: Vladimir Oltean > > This is my 5th stab at creating a list of unicast and multicast > addresses that the DSA CPU ports must trap. I am reusing a lot of > Tobias's

[Bridge] [PATCH v5 net-next 14/15] net: dsa: ensure during dsa_fdb_offload_notify that dev_hold and dev_put are on the same dev

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean When (a) "dev" is a bridge port which the DSA switch tree offloads, but is otherwise not a dsa slave (such as a LAG netdev), or (b) "dev" is the bridge net device itself then strange things happen to the dev_hold/dev_put pair: dsa_schedule_work() will still be called

[Bridge] [PATCH v5 net-next 15/15] net: dsa: replay the local bridge FDB entries pointing to the bridge dev too

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean When we join a bridge that already has some local addresses pointing to itself, we do not get those notifications. Similarly, when we leave that bridge, we do not get notifications for the deletion of those entries. The only switchdev notifications we get are those of

[Bridge] [PATCH v5 net-next 13/15] net: dsa: include fdb entries pointing to bridge in the host fdb list

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean The bridge supports a legacy way of adding local (non-forwarded) FDB entries, which works on an individual port basis: bridge fdb add dev swp0 00:01:02:03:04:05 master local As well as a new way, added by Roopa Prabhu in commit 3741873b4f73 ("bridge: allow adding of fdb

[Bridge] [PATCH v5 net-next 11/15] net: dsa: sync static FDB entries on foreign interfaces to hardware

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean DSA is able to install FDB entries towards the CPU port for addresses which were dynamically learnt by the software bridge on foreign interfaces that are in the same bridge with a DSA switch interface. Since this behavior is opportunistic, it is guarded by the

[Bridge] [PATCH v5 net-next 12/15] net: dsa: include bridge addresses which are local in the host fdb list

2021-06-29 Thread Vladimir Oltean
From: Tobias Waldekranz The bridge automatically creates local (not forwarded) fdb entries pointing towards physical ports with their interface MAC addresses. For switchdev, the significance of these fdb entries is the exact opposite of that of non-local entries: instead of sending these frame

[Bridge] [PATCH v5 net-next 10/15] net: dsa: install the host MDB and FDB entries in the master's RX filter

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean If the DSA master implements strict address filtering, then the unicast and multicast addresses kept by the DSA CPU ports should be synchronized with the address lists of the DSA master. Note that we want the synchronization of the master's address lists even if the DSA

[Bridge] [PATCH v5 net-next 09/15] net: dsa: reference count the FDB addresses at the cross-chip notifier level

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean The same concerns expressed for host MDB entries are valid for host FDBs just as well: - in the case of multiple bridges spanning the same switch chip, deleting a host FDB entry that belongs to one bridge will result in breakage to the other bridge - not deleting FDB

[Bridge] [PATCH v5 net-next 08/15] net: dsa: introduce a separate cross-chip notifier type for host FDBs

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean DSA treats some bridge FDB entries by trapping them to the CPU port. Currently, the only class of such entries are FDB addresses learnt by the software bridge on a foreign interface. However there are many more to be added: - FDB entries with the is_local flag (for

[Bridge] [PATCH v5 net-next 07/15] net: dsa: reference count the MDB entries at the cross-chip notifier level

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean Ever since the cross-chip notifiers were introduced, the design was meant to be simplistic and just get the job done without worrying too much about dangling resources left behind. For example, somebody installs an MDB entry on sw0p0 in this daisy chain topology. It gets

[Bridge] [PATCH v5 net-next 06/15] net: dsa: introduce a separate cross-chip notifier type for host MDBs

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean Commit abd49535c380 ("net: dsa: execute dsa_switch_mdb_add only for routing port in cross-chip topologies") does a surprisingly good job even for the SWITCHDEV_OBJ_ID_HOST_MDB use case, where DSA simply translates a switchdev object received on dp into a cross-chip notifier

[Bridge] [PATCH v5 net-next 03/15] net: bridge: allow br_fdb_replay to be called for the bridge device

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean When a port joins a bridge which already has local FDB entries pointing to the bridge device itself, we would like to offload those, so allow the "dev" argument to be equal to the bridge too. The code already does what we need in that case. Signed-off-by: Vladimir Oltean

[Bridge] [PATCH v5 net-next 05/15] net: dsa: introduce dsa_is_upstream_port and dsa_switch_is_upstream_of

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean In preparation for the new cross-chip notifiers for host addresses, let's introduce some more topology helpers which we are going to use to discern switches that are in our path towards the dedicated CPU port from switches that aren't. Signed-off-by: Vladimir Oltean ---

[Bridge] [PATCH v5 net-next 02/15] net: bridge: switchdev: send FDB notifications for host addresses

2021-06-29 Thread Vladimir Oltean
From: Tobias Waldekranz Treat addresses added to the bridge itself in the same way as regular ports and send out a notification so that drivers may sync it down to the hardware FDB. Signed-off-by: Tobias Waldekranz Signed-off-by: Vladimir Oltean --- v4->v5: rebased on top of the READ_ONCE

[Bridge] [PATCH v5 net-next 01/15] net: bridge: use READ_ONCE() and WRITE_ONCE() compiler barriers for fdb->dst

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean Annotate the writer side of fdb->dst: - fdb_create() - br_fdb_update() - fdb_add_entry() - br_fdb_external_learn_add() with WRITE_ONCE() and the reader side: - br_fdb_test_addr() - br_fdb_update() - fdb_fill_info() - fdb_add_entry() - fdb_delete_by_addr_and_port() -

[Bridge] [PATCH v5 net-next 00/15] RX filtering in DSA

2021-06-29 Thread Vladimir Oltean
From: Vladimir Oltean This is my 5th stab at creating a list of unicast and multicast addresses that the DSA CPU ports must trap. I am reusing a lot of Tobias's work which he submitted here: https://patchwork.kernel.org/project/netdevbpf/cover/20210116012515.3152-1-tob...@waldekranz.com/ My