[PATCH net-next v2 0/3] net: stmmac: support up to 16 MTL/DMA queues on XGMAC
From: Sagar Cheluvegowda
Date: Mon Nov 23 2026 - 19:04:33 EST
This series continues Jakub Raczynski's v2 series "Extend MTL/DMA
support to 16 queues":
https://lore.kernel.org/netdev/20260601162537.553512-1-j.raczynski@xxxxxxxxxxx/
Newer XGMAC hardware can have more queues than traffic classes: Qualcomm
Nord is a 25GMAC-based SoC with 12 queues enabled (the core supports 16)
and 8 TCs. The driver assumes one TC per queue and bounds every TC
register write by the number of queues, so the DMA/queue count and the
TC count need to be separated before the queue limit can be raised. This
was raised in the review of the v2 1/3.
1/3: separate the TC count from the queue count. Bound the per TC
registers (ETS, CBS, weight, TC_PRTY) by the number of TCs and
the per priority registers (Qx_TX_FLOW_CTRL, PSRQ) by the 8
priorities, and do the checks in the callers so that errors are
returned to the user. This is a rework of Jakub's v2 1/3.
tc_setup_cbs() is not changed: CBS offload on queues without their
own TC needs the HDMA support, which is not upstream yet.
2/3: extend the RX queue to DMA channel mapping to 16 queues (MAP2/MAP3).
Jakub's v2 2/3 with netdev_err() replaced by WARN_ON(), authorship and
sign-offs kept.
3/3: raise the maximum number of queues to 16. Jakub's v2 3/3 as it was.
The review of Jakub's v2 3/3 asked whether the other cores, whose per queue
registers only cover 8 queues, could now be configured with more. They
cannot: stmmac_hw_init() already limits the number of queues to the
count reported by the HW feature register, which is at most 8 on those
cores.
Changes in v2:
- v1 was the MAP2/MAP3 patch on its own:
https://lore.kernel.org/netdev/20261016193823.2711773-1-sagar.cheluvegowda@xxxxxxxxxxxxxxxx/
Following Jakub's review of it:
https://lore.kernel.org/netdev/atXhR0sgdW84YxcQ@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/
- add 1/3, which splits the TC count from the queue count, as Nord
has 12 queues (the core supports 16) and 8 TCs
- add 3/3, which raises the queue limits, so the MAP2/MAP3 mapping
in 2/3 can be reached
- 2/3 is unchanged
Jakub Raczynski (2):
net/stmmac/dwxgmac: Extend MTL/DMA support to 16 queues
include/stmmac: Increase max DMA/MTL channel count from 8 to 16
Sagar Cheluvegowda (1):
net: stmmac: separate the TC count from the queue count on XGMAC
.../net/ethernet/stmicro/stmmac/dwxgmac2.h | 3 +++
.../ethernet/stmicro/stmmac/dwxgmac2_core.c | 23 ++++++++++++++++---
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 17 ++++++++++++++
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 22 +++++++++++-------
.../net/ethernet/stmicro/stmmac/stmmac_tc.c | 21 ++++++++++-------
include/linux/stmmac.h | 6 ++---
6 files changed, 70 insertions(+), 22 deletions(-)
--
2.34.1