netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vivien Didelot <vivien.didelot@gmail.com>,
	Tobias Waldekranz <tobias@waldekranz.com>,
	Jiri Pirko <jiri@resnulli.us>, Ido Schimmel <idosch@idosch.org>,
	Roopa Prabhu <roopa@nvidia.com>,
	Nikolay Aleksandrov <nikolay@nvidia.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: [PATCH v2 net-next 0/8] Cleanup for the bridge replay helpers
Date: Sun, 27 Jun 2021 14:54:21 +0300	[thread overview]
Message-ID: <20210627115429.1084203-1-olteanv@gmail.com> (raw)

From: Vladimir Oltean <vladimir.oltean@nxp.com>

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(-)

-- 
2.25.1


             reply	other threads:[~2021-06-27 11:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-27 11:54 Vladimir Oltean [this message]
2021-06-27 11:54 ` [PATCH v2 net-next 1/8] net: bridge: include the is_local bit in br_fdb_replay Vladimir Oltean
2021-06-27 11:54 ` [PATCH v2 net-next 2/8] net: ocelot: delete call to br_fdb_replay Vladimir Oltean
2021-06-27 11:54 ` [PATCH v2 net-next 3/8] net: switchdev: add a context void pointer to struct switchdev_notifier_info Vladimir Oltean
2021-06-27 11:54 ` [PATCH v2 net-next 4/8] net: bridge: ignore switchdev events for LAG ports which didn't request replay Vladimir Oltean
2021-06-27 11:54 ` [PATCH v2 net-next 5/8] net: bridge: constify variables in the replay helpers Vladimir Oltean
2021-06-27 11:54 ` [PATCH v2 net-next 6/8] net: bridge: allow the switchdev replay functions to be called for deletion Vladimir Oltean
2021-06-27 11:54 ` [PATCH v2 net-next 7/8] net: dsa: refactor the prechangeupper sanity checks into a dedicated function Vladimir Oltean
2021-06-27 11:54 ` [PATCH v2 net-next 8/8] net: dsa: replay a deletion of switchdev objects for ports leaving a bridged LAG Vladimir Oltean
2021-06-28 21:20 ` [PATCH v2 net-next 0/8] Cleanup for the bridge replay helpers patchwork-bot+netdevbpf

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=20210627115429.1084203-1-olteanv@gmail.com \
    --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=tobias@waldekranz.com \
    --cc=vivien.didelot@gmail.com \
    --cc=vladimir.oltean@nxp.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).