[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230929051758.21492-1-rohan.g.thomas@intel.com>
Date: Fri, 29 Sep 2023 13:17:58 +0800
From: rohan.g.thomas@...el.com
To: robh@...nel.org
Cc: alexandre.torgue@...s.st.com,
conor+dt@...nel.org,
davem@...emloft.net,
devicetree@...r.kernel.org,
edumazet@...gle.com,
fancer.lancer@...il.com,
joabreu@...opsys.com,
krzysztof.kozlowski+dt@...aro.org,
kuba@...nel.org,
linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
mcoquelin.stm32@...il.com,
netdev@...r.kernel.org,
pabeni@...hat.com,
peppe.cavallaro@...com,
rohan.g.thomas@...el.com
Subject: Re: [PATCH net-next 1/2] dt-bindings: net: snps,dwmac: Time Based Scheduling
From: Rohan G Thomas <rohan.g.thomas@...el.com>
On Wed, Sep 27, 2023 at 09:09:18PM +0800, Rohan G Thomas wrote:
>> Add new property tbs-enabled to enable Time Based Scheduling(TBS)
>
>That's not the property you added.
>
>> support per Tx queues. TBS feature can be enabled later using ETF
>> qdisc but for only those queues that have TBS support enabled.
>
>This property defines capable or enabled?
This property is to enable TBS support for any Tx queue. Why this
added is because I think TBS need not be enabled for all capable
Tx queues(Tx DMA channels) because of the following hw limitations.
1. As per DWMAC QoS and DWXGMAC databooks, TBS cannot coexist with
TSO. So TBS cannot be enabled for a Tx queue which is for TSO.
2. Also as per DWXGMAC databook, "Do not enable time-based scheduling
(or enhanced descriptors) for the channel for which TSO or transmit
timestamp or one-step timestamping control correction feature is
enabled".
3. As per DWXGMAC databook, "Use separate channel (without TBS
enabled) for time critical traffic. Mixing such traffic with TBS
enabled traffic can cause delays in transmitting time critical
traffic."
More explanation below...
>
>Seems like OS configuration and policy.
Tx queues need to be configured for TBS during hw setup itself as
special enhanced descriptors are used by the hw for TBS support
enabled queues. Switching between enhanced and normal descriptors
on run is not feasible. So this flag is for enabling "Enhanced
Descriptors for Time Based Scheduling". This I think is a hw specific
requirement.
>
>Doesn't eh DWMAC have capability registers for supported features? Or
>did they forget per queue capabilities?
Yes, capability registers are available. For DWMAC5 IP, if TBSSEL bit
is set, then TBS is supported by all Tx queues. For DWXGMAC IP, if
TBSSEL bit is set, then TBS is supported by TBS_CH number of Tx
queues starting from the highest Tx queue. But because of the hw
limitations mentioned above, TBS cannot be enabled for all capable
queues.
>
>>
>> Commit 7eadf57290ec ("net: stmmac: pci: Enable TBS on GMAC5 IPK PCI
>> entry") enables similar support from the stmmac pci driver.
>
>Why does unconditionally enabling TBS work there, but not here?
There, Tx queue 0 is not enabled for TBS as it is used for TSO.
>
>>
>> Signed-off-by: Rohan G Thomas <rohan.g.thomas@...el.com>
>> ---
>> Documentation/devicetree/bindings/net/snps,dwmac.yaml | 8 ++++++++
>> 1 file changed, 8 insertions(+)
>>
> diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/>devicetree/bindings/net/snps,dwmac.yaml
>> index 5c2769dc689a..db1eb0997602 100644
>> --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>> +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
>> @@ -399,6 +399,14 @@ properties:
>> type: boolean
>> description: TX checksum offload is unsupported by the TX queue.
>>
>> + snps,tbs-enabled:
>> + type: boolean
>> + description:
>> + Enable Time Based Scheduling(TBS) support for the TX queue. TSO and
>> + TBS cannot be supported by a queue at the same time. If TSO support
>> + is enabled, then default TX queue 0 for TSO and in that case don't
>> + enable TX queue 0 for TBS.
>> +
>> allOf:
>> - if:
>> required:
>> --
>> 2.26.2
>>
Powered by blists - more mailing lists