[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ea845c58-ee2a-4660-bc13-7e05003de5d0@socionext.com>
Date: Thu, 23 Jan 2025 14:25:15 +0900
From: Kunihiko Hayashi <hayashi.kunihiko@...ionext.com>
To: "Russell King (Oracle)" <linux@...linux.org.uk>
Cc: Alexandre Torgue <alexandre.torgue@...s.st.com>,
Jose Abreu <joabreu@...opsys.com>, Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>, Furong Xu <0x1207@...il.com>,
Joao Pinto <Joao.Pinto@...opsys.com>,
Vince Bridgers <vbridger@...nsource.altera.com>, netdev@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net v2 0/3] Limit devicetree parameters to hardware
capability
Hi Russell,
Thank you for your comment.
On 2025/01/21 19:25, Russell King (Oracle) wrote:
> On Tue, Jan 21, 2025 at 01:41:35PM +0900, Kunihiko Hayashi wrote:
>> This series includes patches that checks the devicetree properties,
>> the number of MTL queues and FIFO size values, and if these specified
>> values exceed the value contained in the hardware capabilities, limit to
>> the values from the capabilities.
>>
>> And this sets hardware capability values if FIFO sizes are not specified
>> and removes redundant lines.
>
> I think you also indeed to explain why (and possibly understand) - if
> there are hardware capabilities that describe these parameters - it has
> been necessary to have them in firmware as well.
>
> There are two scenarios I can think of why these would be duplicated:
>
> 1. firmware/platform capabilities are there to correct wrong values
> provided by the hardware.
> 2. firmware/platform capabilities are there to reduce the parameters
> below hardware maximums.
>
> Which it is affects whether your patch is correct or not, and thus needs
> to be mentioned.
I think scenario 2 applies in this case.
The queue values specified in devicetree bindings are defined as the
amount to be "used."
number of TX queues to be used in the driver
And the fifo sizes specified in devicetree bindings are defined as a
"configurable" size.
This is used for components that can have configurable receive fifo
sizes, ...
If the amounts of hardware resources are available from the hardware
capabilities, it must be limited to these amounts because exceeding
that values will cause issues.
Otherwise, since there is no values to show hardware resources, specify
these values to be used directly in devicetree. In this case, the values
will be referenced without checking.
> Finally, as you are submitting to the net tree, you really need to
> describe what has regressed in the driver. To me, this looks like a new
> "feature" to validate parameters against the hardware.
Actually, I think that specifyin an arbitrary (too big) value might
result in unexcepted behavior, and the limit of these parameters is
determined by:
- the max number that can be managed by software, or
- the amount of hardware resources.
> Please answer these points in this email thread. Please also include
> the explanation in future postings.
I'll pay attention next.
Thank you,
---
Best Regards
Kunihiko Hayashi
Powered by blists - more mailing lists