Skip to content

Cleanup for the bridge replay helpers

Vladimir Oltean netdev 2 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. v2 Latest8 patches 0 repliesApplied 8/8
  2. v17 patches 8 repliesSuperseded

Changes in v2 from the cover letter

- fix build issue in patch 4 (function prototype mismatch)
- move switchdev object unsync to the NETDEV_PRECHANGEUPPER code path

Patches in v2 All 8 applied

#Subject and filesSizeRepliesApplied
1/8net: bridge: include the is_local bit in br_fdb_replaynet/bridge/br_fdb.c+1 -00 repliesApplied
2/8net: ocelot: delete call to br_fdb_replaydrivers/net/ethernet/mscc/ocelot_net.c+0 -40 repliesApplied
3/8net: switchdev: add a context void pointer to struct switchdev_notifier_infodrivers/net/ethernet/freescale/dpaa2/dpaa2-switch.c drivers/net/ethernet/marvell/prestera/prestera_switchdev.c drivers/net/ethernet/mellanox/mlx5/core/en/rep/bridge.c +8 more+44 -370 repliesApplied
4/8net: bridge: ignore switchdev events for LAG ports which didn't request replaydrivers/net/ethernet/mscc/ocelot_net.c include/linux/if_bridge.h net/bridge/br_fdb.c +4 more+51 -200 repliesApplied
5/8net: bridge: constify variables in the replay helpersinclude/linux/if_bridge.h net/bridge/br_fdb.c net/bridge/br_mdb.c +1 more+16 -160 repliesApplied
6/8net: bridge: allow the switchdev replay functions to be called for deletiondrivers/net/ethernet/mscc/ocelot_net.c include/linux/if_bridge.h net/bridge/br_fdb.c +3 more+47 -270 repliesApplied
7/8net: dsa: refactor the prechangeupper sanity checks into a dedicated functionnet/dsa/slave.c+29 -150 repliesApplied
8/8net: dsa: replay a deletion of switchdev objects for ports leaving a bridged LAGnet/dsa/dsa_priv.h net/dsa/port.c net/dsa/slave.c+102 -20 repliesApplied

Reviews trailers per patch

6 of 8 patches have a Reviewed-by or Acked-by.

PatchFlorian Fainelli
1/8R-b
2/8R-b
3/8R-b
4/8R-b
5/8R-b
6/8R-b
7/8
8/8

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 net-next 0/8] Cleanup for the bridge replay helpers

From: Vladimir Oltean <[email protected]>

This patch series brings some improvements to the logic added to the bridge and DSA to handle LAG interfaces sandwiched between a bridge and a DSA switch port.

        br0
        /  \
       /    \
     bond0  swp2
     /  \
    /    \

swp0 swp1

In particular, it ensures that the switchdev object additions and deletions are well balanced per physical port. This is important for future work in the area of offloading local bridge FDB entries to hardware in the context of DSA requesting a replay of those entries at bridge join time (this will be submitted in a future patch series). Due to some difficulty ensuring that the deletion of local FDB entries pointing towards the bridge device itself is notified to switchdev in time (before the switchdev port disconnects from the bridge), this is potentially still not the final form in which the replay helpers will exist. I'm thinking about moving from the pull mode (in which DSA requests the replay) to a push mode (in which the bridge initiates the replay). Nonetheless, these preliminary changes are needed either way.

The patch series also addresses some feedback from Nikolai which is long overdue by now (sorry).

Switchdev driver maintainers were deliberately omitted due to the trivial nature of the driver changes (just a function prototype).

Changes in v2:
- fix build issue in patch 4 (function prototype mismatch)
- move switchdev object unsync to the NETDEV_PRECHANGEUPPER code path

Vladimir Oltean (8):
net: bridge: include the is_local bit in br_fdb_replay
net: ocelot: delete call to br_fdb_replay
net: switchdev: add a context void pointer to struct
switchdev_notifier_info
net: bridge: ignore switchdev events for LAG ports which didn't
request replay
net: bridge: constify variables in the replay helpers
net: bridge: allow the switchdev replay functions to be called for
deletion
net: dsa: refactor the prechangeupper sanity checks into a dedicated
function
net: dsa: replay a deletion of switchdev objects for ports leaving a
bridged LAG

 .../ethernet/freescale/dpaa2/dpaa2-switch.c   |   2 +-
 .../marvell/prestera/prestera_switchdev.c     |   6 +-
 .../mellanox/mlx5/core/en/rep/bridge.c        |   3 +
 .../mellanox/mlxsw/spectrum_switchdev.c       |   6 +-
 .../microchip/sparx5/sparx5_switchdev.c       |   2 +-
 drivers/net/ethernet/mscc/ocelot_net.c        |  29 +++--
 drivers/net/ethernet/ti/am65-cpsw-switchdev.c |   6 +-
 drivers/net/ethernet/ti/cpsw_switchdev.c      |   6 +-
 include/linux/if_bridge.h                     |  30 ++---
 include/net/switchdev.h                       |  13 ++-
 net/bridge/br_fdb.c                           |  23 ++--
 net/bridge/br_mdb.c                           |  23 ++--
 net/bridge/br_stp.c                           |   4 +-
 net/bridge/br_vlan.c                          |  15 ++-
 net/dsa/dsa_priv.h                            |   4 +
 net/dsa/port.c                                |  58 +++++++--
 net/dsa/slave.c                               | 110 +++++++++++++++---
 net/switchdev/switchdev.c                     |  25 ++--
 18 files changed, 267 insertions(+), 98 deletions(-)
Signature · 1 line
2.25.1