Subject: [PATCH net-next 0/6] net: dsa: mv88e6xxx: add MQPRIO/CBS offload

From: Luke Howard <[email-masked]>
Date: Wed, 27 May 2026 10:42:46 +1000

This series adds hardware offload of 802.1Qav (Credit Based Shaper) for
conforming Marvell switches. It also introduces a new bridge MDB flag,
MDB_FLAGS_STREAM_RESERVED, that userspace can set on RTM_NEWMDB to mark a
multicast destination as belonging to a reserved stream; the flag is
propagated through switchdev to hardware drivers that can enforce
admission of AVB / SR priority traffic only to flagged destinations.

The patches were originally proposed as an RFC in September 2025 [1], but have
been updated to absorb most of Cedric Jehasse's recent CBS changes [2] (with
the exception of support for more than two shaped queues). The principal
application is hardware-offloaded switching of AVB/TSN traffic rather than
host-initiated traffic.

In addition to programming the per-queue shaper, the following related
registers are configured:

* global isochronous queue pointer threshold
* strict-priority queue scheduling while CBS is active on a port
* in Enhanced/Secure AVB mode, hardware drops frames with AVB priorities
  whose destination MAC has not been added to the MDB with the new
  MDB_FLAGS_STREAM_RESERVED flag

A more detailed overview is given in drivers/net/dsa/mv88e6xxx/avb.h.

Support for MDB_FLAGS_STREAM_RESERVED in the software bridge will be submitted
as a separate patch series.

[1] https://lore.kernel.org/netdev/[email-masked]/
[2] https://lore.kernel.org/netdev/[email-masked]/

Luke Howard (6):
  net: bridge: mdb: add MDB_FLAGS_STREAM_RESERVED flag
  net: dsa: mv88e6xxx: add num_tx_queues to chip info structure
  net: dsa: mv88e6xxx: add MV88E6XXX_G1_ATU_CTL_MAC_AVB setter
  net: dsa: mv88e6xxx: MQPRIO support
  net: dsa: mv88e6xxx: CBS support
  dt-bindings: net: dsa: mv88e6xxx: add mv88e6xxx-avb-mode property

 .../bindings/net/dsa/marvell,mv88e6xxx.yaml   |  26 +
 drivers/net/dsa/mv88e6xxx/Makefile            |   3 +-
 drivers/net/dsa/mv88e6xxx/avb.c               | 633 ++++++++++++++++++
 drivers/net/dsa/mv88e6xxx/avb.h               | 228 +++++++
 drivers/net/dsa/mv88e6xxx/chip.c              | 372 +++++++++-
 drivers/net/dsa/mv88e6xxx/chip.h              | 101 +++
 drivers/net/dsa/mv88e6xxx/global1.c           |   9 +-
 drivers/net/dsa/mv88e6xxx/global1.h           |  47 +-
 drivers/net/dsa/mv88e6xxx/global1_atu.c       |  17 +
 drivers/net/dsa/mv88e6xxx/global2.h           |  14 +-
 drivers/net/dsa/mv88e6xxx/global2_avb.c       | 205 +++++-
 drivers/net/dsa/mv88e6xxx/port.c              |  54 ++
 drivers/net/dsa/mv88e6xxx/port.h              |  22 +
 include/linux/platform_data/mv88e6xxx.h       |   1 +
 include/net/switchdev.h                       |   4 +
 include/uapi/linux/if_bridge.h                |   2 +
 net/bridge/br_mdb.c                           |  12 +
 net/bridge/br_private.h                       |   2 +
 net/bridge/br_switchdev.c                     |  17 +-
 19 files changed, 1744 insertions(+), 25 deletions(-)
 create mode 100644 drivers/net/dsa/mv88e6xxx/avb.c
 create mode 100644 drivers/net/dsa/mv88e6xxx/avb.h

-- 
2.43.0