[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ed2dcd7f-0ded-4735-9533-2324600c3c82@windriver.com>
Date: Tue, 18 Jun 2024 10:31:06 +0800
From: xiaolei wang <xiaolei.wang@...driver.com>
To: Simon Horman <horms@...nel.org>
Cc: olteanv@...il.com, linux@...linux.org.uk, alexandre.torgue@...s.st.com,
andrew@...n.ch, joabreu@...opsys.com, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
mcoquelin.stm32@...il.com, wojciech.drewek@...el.com,
netdev@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [net PATCH] net: stmmac: No need to calculate speed divider when
offload is disabled
On 6/17/24 18:29, Simon Horman wrote:
> CAUTION: This email comes from a non Wind River email account!
> Do not click links or open attachments unless you recognize the sender and know the content is safe.
>
> On Sun, Jun 16, 2024 at 09:15:05AM +0800, xiaolei wang wrote:
>> On 6/15/24 22:47, Simon Horman wrote:
>>> On Fri, Jun 14, 2024 at 04:19:16PM +0800, Xiaolei Wang wrote:
> ...
>
>>> /* Final adjustments for HW */
>>> value = div_s64(qopt->idleslope * 1024ll * ptr, port_transmit_rate_kbps);
>>> priv->plat->tx_queues_cfg[queue].idle_slope = value & GENMASK(31, 0);
>>>
>>> value = div_s64(-qopt->sendslope * 1024ll * ptr, port_transmit_rate_kbps);
>>> priv->plat->tx_queues_cfg[queue].send_slope = value & GENMASK(31, 0);
>>>
>>> And the div_s64() lines above appear to use
>>> ptr uninitialised in the !qopt->enable case.
>> Oh, when deleting the configuration, idleslope and sendslope are both 0, do
>> you mean we also need to set ptr to 0?
> Understood, if idleslope and sendslope are 0, then ptr could be set to any
> value and the result would be the same. And, based on my limited
> understanding, 0 does not seem to be a bad choice.
>
> My point is that ptr shouldn't be uninitialised at this point.
OK, I have sent the v2 version
https://patchwork.kernel.org/project/netdevbpf/patch/20240617013922.1035854-1-xiaolei.wang@windriver.com/
thanks
xiaolei
>
> ...
Powered by blists - more mailing lists