From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.128.42 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1793710229; b=ZJ+7fxEzq4l1my4PQI7HFmKucNN3iJYaUmAJ4LP03SET2duWPu2Dfi4i+izBAeDS/zsP bZ0FFT0+6N/95nHV0NGmBeCFY7YaEk9f9UfoGfTx1e/MKI1oAymZWWYHQc0mI+ip8j61S rdAH0mTafI3ZHDROFxb1I0P3myiLo/VbuzIp5AUfD9EdEeS94RpayJKHYTd7CrGXNkeIJ JM/FpYlKcFDnq1MGl7D9VX78R4OQCT5ZS5Bo97lrh0h44gGGea8nhP18Nq3gli5ZPrZHc MuAQqugsvnrWlxIkGXbgKdPQkx22YVu2sqzeDu7uZsyk59/O+dssxCNsHdSQmPKSO5g== 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-Forwarded-Encrypted: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=5GvQFrTr74fPBC9cWiGWWeEPD4J5jPHHmoptq3cVc/MOdDSAuVaECeauQqPaJu3v0dpa EXVzQYbxhiXVrgKn23iCttcNSi7Zv0VYayJ+B6b4IWLILy382JKQayi6vP88pZ0hO45N2 jVlC0XyqYYRZJBRBOWKBEcfDqE59EEv2M/VjG1kLH0SotFYqo3P5WPbinuY4QzBsUuAa6 zJlqZY2XozbIdtAlcgVQIMcAPs+axdu9cDRxRx/Jqh3XVDh08Mlp/94R2/dVTAAPnY9fu +6ONe8cLcAa8YJMnlGcviYHjm6D5MK4G2DeVmTVtxwynLxaZMaPZB7H/aHuAE/rXMow== 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.42 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 36342606A327 for ; Tue, 3 Nov 2026 12:50:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 36342606A327 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com 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 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-4a1fbd52ab6so31213675e9.0 for ; Tue, 03 Nov 2026 04:50:28 -0800 (PST) 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=TyQIgcElD8FYjjmGhqJxfdETE6nsOCIzv/VxGzzQ8/lB4IX/SaSLH8vyWixfy1JNT5 DDLBMXzIK/OyV4oTnygCeRKtPwVRIYa3/+4n7RbBlB4XomZ5xxKHeA0cL98xUS7tTRGW LUpqEsBAPqtVOwF7Zp6WlWowHW0qxLWgwBQi/xn8l/6j0Q07Udj2Xs2q5xlaRnfzJ1/r 9pkCcTQZ6FEwyo49j/4RsdTYjxUKNBsIxrDtn0nwmTyKKXhGCWhGg3inX5YjS/x3jlQG 0Uwr3EWSjBpDjMx2cYCNxcmlOvVvnYlCy+N71MxhJPMPczbULWyWSTMtK1k0+B7M4wGY rsWA== X-Forwarded-Encrypted: i=1; AKwUvBzHXBwO5hj6yB6sShyVUvhjaNg2DHgy0luHNzPzuapj/Knte98siK8YNIqKZ0ki5UypoVZ36fqwd8qSfVw=@vger.kernel.org X-Gm-Message-State: APuU4Z+G78uohvcAh8dxkj/H4r8W5WxNFQBgTTZfKnicyue3yvLgEWB5 HwD0r6RZATGQvPiN21NP6wlZikBBG6IZLY/3Cb5iLpsTk3wpzgbX66bA X-Gm-Gg: AYBFou3R88hO600nSfLEj3yYw0W7Try/f9R7x1sDEnrZNmH3lKTMva6q4VuG9NlnLr6 eZaOux2KrO75OD+yfEJSzkP04JRLSP3coaEz2EnqrB9b+DU3nSDEQKBoqmpvBqeqg8fChwtFCXc hACchfCyIVCCZ3AwYsxctdI9tRT79t8Sm6QXdfw63Ci4M1mNZElEUfTY6kpeIoXYIk5tYjMMg9t re2eaWvq6oJKCGfkU+cStDXwPluXAaSXYGBOTWRWRV2VU6PYYOcfBt2mLoXY5PP9gvDyVs+bbIz zGaVbKafG7F32w8DNfv0me/c2xUUvd4JVP1toivNOtNEV6lF7pKpOLAV+4UeAk6R0oJY5qHNKR+ 8lDUWWJdHkL/08dkFMq16znayxMwj4b4TNNqoFLQ9lmBKgczDuslVdExvo6u/pIJ0tNyEUbBgTS 8SijKylOAoxmqJtBjuVfa/WP/BB4cvbDEV4Kxq8M7+gAH53A72xDS5CFaOZbCS5K0S8YyoCPPrm wLpHja6vwpyt5PBxgffmBGIyCLsA2QLZyHH5vspBoXwKIpodymaDMmqhd7wOlLnTAyKw7c6anaI umF+v1xWaWUFXebYni0KSp+EsTTuehWX539PoJJGfrgg4A/7GXUpFGj6pdOShKOucbkFq4tL+De so0MXXKu467CJpRTyBBr4rNOlUACNtvykxI0/9sPltjoftQZg0ZnRsR+x8hcXbg== 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) 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) From: Josef Schlehofer 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 Message-ID: <20261103125021.70845-1-pepe.schlehofer@gmail.com> X-Mailer: git-send-email 2.54.0 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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)