Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2 00/13] dpaa2-switch: add support for LAG offload
@ 2026-05-12 13:15 Ioana Ciornei
  2026-05-12 13:15 ` [PATCH net-next v2 01/13] dpaa2-switch: add LAG configuration API Ioana Ciornei
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: Ioana Ciornei @ 2026-05-12 13:15 UTC (permalink / raw)
  To: andrew+netdev, davem, edumazet, kuba, pabeni, netdev; +Cc: linux-kernel

This patch set adds support in dpaa2-switch for offloading upper bond
devices.

The first patch adds the necessary new APIs for the LAG configuration
while the second patch uses them, both in the prechangeupper phase and
the changeupper one. Which ports can be part of the same LAG group is
configurable at boot time, thus we use the prechangeupper callback in
order to validate that a requested configuration can be offloaded or
not.

Patches 3 and 4 are updating the logic around choosing the FDB that
should be used on a switch port. This is necessary since with the
addition of the LAG offload, we need to take into account all ports
which are under the same bridge, even though not directly.

I have considered reordering the set so that patches 3, 4 and 5 are
before the support for LAG offload (patch #2) but decided against it. On
one hand, it would help the review AI bots to have a bit more context
around the FDB setup but the disadvantage is that, at that point, there
are no priv->lag structure populated which can be used.

This set also extends the handling of FDBs and port objects so that they
are handled by the driver even on an offloaded bond device.

Changes in v2:
- Extend dpaa2_switch_prechangeupper_sanity_checks() with
netdev_walk_all_lower_dev() so that checks are done on all lower devices
of a bridge, even for the lowers of a bridged bond.
- Manage better the default VLAN on bond join
- Clean-up the error path in dpaa2_switch_port_bond_join()
- Call dpaa2_switch_port_bridge_leave() in case a port is leaving a bond
which is also a bridged port
- Update dpaa2_switch_port_bond_leave() so that in case of any failure
the driver tries to cleanup the LAG offload configuration.
- Call switchdev_bridge_port_unoffload() in a switch port is leaving a
bridge bond device.
- The rollback in dpaa2_switch_port_mdb_add() uses the newly introduced
dpaa2_switch_port_fdb_del() helper instead of the _mc counterpart.
- Update dpaa2_switch_foreign_dev_check() so that we check if between
the switch port and the foreign net_device is an offloaded path. Before
this change we also checked if the foreign_dev was offloaded or not by
the switch port.
- Update the switchdev_bridge_port_unoffload() by passing it the proper
context and the notifier blocks.
- Add dev_hold() and dev_put() calls for orig_dev
- In case dev_mc_add() fails, remove the MDB address from HW with the
proper function, dpaa2_switch_lag_fdb_del() or
dpaa2_switch_port_fdb_del(), depending on the LAG offload state.
- Fix 32bit build by using BIT_ULL
- Take a reference to port_priv->lag instead of reading it multiple
times.
- Link to v1: https://lore.kernel.org/all/20260506151540.1242997-1-ioana.ciornei@nxp.com/

Ioana Ciornei (13):
  dpaa2-switch: add LAG configuration API
  dpaa2-switch: add support for LAG offload
  dpaa2-switch: change dpaa2_switch_port_set_fdb() function prototype
  dpaa2-switch: extend dpaa2_switch_port_set_fdb() to cover bond
    scenarios
  dpaa2-switch: add dpaa2_switch_port_to_bridge_port() helper
  dpaa2-switch: create a separate dpaa2_switch_port_fdb_event() function
  dpaa2-switch: check early if an FDB entry should be added
  dpaa2-switch: consolidate unicast and multicast management
  dpaa2-switch: offload FDBs added on an upper bond device
  dpaa2-switch: offload port objects on an upper bond device
  dpaa2-switch: trap all link local reserved addresses to the CPU
  dpaa2-switch: add support for imprecise source port
  dpaa2-switch: do not error out when the same VLAN is installed
    multiple times

 .../ethernet/freescale/dpaa2/dpaa2-switch.c   | 952 +++++++++++++++---
 .../ethernet/freescale/dpaa2/dpaa2-switch.h   |  39 +-
 .../net/ethernet/freescale/dpaa2/dpsw-cmd.h   |  18 +-
 drivers/net/ethernet/freescale/dpaa2/dpsw.c   |  57 ++
 drivers/net/ethernet/freescale/dpaa2/dpsw.h   |  20 +
 5 files changed, 966 insertions(+), 120 deletions(-)

-- 
2.25.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2026-05-12 13:23 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-12 13:15 [PATCH net-next v2 00/13] dpaa2-switch: add support for LAG offload Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 01/13] dpaa2-switch: add LAG configuration API Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 02/13] dpaa2-switch: add support for LAG offload Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 03/13] dpaa2-switch: change dpaa2_switch_port_set_fdb() function prototype Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 04/13] dpaa2-switch: extend dpaa2_switch_port_set_fdb() to cover bond scenarios Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 05/13] dpaa2-switch: add dpaa2_switch_port_to_bridge_port() helper Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 06/13] dpaa2-switch: create a separate dpaa2_switch_port_fdb_event() function Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 07/13] dpaa2-switch: check early if an FDB entry should be added Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 08/13] dpaa2-switch: consolidate unicast and multicast management Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 09/13] dpaa2-switch: offload FDBs added on an upper bond device Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 10/13] dpaa2-switch: offload port objects " Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 11/13] dpaa2-switch: trap all link local reserved addresses to the CPU Ioana Ciornei
2026-05-12 13:15 ` [PATCH net-next v2 12/13] dpaa2-switch: add support for imprecise source port Ioana Ciornei
2026-05-12 13:23 ` [PATCH net-next v2 13/13] dpaa2-switch: do not error out when the same VLAN is installed multiple times Ioana Ciornei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox