[PATCH net-next v4 0/6] net: mvneta: fix the TX queue arbitration and the mqprio offload

From: Josef Schlehofer

Date: Wed Nov 18 2026 - 04:30:22 EST


The NETA TX arbiter is left at its reset default, fixed priority.
Under load a busy TX queue starves the others. OpenWrt has worked
around this since 2017 by sending all TX traffic of its 32-bit boards
through queue 0 [1].

Patch 6 serves the TX queues in weighted round robin, as mvpp2 does.
With an mqprio offload the fixed priority stays, so a class that fills
the link still starves the lower classes. With the default priority
map this includes ARP, which is in class 0.

Patches 1 to 5 fix older bugs in the mqprio offload, found while
working on patch 6. All of them need an admin to set up an mqprio
offload, and the oops fixed by patch 3 also needs mvneta.txq_number
below rxq_number (both default to 8). v4 therefore targets net-next.
If patches 1 to 5 should go to net instead, I can send them as a
separate series.

With patch 2, replacing an offloaded mqprio qdisc under a new handle
loses the traffic classes of the new qdisc. Patch 2 explains why.

Tested on a Turris Omnia (Armada 385) as net f56daaadfeca plus this
series, which applies unchanged to net-next. Without an offload four
TCP streams got 23.5 Mbit/s each on a 100 Mbit/s link and 232 Mbit/s
each on a 1 Gbit/s link. With an offload the higher class got 94 and
926 Mbit/s. Only the Armada 385 was tested, the version 1 registers
for the Armada 370 and XP come from their manuals, and suspend and
resume were not tested.

Changes in v4:
- Retargeted from net to net-next.
- Patch 5 replaces "unwind a failed mqprio setup" and checks the whole
setup before writing, so a rejected replace keeps the hardware setup
of the attached qdisc (Sashiko). Reviewed-by dropped.
- Patch 3 is new and checks the TX queue range without a shaper too.
- Patches 3 and 4 come before patch 5, so they apply without it.
- Patch 6 also writes the version 1 arbiter registers and keeps the
fixed priority when a setup is rejected.
- Patches 1 and 2 keep their code and their Reviewed-by tags.
- v3: https://lore.kernel.org/netdev/20261104224518.66487-1-pepe.schlehofer@xxxxxxxxx/
- v2: https://lore.kernel.org/netdev/20261103125021.70845-1-pepe.schlehofer@xxxxxxxxx/
- v1: https://lore.kernel.org/netdev/20261102112816.12322-1-pepe.schlehofer@xxxxxxxxx/

[1] https://github.com/openwrt/openwrt/blob/a5e96c837ead549820867bb83c1ad471e39f5ace/target/linux/mvebu/patches-6.18/700-mvneta-tx-queue-workaround.patch

Josef Schlehofer (6):
net: mvneta: lift the per-queue TX rate limits
net: mvneta: fix the removal of the mqprio offload
net: mvneta: check the TX queue range of an mqprio offload
net: mvneta: keep the TX rate limits across open and MTU change
net: mvneta: validate an mqprio setup before applying it
net: mvneta: serve the TX queues in weighted round robin

drivers/net/ethernet/marvell/mvneta.c | 184 +++++++++++++++++++-------
1 file changed, 137 insertions(+), 47 deletions(-)


base-commit: 7ccc5e05043b1bb84326b19a2b05938d8f7a2ae6
--
2.54.0 (Apple Git-157)