All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel@riscstar.com>
To: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
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>
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	[thread overview]
Message-ID: <ase3UrUehtLY6b_5@aspen.lan> (raw)
In-Reply-To: <20261006-stmmac-mqprio-prio-offload-v5-3-d7da93419784@oss.qualcomm.com>

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.

  reply	other threads:[~2026-10-08 15:31 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06 10:46 [PATCH net-next v5 0/3] net: stmmac: Introduce hw queue priority offload Lorenzo Bianconi
2026-10-06 10:46 ` [PATCH net-next v5 1/3] net: stmmac: set real_num_tx_queues to max(offset + count) Lorenzo Bianconi
2026-10-06 10:46 ` [PATCH net-next v5 2/3] net: stmmac: align real_num_tx_queues to mqprio configuration Lorenzo Bianconi
2026-10-06 10:46 ` [PATCH net-next v5 3/3] net: stmmac: add tc mqprio hw queue priority offload Lorenzo Bianconi
2026-10-08 15:31   ` Daniel Thompson [this message]
2026-10-12 17:02     ` Paolo Abeni
2026-10-12 21:17       ` Lorenzo Bianconi
2026-10-13 10:24       ` Daniel Thompson
2026-10-06 10:49 ` [PATCH net-next v5 0/3] net: stmmac: Introduce " netdev-bot+sinfo
2026-10-06 12:21   ` Lorenzo Bianconi
2026-10-06 16:18     ` Daniel Thompson
2026-10-12 17:10 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ase3UrUehtLY6b_5@aspen.lan \
    --to=daniel@riscstar.com \
    --cc=0x1207@gmail.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dcaratti@redhat.com \
    --cc=edumazet@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=lorenzo.bianconi@oss.qualcomm.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.