Skip to content

net: mvneta: fix the TX queue arbitration and the mqprio offload

Josef Schlehofer lkml netdev 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest6 patches 0 repliesNew
  2. v35 patches 0 repliesSuperseded
  3. v25 patches 5 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches0 repliesSuperseded

Changes in v4 from the cover letter

- 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/[email protected]/
- v2: https://lore.kernel.org/netdev/[email protected]/
- v1: https://lore.kernel.org/netdev/[email protected]/

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

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6net: mvneta: lift the per-queue TX rate limitsdrivers/net/ethernet/marvell/mvneta.c+7 -00 replies
2/6net: mvneta: fix the removal of the mqprio offloaddrivers/net/ethernet/marvell/mvneta.c+4 -30 replies
3/6net: mvneta: check the TX queue range of an mqprio offloaddrivers/net/ethernet/marvell/mvneta.c+2 -10 replies
4/6net: mvneta: keep the TX rate limits across open and MTU changedrivers/net/ethernet/marvell/mvneta.c+30 -10 replies
5/6net: mvneta: validate an mqprio setup before applying itdrivers/net/ethernet/marvell/mvneta.c+44 -460 replies
6/6net: mvneta: serve the TX queues in weighted round robindrivers/net/ethernet/marvell/mvneta.c+55 -10 replies

Reviews trailers per patch

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

PatchMaxime Chevallier
1/6R-b
2/6R-b
3/6
4/6
5/6
6/6

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

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

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/[email protected]/
- v2: https://lore.kernel.org/netdev/[email protected]/
- v1: https://lore.kernel.org/netdev/[email protected]/

[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

Signature · 1 line
2.54.0 (Apple Git-157)