From: Josef Schlehofer <pepe.schlehofer@gmail.com>
To: netdev@vger.kernel.org
Cc: marcin.s.wojtas@gmail.com, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org,
pabeni@redhat.com, maxime.chevallier@bootlin.com, w@1wt.eu,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next v4 0/6] net: mvneta: fix the TX queue arbitration and the mqprio offload
Date: Wed, 18 Nov 2026 10:30:06 +0100 [thread overview]
Message-ID: <20261118093012.90121-1-pepe.schlehofer@gmail.com> (raw)
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@gmail.com/
- v2: https://lore.kernel.org/netdev/20261103125021.70845-1-pepe.schlehofer@gmail.com/
- v1: https://lore.kernel.org/netdev/20261102112816.12322-1-pepe.schlehofer@gmail.com/
[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)
next reply other threads:[~2026-11-18 9:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 9:30 Josef Schlehofer [this message]
2026-11-18 9:30 ` [PATCH net-next v4 1/6] net: mvneta: lift the per-queue TX rate limits Josef Schlehofer
2026-11-18 9:30 ` [PATCH net-next v4 2/6] net: mvneta: fix the removal of the mqprio offload Josef Schlehofer
2026-11-18 9:30 ` [PATCH net-next v4 3/6] net: mvneta: check the TX queue range of an " Josef Schlehofer
2026-11-18 9:30 ` [PATCH net-next v4 4/6] net: mvneta: keep the TX rate limits across open and MTU change Josef Schlehofer
2026-11-18 9:30 ` [PATCH net-next v4 5/6] net: mvneta: validate an mqprio setup before applying it Josef Schlehofer
2026-11-18 9:30 ` [PATCH net-next v4 6/6] net: mvneta: serve the TX queues in weighted round robin Josef Schlehofer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261118093012.90121-1-pepe.schlehofer@gmail.com \
--to=pepe.schlehofer@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcin.s.wojtas@gmail.com \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=w@1wt.eu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox