🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #739

Re: [PATCH net-next v5 3/3] net: stmmac: add tc mqprio hw queue priority offload

#739
From: Daniel Thompson
Date: Thu, 08 Oct 2026 15:31
47 lines
10873 bytes
On Tue, Oct 06, 2026 at 12:46:27PM +0200, Lorenzo Bianconi wrote:
> Implement the offload of the tc mqprio hw queue priority in the stmmac
> driver. When the mqprio qdisc is configured in channel mode, the MTL TX
> scheduler is switched to strict priority, and the PSTQX/PSTC priority
> bitmask of each TX queue is programmed from the set of frame priorities
> mapped to the owning traffic class (qopt->prio_tc_map).
>
> The channel mode offload requires the DCB hw feature and a 1:1 TC to TX
> queue mapping, with a single queue per TC. Configurations with AVB queues
> are rejected, since forcing strict priority conflicts with the CBS
> algorithm. The CBS offload is refused while the strict-priority scheduler
> is active, and so is a channel count change that would enable an AVB
> queue.

I don't think these CBS offload checks are necessary. It's quite reasonable
to mix strict priority on low priority queues with CBS on higher
priority queues.

In fact on the hardware I have (TC956x) the lower priority queues don't
implement CBS so mixing AVB and DCB queuing (whether SP or ETS) isn't
just reasonable, it's pretty much unavoidable when using CBS!

As a concrete example of combining mqprio and CBS, the following works well on
TC956x (when I tested an older version of your patch):

--- cut here ---
tc qdisc replace dev eth0 handle 100 parent root mqprio num_tc 4 \
    map  0  0  0  0  0  1  2  3  0  0  0  0  0  0  0  0 \
    queues 1@0 1@1 1@2 1@3 mode channel hw 1

# No CBS for TxQ1 means we can't offload this (h/ware stays in SP mode)
tc qdisc replace dev eth0 parent 100:2 handle 102: cbs \
    idleslope 800000 sendslope -1700000 hicredit 494 locredit -1049 \
    offload 0

tc qdisc replace dev eth0 parent 100:3 handle 103: cbs \
    idleslope 400000 sendslope -2100000 hicredit 247 locredit -1296 \
    offload 1

tc qdisc replace dev eth0 parent 100:4 handle 104: cbs \
    idleslope 200000 sendslope -2300000 hicredit 124 locredit -1419 \
    offload 1
--- cut here ---


Daniel.
Technical Details
Message-ID: <ase3UrUehtLY6b_5@aspen.lan>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343075-linux-kernel-netdev=dewy.ru
References: <20261006-stmmac-mqprio-prio-offload-v5-0-d7da93419784@oss.qualcomm.com> <20261006-stmmac-mqprio-prio-offload-v5-3-d7da93419784@oss.qualcomm.com>

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-343075-linux-kernel-netdev=dewy.ru
From: daniel@riscstar.com (Daniel Thompson)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v5 3/3] net: stmmac: add tc mqprio hw queue
 priority offload
Date: Thu, 8 Oct 2026 16:31:30 +0100
Organization: Usenet Network
Message-ID: <ase3UrUehtLY6b_5@aspen.lan>
References: <20261006-stmmac-mqprio-prio-offload-v5-0-d7da93419784@oss.qualcomm.com>
 <20261006-stmmac-mqprio-prio-offload-v5-3-d7da93419784@oss.qualcomm.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Injection-Info: usenet.network;
	logging-data="909507"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:M2kKdlVGcP2SC5uuNxm4HshxlNY= sha256:X7CbXzPYoG7uA4/IrommxrgSY/+4mfqLsECTWscvM/c=
	sha1:ZChqAZ8kuqmOYPJbZF36Uu/J48I= sha256:W0aF/BuS/bL7rLM8a1/GfuWxkJaF4G8r7HV41ASY4sQ=
Content-Disposition: inline
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 38B1110F40B; Thu,  8 Oct 2026 18:32:18 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	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=riscstar-com.20251104.gappssmtp.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 M3JCqBQ8LURX;
	Thu,  8 Oct 2026 18:32:15 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-343075-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=riscstar.com
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id B447310F43F; Thu,  8 Oct 2026 18:32:09 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sin.lore.kernel.org (Postfix) with ESMTP id 31C072937F; Thu,  8 Oct 2026 15:31:41 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 15D904E5354;
	Thu,  8 Oct 2026 15:31:38 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b="sY6uUaJ+"
