🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #11359

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

#11359
From: Josef Schlehofer
Date: Wed, 04 Nov 2026 22:45
57 lines
13564 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 5 serves the queues in weighted round robin. mvpp2 also sets its
TX queues to round robin, in mvpp2_defaults_set(). An mqprio offload
keeps the fixed priority, as its traffic classes may rely on it. Without
the offload the queues are served in WRR, also when skbedit or a
software mqprio picks them.

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 3). Opening the interface or changing
its MTU sets every rate limit to 10.23 Mbit/s (patch 4).

The series was tested on a Turris Omnia (Armada 385). With an mqprio
offload and "queues 4@0 4@4" on a 100 Mbit/s link, one stream on queues
4 to 7 got 94 Mbit/s and three streams on queues 0 to 3 got 0.2 Mbit/s
together. 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 under a new handle
with another qdisc that sets traffic classes loses them. The new qdisc
is set up before the old one is torn down, and the driver now acts on
that teardown. The core does the same when the old qdisc is a software
mqprio. A taprio qdisc left without traffic classes sends nothing.

Changes in v3:
- Patch 5 (patch 3 in v2): keep the fixed priority while an mqprio
  offload is set up. Moved to the end of the series.
- Patch 4: braces around the loop bodies.
- Patch 2: the commit message also mentions a taprio replacement. The
  code is unchanged.
- Patches 1 to 3: Reviewed-by tags added.
- 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 (5):
  net: mvneta: lift the per-queue TX rate limits
  net: mvneta: fix the removal of the mqprio offload
  net: mvneta: unwind a failed mqprio setup
  net: mvneta: keep the TX rate limits across open and MTU change
  net: mvneta: serve the TX queues in weighted round robin

 drivers/net/ethernet/marvell/mvneta.c | 112 +++++++++++++++++++++++---
 1 file changed, 100 insertions(+), 12 deletions(-)


base-commit: f56daaadfecae1f760d0fb34385b256d3af68970
-- 
2.54.0 (Apple Git-157)
Technical Details
Message-ID: <20261104224518.66487-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-356982-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-356982-linux-kernel-netdev=dewy.ru
From: pepe.schlehofer@gmail.com (Josef Schlehofer)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v3 0/5] net: mvneta: fix the TX queue arbitration and the mqprio offload
Date: Wed,  4 Nov 2026 23:45:13 +0100
Organization: Usenet Network
Message-ID: <20261104224518.66487-1-pepe.schlehofer@gmail.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3513000"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:1/vYprxsuVBJHQ1vnLqN4LMg08A= sha256:0aJXHHYBmXa7Xqafo+N5osEV2rHA78Zjsei0cHM35JU=
	sha1:b5Ux7f6+eX4A2P5i3EugNW8kxrk= sha256:3srSDwzUpbJe02pQqobJqmOMKeuhjpJ2CI4C2WRoQeM=
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 B399C112DE7; Thu,  5 Nov 2026 02:17:10 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, 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 QOgAce5irojc;
	Thu,  5 Nov 2026 02:17:07 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-356982-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id AFF85112DE6; Thu,  5 Nov 2026 02:16:58 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id A9749141C69; Wed,  4 Nov 2026 22:45:56 +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=1793832331;
	b=0iK5G16zd3uY5X5HbH+7Znj0oa61xWShMKxrfE4JMBAN5ElQcG1rgvwRGofdh4r2/NLH
	 BHao17Rz2gKzKHucvMOdNLNq19UTlaQBQGPq+cng/9JFW+KtE8/9Y6rZcRaJGwM28YZSE
	 idBQ/xqbvJI66d9WMK4wFj7/5Xe6/9sCEATBCRWzw7j1v0RzNcuY5qlw/RDTZ8ihd0ZGd
	 ttCLk6iSwX34MixjKckt3xoPEJVOATOJvWMzSd0lVWZuQ7xAFHawDPaZF6jTbEfXexCTp
	 8JD54TlP+s+6//rs35OLg/WMRZVxYKBpm6vq4vVY/e3UBHj51GUMWlylPBZVw1aCbdw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793832331;
	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=jC7wzUlJenFIhu426Ht6bZZy8FBuUFtiZJAgit2LxZA=;
	b=Y9tl5cUAI9jVLh2WoggCmwLDZjBuoO7zeJESX6C1j6A455ScCdYwsVhIlOrCssLIUXUn
	 i8rf8IKBCPG1KdRh5uRhAiMvB+tnGZXXGIOdAprRN9pIUVoNNI2zrNYK+DzevcfxLd3BN
	 +vyk2K2wK2zwLXfqLTFes5EndP4ufM4SUJS+tWIJZPJ8U4g5Bc/3YxH+xMnPcsKh9ZXxu
	 vpMiyfXOoKH6LTrpaEhayRResnX4u0vlW0jDyyE5AgaFoTDRFdGWei/Z04yKBaFtZ5x6D
	 n4fp06uErF6ztgIJpfLKnlbPHODUGhfVcce+q5/t9Mowb2OkdOFD8NlZC64C+D+paKA==
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=l7kwhkh+;
	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 97F6F606A31B;
	Wed,  4 Nov 2026 22:45:31 +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=l7kwhkh+
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.42
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793832325;
	b=txzxFMlGecor1mZUYZqewvisdjCD/YFVeJsX65Y/6OHfsWuH8X3NaT93WW29E/v21IIg
	 6RC4Tz0LMGQfjM1WMHn9vXuaXeZh61h+N6uHIyB2SrT0bNZO/dhn7v1jM11nkrKZKtiZv
	 1HWCTHExCynu2tujVYCd5atP72KMoyBpvhH37tHngbHYt9kj7jAKnAYa3bCaQJH9a0wv1
	 Pp7tcrts4O9GhWNtTei+74us5P7fY1sPH9sZjqJLtS0DMlEJdQFa3D2MoQyRVyoZnCGpP
	 /XSA2Rn1rG9L7+QX7hHgtULQt3re9CGFNtEAT//hPeLSHC1JzHj/cFE7XCTqwjKELSw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793832325;
	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=jC7wzUlJenFIhu426Ht6bZZy8FBuUFtiZJAgit2LxZA=;
	b=d563mW9F9gjVOxEIx77xkTeDV/s2ceMIVkSwNi3sSLNCBK65NsNQ4ZGNFjWIn4kJu3bj
	 fmXvgT6ZrBYKpvhQdXnLTYBmjcDksflTwRjDxC3vNQFMybDKAq54VY6vlZWW/tGwRsPGD
	 JMPjSLlK9pQDixy/JEd8ANmFQiji6VIDmrP4oZ1KdPldoqARdfiXClzECC8mGg+jl3oW+
	 n/oRY2crRxaPSmb11s047AQNV63F9ky9RoCKg73r2G8Gd2hZ3WyfaIrcx8U2CE/aU825o
	 WycEZNpvqW5t5/+HaC68Rp/27FdAM1r2jJP9kTl+qbarCVjZhSXYldqLd7cSbTt8S+w==
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=l7kwhkh+;
	arc=none smtp.remote-ip=209.85.128.42
