🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #10353

[PATCH net v2 0/5] net: mvneta: fix the TX queue arbitration and the mqprio offload

#10353
From: Josef Schlehofer
Date: Tue, 03 Nov 2026 12:50
54 lines
13199 bytes
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)
Technical Details
Message-ID: <20261103125021.70845-1-pepe.schlehofer@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355605-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-355605-linux-kernel-netdev=dewy.ru
From: pepe.schlehofer@gmail.com (Josef Schlehofer)
Newsgroups: linux.kernel.netdev
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
Organization: Usenet Network
Message-ID: <20261103125021.70845-1-pepe.schlehofer@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3168626"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:kpsiFgeSeUpOEMUS2JR6F0PCRro= sha256:ocxS7dxAUARrqrz304DyWtv1r2gyzyRZl2BEMWisGgc=
	sha1:ubC8HMaBJJiZdA0Md1XGTT989e4= sha256:KhJbEcYOnYb2sPKHb39Qh0lv8W/AJ4812eO5ISef/Io=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 4CCFB112885; Tue,  3 Nov 2026 15:57:22 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.149
X-Spam-Status: No, score=-3.149 tagged_above=-9999 required=6.31
	tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001,
	HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
	autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id hRC5skH3OdkP;
	Tue,  3 Nov 2026 15:57:19 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-355605-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 0418611288C; Tue,  3 Nov 2026 15:57:03 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 5ABAB60A097; Tue,  3 Nov 2026 12:50:53 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793710235;
	b=V8PUSjNwjOTOeDqDGnW3385DggkXR4kGlwkS2lfv0FMpBfj3VO/iw8ydVUlEkR81MQvp
	 aXolS1rUIY90nQ2RZa2YdJvlbCve7dOGxzgKUyg0YwaNd/mQF3skbiN3rEr8TW02d0O8q
	 ZZJzNBb43wNV6AT2ho80N8c26ZboEWpnxup9bwx7dRVaN+/na5yxHgN6RkEwZquqE2uH4
	 d7mj5484WdUliki1wK9Efof+mUmoE6QxRW7GdQDl5XEbQec8S6+g2rsPxt1NFay2FbEB4
	 /oAQeLFUQi9M7xDx3CsImWjvhgvq4brDY0Ro/EoEqwRZX+DgjvQsWGuTXyxsYgoXxZw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793710235;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Transfer-Encoding;
	bh=fVruni02f1KhjN7plFvbiZ0eo1NN/cpMLIaSDj/3PxE=;
	b=EBNjWrqBsanqm01r3bKKp1AbMwIsX/0+xkBBHBleFNJENPI6ir02LHwM3SUf4JHyKlxH
	 1rtpcak19Y0aHk4PVVC0MMoVpTcydLk20/CnsbT4ha+PfJ/ek1BitkSwnOD8ujJR9gPJp
	 Kb9/8iPSqlQTeoonIq2hGN4qf1bXaWrBGy8dRxTIzkEtmpjD9sShWIg8BHO/KCkTVfeeV
	 qpUppZndMV4hR65UQjmZdiZX+GOd7XIP8RoBjS3fb1Vfup+8apCIj2qkmx3WulVN+iuKy
	 fZ4i0bpOn34adIKpT7UkaxNVmGdzunib3K7pAqxuCULqgLGO6zVZ36xCqekq6AXxzNA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=YIj+MeUM;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 74070606D829;
	Tue,  3 Nov 2026 12:50:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=YIj+MeUM
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.45
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793710229;
	b=dGMPheXz/Uh177Z+EIs9NvS13FNY94jaXCiwhvk+XLfnH2+TPuDFBfUPFLBE8s8azh5i
	 Y63lqSGYiv/Z1bE532v0ib5aKSrKa+4QgXnj4uZqZG90DioGNjV3DL0Z8SyTurben1945
	 8/OnkEeNxE0CwN4t8YPYf15aYHd3QjQkBeFxMSzBhPxEj1xDiHRfTyRkPVwmlRuzD+aVC
	 75EMR7OWSBaRXC2DdDiQL+yQ2nFq4qKlOGp3iQ5nNjRPLKHpZJo03kPUwGqh8jq5GBbbn
	 gmAS34mGfM8Jqmw0ajloxIoRvdOOcZPfLi7t7yZ7FqxR1M392WbO8a1j6nRvnZshpvg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793710229;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:MIME-Version:Content-Transfer-Encoding;
	bh=fVruni02f1KhjN7plFvbiZ0eo1NN/cpMLIaSDj/3PxE=;
	b=ImrjknLkg9rViZUUITPGa7Ftw8RyEcDH5qysBJ9Cq2ivABNwZZVjkHIoL4F7hJQeRTcL
	 1uLu6ZOoFDkN19+kn60u5FjBw3tJr68HUCC32VHwXKYSNsEN9YubkhDifItbJ684FO2pD
	 S750fznGcL/H1XJeFqD7X1b5Vw7OLCxumc4dDfogjF3XSZGAzA44QMmq3rjSRi5FDzPCy
	 cWMJVg4dBXahoDw7DR/LcFa+MWwebOx0hC18mKpklI2Ha4wkyPaoD2l5OmSSQVVkmHqIr
	 12uFzRYzTcwg3pXzp4gA8kXmbFJ9td0IHmpRJq7lIVUydTE3qwzQsZsLiJJLYBakKow==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=YIj+MeUM;
	arc=none smtp.remote-ip=209.85.128.45
