Skip to content

net: macb: Add TSN MQPRIO and CBS traffic-class offload

Vineeth Karumanchi lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 9 repliesIn review
  2. v14 patches 9 repliesSuperseded

Changes in v2 from the cover letter

- CBS: macb_cbs_get_queue_params() now returns the idleslope register offset instead of a bool flag, and the idleslope is programmed via bp->macb_reg_writel(), dropping the per-queue if/else (patch 4).
- CBS: zero-initialize kset and expand the idleslope conversion comment (patch 4).
- Rebased on net-next, which renamed the struct net_device pointer to "netdev" (was "dev"/"ndev"); no functional change in patches 1-3.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4net: macb: Rename MACB_CAPS_QBV to MACB_CAPS_TCdrivers/net/ethernet/cadence/macb.h drivers/net/ethernet/cadence/macb_main.c+4 -41 reply
2/4net: macb: Move TC capability and PM checks to macb_setup_tc()drivers/net/ethernet/cadence/macb_main.c+13 -101 reply
3/4net: macb: Add MQPRIO qdisc hardware offload supportdrivers/net/ethernet/cadence/macb_main.c+59 -02 replies
4/4net: macb: Add TSN CBS TC offload supportdrivers/net/ethernet/cadence/macb.h drivers/net/ethernet/cadence/macb_main.c+125 -05 replies

Reviews trailers per patch

2 of 4 patches have a Reviewed-by or Acked-by.

PatchThéo Lebrun
1/4R-b
2/4R-b
3/4
4/4

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 net-next v2 0/4] net: macb: Add TSN MQPRIO and CBS traffic-class offload

This series adds TSN traffic-class hardware offload support to the Cadence macb/GEM driver, building on the existing TAPRIO/Qbv infrastructure.

GEM IP versions that implement Qbv (e.g. Versal GEM) also support additional TSN clauses. The series first generalises the existing Qbv capability flag into a traffic-class offload flag and centralises the common ndo_setup_tc() preconditions, then adds two new offloads:

- MQPRIO: traffic-class to hardware-queue mapping, delegating queue count and overlap validation to the mqprio core.

- CBS (Credit-Based Shaper, IEEE 802.1Qav): per-queue idleslope programming on the two highest-priority queues, with the idleslope register value derived from the current link speed (full 32-bit range for high-speed GEM, port-rate factor for standard GEM).

Patches 1 and 2 are preparatory refactors with no functional change. Patches 3 and 4 add the MQPRIO and CBS offloads respectively.

Changes in v2:
- CBS: macb_cbs_get_queue_params() now returns the idleslope register offset instead of a bool flag, and the idleslope is programmed via bp->macb_reg_writel(), dropping the per-queue if/else (patch 4).
- CBS: zero-initialize kset and expand the idleslope conversion comment (patch 4).
- Rebased on net-next, which renamed the struct net_device pointer to "netdev" (was "dev"/"ndev"); no functional change in patches 1-3.

v1: https://lore.kernel.org/netdev/[email protected]/

Vineeth Karumanchi (4):
net: macb: Rename MACB_CAPS_QBV to MACB_CAPS_TC
net: macb: Move TC capability and PM checks to macb_setup_tc()
net: macb: Add MQPRIO qdisc hardware offload support
net: macb: Add TSN CBS TC offload support

 drivers/net/ethernet/cadence/macb.h      |  11 +-
 drivers/net/ethernet/cadence/macb_main.c | 204 +++++++++++++++++++++--
 2 files changed, 201 insertions(+), 14 deletions(-)

base-commit: 548b86839f7fb819a4d6c83b71c73ec378d24275

Signature · 1 line
2.43.0