From: xiaolei wang <xiaolei.wang@windriver.com>
To: Simon Horman <horms@kernel.org>
Cc: olteanv@gmail.com, linux@armlinux.org.uk,
alexandre.torgue@foss.st.com, andrew@lunn.ch,
joabreu@synopsys.com, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com,
wojciech.drewek@intel.com, netdev@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [net PATCH] net: stmmac: No need to calculate speed divider when offload is disabled
Date: Tue, 18 Jun 2024 10:31:06 +0800 [thread overview]
Message-ID: <ed2dcd7f-0ded-4735-9533-2324600c3c82@windriver.com> (raw)
In-Reply-To: <20240617102901.GO8447@kernel.org>
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
>
> ...
prev parent reply other threads:[~2024-06-18 2:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 8:19 [net PATCH] net: stmmac: No need to calculate speed divider when offload is disabled Xiaolei Wang
2024-06-15 14:47 ` Simon Horman
2024-06-16 1:15 ` xiaolei wang
2024-06-17 10:29 ` Simon Horman
2024-06-18 2:31 ` xiaolei wang [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=ed2dcd7f-0ded-4735-9533-2324600c3c82@windriver.com \
--to=xiaolei.wang@windriver.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=joabreu@synopsys.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=wojciech.drewek@intel.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