X-Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47])
	(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 283384E534A
	for <netdev@vger.kernel.org>; Thu,  8 Oct 2026 15:31:35 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.47
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791473498; cv=none; b=D2tXDI9sJfD+L7i61NdRX6QRBWPMxYgCndnn1cITTDDTIgo3NalZXx+4x0JVuSRZuehWkiPPThm7Gajk6nUTMyvn8heAMEJ3BjXetQIJevwyfQhanj6W7QE3CcHogVZqcy8Om4Y+kMvoZzz+xW1rxQ6f0ZDTmSL3colJJL0M3d8=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791473498; c=relaxed/simple;
	bh=HFvTJwDmAn+TXH8HyVkJOIjEbUDFBFuINyH6StAGw3Y=;
	h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version:
	 Content-Type:Content-Disposition:In-Reply-To; b=KJMFlfRNkBhO1LB/4btWkb/VrqYAJiTi7m1WDWob07i3OkToVjVpI2Xvz9w2CUqUktkoD2RfkVIemtz7cd9qZ/qB7bwnUfiukvvEnC9tjMG8IawU/ITvq+k5WoNNNThVu+Gky5Tvo3z0FPPZWc9HeT3sesUXgLjs7pOok0IJ1N8=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com; spf=pass smtp.mailfrom=riscstar.com; dkim=pass (2048-bit key) header.d=riscstar-com.20251104.gappssmtp.com header.i=@riscstar-com.20251104.gappssmtp.com header.b=sY6uUaJ+; arc=none smtp.client-ip=209.85.128.47
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=riscstar.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=riscstar.com
X-Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-4a161d9b8c7so23589605e9.3
        for <netdev@vger.kernel.org>; Thu, 08 Oct 2026 08:31:35 -0700 (PDT)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=riscstar-com.20251104.gappssmtp.com; s=20251104; t=1791473494; x=1792078294; darn=vger.kernel.org;
        h=in-reply-to:content-disposition:content-type:mime-version
         :references:message-id:subject:cc:to:from:date:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=hmRkJrFy7UYNSRUq22nOk7LyP+X+ALUnS3ucJY6ilFU=;
        b=sY6uUaJ+nLxk9DyH39nhdwGNGP8yOpwEJ11SdFVLT3h5gf1MuWCAPj5qU7QGUGPhRI
         h/TrT2BDuFoHG6jKKiC+hBqksBe7a9nD5x0WHpkb/PzRCll3KjJKOnUU31lNeiMR8Y2x
         05Vmshl63IzOYT6xQgu4AUVGWq9a8uYMNJAajLtFkvbvXV2Y0BP9EliuXPAo17vLdzhz
         B7ARDMEMpreSCUkQCQX3/BWjVUWc1cvOiDVwqNJePs9lR010IwwzAQWJcWMmeykBfdXo
         n9s6pLvq4GlU1ZdB08/AuRezA7Qk76ap2YLI/sHnbfE1VfCp1TMYKMcZ0QwulytqPPpk
         5AIQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1791473494; x=1792078294;
        h=in-reply-to:content-disposition:content-type:mime-version
         :references:message-id:subject:cc:to:from:date:x-gm-gg
         :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=hmRkJrFy7UYNSRUq22nOk7LyP+X+ALUnS3ucJY6ilFU=;
        b=PhDLo/voVgWU9vHcqx6m2Yk+Cxr93c+xy7jERUMzWt6sCdUIiDYzXAN0ojHVGgffak
         ub6jiC4tvc6G5wrUU0BTKn4nGXIQ2JRvRdimHUmWrjbfJWqAGxManOCUt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8G6Pv3Ad/X33mfsOlwp4Qlf6/CwcY
	3/F+nC2C/53iC7COBsEGOAX0QTO8wxALXzQCB0EGD59aYczIqvz4MoCGIX4=
X-Received: by 2002:a05:600c:810c:b0:4a1:7e76:d02f with SMTP id 5b1f17b1804b1-4a180424680mr108117585e9.14.1791473493755;
        Thu, 08 Oct 2026 08:31:33 -0700 (PDT)
X-Received: from aspen.lan (aztw-33-b2-v4wan-169864-cust3247.vm26.cable.virginm.net. [92.239.204.176])
        by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a1842abfbdsm74991645e9.4.2026.10.08.08.31.32
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Thu, 08 Oct 2026 08:31:33 -0700 (PDT)
X-Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Vladimir Oltean <olteanv@gmail.com>, Furong Xu <0x1207@gmail.com>,
	netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
	linux-arm-kernel@lists.infradead.org,
	Davide Caratti <dcaratti@redhat.com>
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-In-Reply-To: <20261006-stmmac-mqprio-prio-offload-v5-3-d7da93419784@oss.qualcomm.com>