Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/6] net: dsa: mv8ee6xxx: MQPRIO and 802.1Qat support
@ 2026-06-02  0:43 Luke Howard
  2026-06-02  0:43 ` [PATCH net-next v2 1/6] net: bridge: mdb: add MDB_FLAGS_STREAM_RESERVED flag Luke Howard
                   ` (5 more replies)
  0 siblings, 6 replies; 31+ messages in thread
From: Luke Howard @ 2026-06-02  0:43 UTC (permalink / raw)
  To: Jiri Pirko, Ivan Vecera, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, Nikolay Aleksandrov,
	Ido Schimmel, Andrew Lunn, David Ahern, Shuah Khan, Andrew Lunn,
	Vladimir Oltean
  Cc: netdev, linux-kernel, bridge, linux-kselftest, Max Hunter,
	Kieran Tyrrell, Luke Howard

This patch series introduces the hooks necessary for a user space
implementation of the 802.1Qat Stream Reservation Protocol (SRP) to
enforce admission control of reserved streams using specific frame
priorities and destination MAC addresses. This is typically combined
with a traffic shaper such as the Credit Based Shaper (CBS) so that
bandwidth can be reserved for AVB/TSN streams.

The patch adds a new flag, MDB_FLAGS_STREAM_RESERVED, that marks a
multicast destination address as belonging to a "reserved" stream.
Ingress ports with the new BR_FILTER_STREAM_RESERVED flag set will
drop any frames whose 802.1p priorities map (via MQPRIO/TAPRIO) to
a non-zero traffic class, and whose destination addresses lack a
MDB entry with MDB_FLAGS_STREAM_RESERVED set.

802.1Qat admission control is implemented for both the software
bridge and the Marvell MV88E6XXX switch chips with AVB support.
New tests are added to the former.

Whilst 802.1Qat does permit the use of SRP for unicast destination
addresses, this is relatively uncommon in practice and is not
supported by this patch series.

In order to fully support 802.1Qat with hardware offloading on the
MV88E6XXX switch chips, we added support for MQPRIO to those chips
which have more than one transmit queue, with the following modes:

* AVB mode (MQPRIO DCB mode), which enables AVB features on supporting
  switch chips such as BR_FILTER_STREAM_RESERVED; traffic classes map
  to AVB classes, with TC0 representing non-AVB traffic. This is the
  only MQPRIO mode that supports 802.1Qat stream admission, but it can
  also be used for general traffic classification by not setting the
  BR_FILTER_STREAM_RESERVED on the switch ports. However, it is limited
  to three traffic classes, and the configuration is shared by all ports
  (even on the 88E6390 family of chips).

* Channel mode (MQPRIO channel mode), which does not enable 802.1Qat/AVB
  features but supports a more flexible priority to queue mapping,
  particularly on the 88E6390 family of switches where the mapping can be
  configured per port, rather than per chip. In this mode, traffic classes
  map directly to switch QPris (i.e. queues).

Changes since v1:
- dropped CBS implementation (this is provided separately by Cedric
  Jehasse's patch series [1], and is required for its definition of
  num_tx_queues and qav_info)
- added MQPRIO channel support, as well as per-port queue configuration
  for the 6390 family
- admission control is configured using a bridge port flag rather than
  a device tree entry
- software bridge support for admission control
- Link to v1: https://lore.kernel.org/all/cover.1779841530.git.lukeh@padl.com/

[1] https://lore.kernel.org/all/20260528-net-next-mv88e6xxx-cbs-v4-0-8bd13b906457@luminex.be/

