Skip to content

RX filtering in DSA

Vladimir Oltean bridge netdev 4 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (refs/heads/master):

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest15 patches 4 repliesApplied 15/15
  2. v414 patches 3 repliesSuperseded
  3. v3 RFC15 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v2 RFC17 patches14 repliesSuperseded

Changes in v5 from the cover letter

- 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

Patches in v5 All 15 applied

#Subject and filesSizeRepliesApplied
1/15net: bridge: use READ_ONCE() and WRITE_ONCE() compiler barriers for fdb->dstnet/bridge/br_fdb.c net/bridge/br_switchdev.c+21 -140 repliesApplied
2/15net: bridge: switchdev: send FDB notifications for host addressesnet/bridge/br_fdb.c net/bridge/br_private.h net/bridge/br_switchdev.c+11 -110 repliesApplied
3/15net: bridge: allow br_fdb_replay to be called for the bridge devicenet/bridge/br_fdb.c+4 -10 repliesApplied
4/15net: dsa: delete dsa_legacy_fdb_add and dsa_legacy_fdb_delDocumentation/networking/dsa/configuration.rst net/dsa/slave.c+68 -230 repliesApplied
5/15net: dsa: introduce dsa_is_upstream_port and dsa_switch_is_upstream_ofinclude/net/dsa.h+26 -00 repliesApplied
6/15net: dsa: introduce a separate cross-chip notifier type for host MDBsnet/dsa/dsa_priv.h net/dsa/port.c net/dsa/slave.c +1 more+92 -80 repliesApplied
7/15net: dsa: reference count the MDB entries at the cross-chip notifier levelinclude/net/dsa.h net/dsa/dsa2.c net/dsa/switch.c+115 -90 repliesApplied
8/15net: dsa: introduce a separate cross-chip notifier type for host FDBsnet/dsa/dsa_priv.h net/dsa/port.c net/dsa/slave.c +1 more+90 -50 repliesApplied
9/15net: dsa: reference count the FDB addresses at the cross-chip notifier levelinclude/net/dsa.h net/dsa/dsa2.c net/dsa/switch.c+88 -70 repliesApplied
10/15net: dsa: install the host MDB and FDB entries in the master's RX filternet/dsa/port.c+24 -00 repliesApplied
11/15net: dsa: sync static FDB entries on foreign interfaces to hardwarenet/dsa/slave.c+8 -40 repliesApplied
12/15net: dsa: include bridge addresses which are local in the host fdb listnet/dsa/slave.c+13 -50 repliesApplied
13/15net: dsa: include fdb entries pointing to bridge in the host fdb listnet/dsa/slave.c+11 -20 repliesApplied
14/15net: dsa: ensure during dsa_fdb_offload_notify that dev_hold and dev_put are on the same devnet/dsa/dsa_priv.h net/dsa/slave.c+5 -50 repliesApplied
15/15net: dsa: replay the local bridge FDB entries pointing to the bridge dev toonet/dsa/port.c+12 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v5 yet.

Read the v5 thread

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

From: Vladimir Oltean <[email protected]>

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/[email protected]/

My additions to Tobias' work come in the form of taking some care that additions and removals of host addresses are properly balanced, so that we can do reference counting on them for cross-chip setups and multiple bridges spanning the same switch (I am working on an NXP board where both are real requirements).

During the last attempted submission of multiple CPU ports for DSA:
https://patchwork.kernel.org/project/netdevbpf/cover/[email protected]/

it became clear that the concept of multiple CPU ports would not be compatible with the idea of address learning on those CPU ports (when those CPU ports are statically assigned to user ports, not in a LAG) unless the switch supports complete FDB isolation, which most switches do not. So DSA needs to manage in software all addresses that are installed on the CPU port(s), which is what this patch set does.

Compared to all earlier attempts, this series does not fiddle with how DSA operates the ports in standalone mode at all, just when bridged. We need to sort that out properly, then any optimization that comes in standalone mode (i.e. IFF_UNICAST_FLT) can come later.

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

Tobias Waldekranz (2):
net: bridge: switchdev: send FDB notifications for host addresses
net: dsa: include bridge addresses which are local in the host fdb
list

Vladimir Oltean (13):
net: bridge: use READ_ONCE() and WRITE_ONCE() compiler barriers for

    fdb->dst

net: bridge: allow br_fdb_replay to be called for the bridge device
net: dsa: delete dsa_legacy_fdb_add and dsa_legacy_fdb_del
net: dsa: introduce dsa_is_upstream_port and dsa_switch_is_upstream_of
net: dsa: introduce a separate cross-chip notifier type for host MDBs
net: dsa: reference count the MDB entries at the cross-chip notifier
level
net: dsa: introduce a separate cross-chip notifier type for host FDBs
net: dsa: reference count the FDB addresses at the cross-chip notifier
level
net: dsa: install the host MDB and FDB entries in the master's RX
filter
net: dsa: sync static FDB entries on foreign interfaces to hardware
net: dsa: include fdb entries pointing to bridge in the host fdb list
net: dsa: ensure during dsa_fdb_offload_notify that dev_hold and
dev_put are on the same dev
net: dsa: replay the local bridge FDB entries pointing to the bridge
dev too

 .../networking/dsa/configuration.rst          |  68 +++++
 include/net/dsa.h                             |  39 +++
 net/bridge/br_fdb.c                           |  37 ++-
 net/bridge/br_private.h                       |   7 +-
 net/bridge/br_switchdev.c                     |  12 +-
 net/dsa/dsa2.c                                |  14 +
 net/dsa/dsa_priv.h                            |  14 +
 net/dsa/port.c                                |  86 ++++++
 net/dsa/slave.c                               | 102 +++----
 net/dsa/switch.c                              | 273 +++++++++++++++++-
 10 files changed, 573 insertions(+), 79 deletions(-)
Signature · 1 line
2.25.1