X-Received: from mail-wm1-f45.google.com (mail-wm1-f45.google.com [209.85.128.45])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3D033606A328
	for <netdev@vger.kernel.org>; Tue,  3 Nov 2026 12:50:29 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3D033606A328
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-wm1-f45.google.com with SMTP id 5b1f17b1804b1-4a2069b9710so35121525e9.2
        for <netdev@vger.kernel.org>; Tue, 03 Nov 2026 04:50:28 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793710227; x=1794315027; darn=vger.kernel.org;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:from:to:cc:subject:date:message-id:reply-to:content-type;
        bh=fVruni02f1KhjN7plFvbiZ0eo1NN/cpMLIaSDj/3PxE=;
        b=YIj+MeUMjk8k95d/WDY+hsdQQifEB+sLygCr+j6LiaDauxHmYHCQsdoXMALt2Z3gYR
         gNUDDujfzjush7WcwUz61uuquLt6mDyhbuHyclPsoEZhsWXjBlHl4eZ1ZsvmW2fXVRM1
         omKLdy9WWdE9KnhD9Ql7fp2ON6SD+ybGzDEEgEcSNkJAFqLZLLCtHITt4uzR6NrJBlKo
         xnEjZ5DtQEp62zYokgQwYQSNvL7+6FaHoTPM4iUZUVpLSo+5zzy7JbcGpZvxL8gJoshb
         tVOXluusG5wtLRUsZEx1AC2y2dZwhbfwCa3UruDw75B64jpHHs4Ami76FJ3FGnUcTocv
         mgHQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793710227; x=1794315027;
        h=content-transfer-encoding:mime-version:message-id:date:subject:cc
         :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date
         :message-id:reply-to:content-type;
        bh=fVruni02f1KhjN7plFvbiZ0eo1NN/cpMLIaSDj/3PxE=;
        b=lwkjwCDn3CZeLTchFhQRqDiou91C6mHsWO3rDaT7nrF5vjeAzoBvNoDyqX2fBdFa7T
         nxe2VLsN5fiWXo59h5ii+rlG5aCCjct0tdx4JIK11qSJDp7O49ogiV4q9Atg5Cjky58x
         KQ2V90X8XNuoUdO/A8JlQsTj9BS+G+Lbwhb0xiMMJurh5aWi9jQRrFCxtzDbc2m4YsRF
         /xyLVgaX+3tgAoiWJ9AE3ae/U39IRv3e/5sjjku5EdFDynTun6gc/VzRdyCRicLn53Vg
         2brmisaDa5HjLszVKbHeDgh6CTt5r0uljcLjHsfY4m5CLICMdZSiqhsV1QNDqWtUTcg8
         RYdQ==
X-Gm-Message-State: APuU4Z+3kFUxI/2T2x+W6Ri6PUHTV8sAwP02qHWA8ByLVzM2F3x4EJ6k
	pE5K1sjjob2sIIC6zrQLQJ1E37O0Td+OWhNt73SBujVwaBaeGLk8JtKfleo/pPwh
X-Gm-Gg: AYBFou3C2U5ypVWNPi8bWKyxEKP18BbYqz5EPIkuIh6yrjf7CdmY3bQpvS+n72yafq/
	+ME91W+VrhvllKBGLBOt3Pufl1SVNGDbGlZO5DcGKZXWRNG8nqykqsvTPbX5lh6nBL3QEhD2sIl
	auXd2LOqQxj9sQ8I5u1gYi+yvS9IGwjJIKDYqpIgU6Jft9WATAH5aUqPX8hMjS8LYwVeVB5Il+A
	dGVRKb5HkvA21Tkh/DmtuER+IN3tZQVERWWiTmjWOkNzZA00UydR1omQ17pMDXjZPJ2SeurUS9Q
	W4gvorPBg3pDA8A9n87AhfTpU7LKKabsJCvGwtuXXxg8lu9Urr96YAs0GCjRiJ/C7Jwf/e9MCnG
	5rd0FXqh4Yroxl4nW5t7AIryTvZOp9+TRrO+Mo1lXmuHYRmq6HWtW1n4EvK+v4a0WFV82ZCbgLB
	b7GRji+VxYTRoATTJblipxh4HY4q9bChxWNRM8RmjIAN0eOibtAjtkm0Z687FZ/8aX7AiyGbrvk
	xzzcFc0nuw2qYDI6C9z/xH7sjxvgELos7kjk5VPPjaBMLBIolMrAZnoc9lEWlNYxE1X4AXn6L+V
	Mv09okht7VEDOakP2f8xqwbiv3eJaWZ6cUJLBIUzX6kR1o5ixQJx78b/zE4zWa1mzhE5osppwPS
	XGGwUUIcwDclFnjWa/xTsFeSyG0/sI+PO8S6xvoqy10KIy7lWZP5/guDqA1kIWg==
X-Received: by 2002:a05:600c:628d:b0:4a1:e01e:1927 with SMTP id 5b1f17b1804b1-4ac17d16a1bmr294497215e9.5.1793710227348;
        Tue, 03 Nov 2026 04:50:27 -0800 (PST)
X-Received: from localhost.localdomain ([2a00:102a:403b:96a2:e8a9:f4a7:ed37:36a3])
        by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4b2a5372d8bsm61406425e9.0.2026.11.03.04.50.25
        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
        Tue, 03 Nov 2026 04:50:25 -0800 (PST)
X-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
X-Mailer: git-send-email 2.54.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list