Signed-off-by: Luke Howard <lukeh@padl.com>
---
Luke Howard (6):
      net: bridge: mdb: add MDB_FLAGS_STREAM_RESERVED flag
      net: bridge: convert mdb_entry host_joined to a flags field
      net: bridge: add 802.1Qat stream reservation admission control
      net: bridge: allow MDB_FLAGS_STREAM_RESERVED on host groups
      net: dsa: mv88e6xxx: MQPRIO support
      net: dsa: mv88e6xxx: honour MDB_FLAGS_STREAM_RESERVED for AVB streams

 drivers/net/dsa/mv88e6xxx/Makefile                 |   3 +-
 drivers/net/dsa/mv88e6xxx/avb.c                    | 221 +++++++
 drivers/net/dsa/mv88e6xxx/avb.h                    |  79 +++
 drivers/net/dsa/mv88e6xxx/chip.c                   | 507 +++++++++++++++-
 drivers/net/dsa/mv88e6xxx/chip.h                   |  68 ++-
 drivers/net/dsa/mv88e6xxx/global1.c                |  28 +-
 drivers/net/dsa/mv88e6xxx/global1.h                |   6 +-
 drivers/net/dsa/mv88e6xxx/global1_atu.c            |  17 +
 drivers/net/dsa/mv88e6xxx/global2.h                |   2 +
 drivers/net/dsa/mv88e6xxx/global2_avb.c            | 121 ++++
 drivers/net/dsa/mv88e6xxx/port.c                   |  18 +
 drivers/net/dsa/mv88e6xxx/port.h                   |   2 +
 include/linux/if_bridge.h                          |   1 +
 include/net/switchdev.h                            |   4 +
 include/uapi/linux/if_bridge.h                     |   7 +
 include/uapi/linux/if_link.h                       |   9 +
 net/bridge/Kconfig                                 |  22 +
 net/bridge/br_input.c                              |  61 +-
 net/bridge/br_mdb.c                                | 103 ++--
 net/bridge/br_multicast.c                          |  49 +-
 net/bridge/br_netlink.c                            |   8 +-
 net/bridge/br_private.h                            |  22 +-
 net/bridge/br_switchdev.c                          |  22 +-
 net/core/rtnetlink.c                               |   2 +-
 tools/testing/selftests/net/forwarding/Makefile    |   1 +
 .../net/forwarding/bridge_mdb_stream_reserved.sh   | 653 +++++++++++++++++++++
 tools/testing/selftests/net/forwarding/config      |   2 +
 27 files changed, 1933 insertions(+), 105 deletions(-)
---
base-commit: 0906c117f81c2ae6e6dbfa82719f79c75e1c9325
change-id: 20260602-mv88e6xxx-8021qat-mqprio-46fc466d70e1
prerequisite-change-id: 20260430-net-next-mv88e6xxx-cbs-2121169caa68:v4
prerequisite-patch-id: 8ad59c43368d4639e0cabcc59a7f6e487560d3f7
prerequisite-patch-id: 90cce4d7dadbead4f10cdd0493129b88abf0be75

Best regards,
--  
Luke Howard <lukeh@padl.com>


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

end of thread, other threads:[~2026-06-07  0:02 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-02  0:43 [PATCH net-next v2 0/6] net: dsa: mv8ee6xxx: MQPRIO and 802.1Qat support Luke Howard
2026-06-02  0:43 ` [PATCH net-next v2 1/6] net: bridge: mdb: add MDB_FLAGS_STREAM_RESERVED flag Luke Howard
2026-06-02  0:43 ` [PATCH net-next v2 2/6] net: bridge: convert mdb_entry host_joined to a flags field Luke Howard
2026-06-03  7:38   ` Nikolay Aleksandrov
2026-06-02  0:43 ` [PATCH net-next v2 3/6] net: bridge: add 802.1Qat stream reservation admission control Luke Howard
2026-06-02  1:28   ` Luke Howard
2026-06-03  7:35   ` Nikolay Aleksandrov
2026-06-04  5:39     ` Luke Howard
2026-06-05 12:53       ` Cedric Jehasse
2026-06-05 14:44         ` Andrew Lunn
2026-06-06  8:02           ` Luke Howard
2026-06-06  8:21             ` Nikolay Aleksandrov
2026-06-06 21:49               ` Luke Howard
2026-06-06 22:14                 ` Nikolay Aleksandrov
2026-06-07  0:02                   ` Luke Howard
2026-06-05 22:36         ` Luke Howard
2026-06-02  0:43 ` [PATCH net-next v2 4/6] net: bridge: allow MDB_FLAGS_STREAM_RESERVED on host groups Luke Howard
2026-06-02  0:43 ` [PATCH net-next v2 5/6] net: dsa: mv88e6xxx: MQPRIO support Luke Howard
2026-06-02 12:00   ` Cedric Jehasse
2026-06-02 21:12     ` Luke Howard
2026-06-02 23:48       ` Luke Howard
2026-06-02 23:55         ` Andrew Lunn
2026-06-03  0:15           ` Luke Howard
2026-06-03  1:40             ` Luke Howard
2026-06-03  2:41               ` Andrew Lunn
2026-06-03  3:29                 ` Luke Howard
2026-06-04  6:26                   ` Luke Howard
2026-06-03  2:09       ` Luke Howard
2026-06-03  3:30         ` Luke Howard
     [not found]     ` <808529B1-E40A-4E54-A654-86F1B6D1FA66@padl.com>
2026-06-04  8:36       ` Cedric Jehasse
2026-06-02  0:43 ` [PATCH net-next v2 6/6] net: dsa: mv88e6xxx: honour MDB_FLAGS_STREAM_RESERVED for AVB streams Luke Howard

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