From: Kurt Kanzenbach <kurt@linutronix.de>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
Lorenzo Bianconi <lorenzo@kernel.org>
Subject: Re: [PATCH net-next] net: stmmac: stm32: Set TSO/TBS Tx queues default settings
Date: Wed, 19 Aug 2026 09:35:40 +0200 [thread overview]
Message-ID: <87h5kq1s1f.fsf@jax.kurt.home> (raw)
In-Reply-To: <20260818075335.48936b08@kernel.org>
[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]
On Tue Aug 18 2026, Jakub Kicinski wrote:
> On Tue, 18 Aug 2026 08:57:08 +0200 Kurt Kanzenbach wrote:
>> On Mon Aug 17 2026, Jakub Kicinski wrote:
>> > On Wed, 12 Aug 2026 08:28:57 +0200 Kurt Kanzenbach wrote:
>> >> TSO and TBS cannot coexist. Use the first queue with TSO and the rest for
>> >> TBS. Tx queues with TBS can support etf qdisc hw offload. This is done
>> >> similar to dwmac-imx and dwmac-intel.
>> >
>> > Can you explain your use case?
>>
>> I want to use ETF Qdisc with hardware offload, which is currently not
>> possible on the stm32mp2.
>
> Do you need multiple queues for ETF/normal traffic?
> Or one ETF and one "normal"?
>
> How do you sort the traffic between the queues?
So the stm32mp2 has two CPU cores. I've isolated CPU1 for Profinet. That
one uses Tx/Rx queue 1 with ETF to reduce the Tx jitter. Everything else
is routed to Tx/Rx queue 0.
Config looks like this:
#
# Tx Assignment with SP.
#
# Tx Q 0 - Everything else
# Tx Q 1 - RTC
#
tc qdisc replace dev ${INTERFACE} handle 100 parent root mqprio num_tc 2 \
map 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 \
queues 1@0 1@1 \
hw 1
#
# Enable Tx launch time support for TC 1.
#
tc qdisc replace dev ${INTERFACE} parent 100:2 etf \
clockid CLOCK_TAI \
delta 500000 \
offload
On Rx incoming frames are steered via PCP field (vlan tagged).
>> > If yes why are we configuring this statically instead of making
>> > appropriate configuration based on qdisc or some other uAPI knob?
>>
>> It seems like a static configuration in the driver today. I basically
>> followed the same convention as dwmac-imx, dwmac-intel, dwmac-mediatek
>> and dwmac-qcom-ethqos. Only dwmac-socfpga does it differently.
>>
>> Tx Launch Time requires a different DMA descriptor layout. Currently
>> tc_setup_etf() just returns -EINVAL if the DMA configuration is not
>> setup appropriately. I guess a dynamic configuration requires to change
>> the DMA config and perform a full release/open cycle.
>
> release/open is not ideal but still better than hardcoding?
For sure it's better than hardcoding :). But, again the driver does it
statically. Maybe there's a good reason for it. Maybe not. I'm not that
familiar with the stmmac driver. I'll prototype something to see whether
we can enable TBS at run time using the ETF Qdisc callback. It may take
some time though.
Thanks,
Kurt
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]
prev parent reply other threads:[~2026-08-19 7:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 6:28 [PATCH net-next] net: stmmac: stm32: Set TSO/TBS Tx queues default settings Kurt Kanzenbach
2026-08-17 17:33 ` Jakub Kicinski
2026-08-18 6:57 ` Kurt Kanzenbach
2026-08-18 14:53 ` Jakub Kicinski
2026-08-19 7:35 ` Kurt Kanzenbach [this message]
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=87h5kq1s1f.fsf@jax.kurt.home \
--to=kurt@linutronix.de \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=lorenzo@kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox