From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Kurt Kanzenbach <kurt@linutronix.de>, Jakub Kicinski <kuba@kernel.org>
Cc: 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: Fri, 21 Aug 2026 15:41:26 +0200 [thread overview]
Message-ID: <5693c628-dffb-46c4-8f7c-5a5a6c101660@bootlin.com> (raw)
In-Reply-To: <87y0e0x7ic.fsf@jax.kurt.home>
Hi Kurt,
On 8/21/26 09:22, Kurt Kanzenbach wrote:
> On Thu Aug 20 2026, Jakub Kicinski wrote:
>> On Wed, 19 Aug 2026 09:35:40 +0200 Kurt Kanzenbach wrote:
>>>>> 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).
>>
>> Thanks for explaining!
>
> No problem.
>
>>
>>>>> 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.
>>
>> I think the m in stmmac stand for 'mistake'.
let's rename it stmmmmmmmmmmmmmmmmmmmmmmmac then
>
> :D
>
>> We need to start cleaning it up.
>
> No objections here. I've briefly looked at the TBS thingy. I think we
> just need to reconfigure one Tx queue instead of doing a full
> release/open cycle. The XDP/ZC code does something similar. So the
> infrastructure seems to be in place.
>
> However, we need to keep track of what SoC implementation can enable TBS
> on which queue. For gmac4 we can probably reuse tbs_en and for xgmac
> there's is capability field tbs_ch_num. Let's see.
Thanks for tackling this, let me know if you need testing. In the past weeks
I've been looking deep in my drawers as well as on various online shops, and
I'm starting to have a farily comprehensive set of stmmac-enabled devices
(although I couldn't get my hands on XGMAC, AgileX5 devkits appear to be way
outside my budget).
Let me know if you need help in testing for this, and we can ask the Altera folks
for some help in XGMAC testing.
Maxime
>
> Thanks,
> Kurt
next prev parent reply other threads:[~2026-08-21 13:41 UTC|newest]
Thread overview: 9+ 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
2026-08-20 21:45 ` Jakub Kicinski
2026-08-21 7:22 ` Kurt Kanzenbach
2026-08-21 13:41 ` Maxime Chevallier [this message]
2026-08-21 20:25 ` Andrew Lunn
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=5693c628-dffb-46c4-8f7c-5a5a6c101660@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=lorenzo@kernel.org \
--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