X-Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42])
	(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 C2C57606A32D
	for <netdev@vger.kernel.org>; Wed,  4 Nov 2026 22:45:24 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org C2C57606A32D
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-f42.google.com with SMTP id 5b1f17b1804b1-4a549cd7fd2so788085e9.0
        for <netdev@vger.kernel.org>; Wed, 04 Nov 2026 14:45:24 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793832323; x=1794437123; 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=jC7wzUlJenFIhu426Ht6bZZy8FBuUFtiZJAgit2LxZA=;
        b=l7kwhkh+Nt2G/jrfyS1YlKGEnk4++f3fHPPQdRzEtHxZonaOHzEUrY1TrOXe9QtGz3
         YaUb1vGwFSrpU8BMe4QfZLTVBjvjqnqchoEwqpRPCtXZl2hSf3seYmuo3Rw+jC8jY7rZ
         wEoKT/ASSfsPvPvAEgtoRycJCqm8zEmErW/ZEjgZG5eZfhAyp9+YSY/asO+2u/UpwKhz
         mmEMKxogHskLSNyTQcc1MTKfm295P+XWVtqueWjKbmjA2hL1Ufvnfw6qeEvzSXl/jH4/
         j1j+MjLDj0uapJV6QbvPUEVciupzAtkE4SEK4V6snhJ3QJLKTYvlzOr30IETf8eTXrpk
         9gTA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793832323; x=1794437123;
        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=jC7wzUlJenFIhu426Ht6bZZy8FBuUFtiZJAgit2LxZA=;
        b=kZIPz1U2lNJj6oWCTCmcXUtPRq9B9s5PAU0ai4X9W20fThTFJrNcJzXDTm8+n07jZl
         AAVmTLuL6IMlJgh+R70JRQ5UET4T34q7T6HuJ1Cjh5v/M6bjd9I+n+xMbhovd4OhO3MZ
         r0ovWCVbG2P1KSNuy7P9/bxkynQMq+wsWXqOiADfJnPYYAILsZh0MQ+gc6TwNRZXEazz
         2oAWqJw5lSIO8e8Wc0E6+JwaX2B4nzdkRKPYjmtwIcYJPS00oukMm85YoQqvob/I493l
         83/2J8++zlHW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with SMTP id 5b1f17b1804b1-4b55d4f759cmr11989045e9.9.1793832323021;
        Wed, 04 Nov 2026 14:45:23 -0800 (PST)
X-Received: from localhost.localdomain (dynamic-2a00-1028-8388-a84e-947d-5f15-1dc3-a8b4.ipv6.o2.cz. [2a00:1028:8388:a84e:947d:5f15:1dc3:a8b4])
        by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4b4320efc7csm36604235e9.2.2026.11.04.14.45.22
        (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256);
        Wed, 04 Nov 2026 14:45:22 -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