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 v2 0/5] net: mvneta: fix the TX queue arbitration and the mqprio offload
Date: Tue, 3 Nov 2026 13:50:16 +0100 [thread overview]
Message-ID: <20261103125021.70845-1-pepe.schlehofer@gmail.com> (raw)
The NETA TX arbiter is left at its reset default, which serves the TX
queues in fixed priority. Under load a busy 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 3 serves the queues in weighted round robin. While working on it,
four older bugs in the mqprio offload showed up. Turning the shaper off
leaves the per-queue rate limits in place (patch 1). Deleting the qdisc
never reaches the driver (patch 2). A failed setup is not undone
(patch 4). Opening the interface or changing its MTU sets every rate
limit to 10.23 Mbit/s (patch 5).
The series was tested on a Turris Omnia (Armada 385). The other NETA
variants were not tested, but the driver already programs registers of
the same block (MVNETA_TX_MTU and the token sizes) on all of them.
Suspend and resume were not tested.
With patch 2, replacing an offloaded mqprio qdisc with another mqprio
under a new handle loses the new configuration. The new qdisc is set up
before the old one is torn down, and the driver now acts on that
teardown. Software mqprio loses the configuration in the same way.
Changes in v2:
- Add patches 4 and 5. They fix the pre-existing issues that the
Sashiko review pointed out.
- Patch 1: say that deleting the qdisc reaches the new code only with
patch 2. When MVNETA_REFILL_NUM_CLK_REG was never programmed, the
full rate refill keeps the refill period that the queues have after
mvneta_txq_hw_init() and only raises the tokens, so it is not slower
than before.
- Patch 2: describe the replace case. The v1 cover letter called it an
existing limitation, but before this patch the driver kept the new
configuration.
- Patch 3: add a missing blank line in the commit message.
- No code change in patches 1 to 3. Rebased on current net/main.
- 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 (5):
net: mvneta: lift the per-queue TX rate limits
net: mvneta: fix the removal of the mqprio offload
net: mvneta: serve the TX queues in weighted round robin
net: mvneta: unwind a failed mqprio setup
net: mvneta: keep the TX rate limits across open and MTU change
drivers/net/ethernet/marvell/mvneta.c | 91 +++++++++++++++++++++++----
1 file changed, 80 insertions(+), 11 deletions(-)
base-commit: f56daaadfecae1f760d0fb34385b256d3af68970
--
2.54.0 (Apple Git-157)
next reply other threads:[~2026-11-03 12:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-03 12:50 Josef Schlehofer [this message]
2026-11-03 12:50 ` [PATCH net v2 1/5] net: mvneta: lift the per-queue TX rate limits Josef Schlehofer
2026-11-03 18:56 ` Maxime Chevallier
2026-11-03 12:50 ` [PATCH net v2 2/5] net: mvneta: fix the removal of the mqprio offload Josef Schlehofer
2026-11-03 19:00 ` Maxime Chevallier
2026-11-03 12:50 ` [PATCH net v2 3/5] net: mvneta: serve the TX queues in weighted round robin Josef Schlehofer
2026-11-03 12:50 ` [PATCH net v2 4/5] net: mvneta: unwind a failed mqprio setup Josef Schlehofer
2026-11-03 19:01 ` Maxime Chevallier
2026-11-03 12:50 ` [PATCH net v2 5/5] net: mvneta: keep the TX rate limits across open and MTU change Josef Schlehofer
2026-11-03 18:56 ` [PATCH net v2 0/5] net: mvneta: fix the TX queue arbitration and the mqprio offload Maxime Chevallier
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=20261103125021.70845-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