From: Rohan G Thomas <rohan.g.thomas@intel.com>
To: fancer.lancer@gmail.com
Cc: alexandre.torgue@foss.st.com, conor+dt@kernel.org,
davem@davemloft.net, devicetree@vger.kernel.org,
edumazet@google.com, joabreu@synopsys.com,
krzysztof.kozlowski+dt@linaro.org, kuba@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
mcoquelin.stm32@gmail.com, netdev@vger.kernel.org,
pabeni@redhat.com, peppe.cavallaro@st.com, robh+dt@kernel.org,
rohan.g.thomas@intel.com
Subject: [PATCH net-next v4 2/2] net: stmmac: Tx coe sw fallback
Date: Sat, 19 Aug 2023 08:53:26 +0800 [thread overview]
Message-ID: <20230819005326.22204-1-rohan.g.thomas@intel.com> (raw)
In-Reply-To: <trcp4f77dv2e36zpe53s7sjoyevgd5qtpv6m4a75ryalglqnev@trcsnsmvtijy>
On Fri, Aug 18, 2023 at 09:53:50PM +0800, Rohan G Thomas wrote:
>> + u32 flags;
>
>This looks redundant. See my last comment.
>
>> +
>
>> + u32 tx_q_with_coe;
>
>This one too. Can't you just use the
>plat_stmmacenet_data.tx_queues_with_coe field?
>
>> + if (priv->plat->tx_coe &&
>> + priv->plat->tx_queues_with_coe < priv->plat->tx_queues_to_use) {
>> + priv->flags |= STMMAC_PRIV_FLG_TXQ_COE_LIMIT;
>> + priv->tx_q_with_coe = priv->plat->tx_queues_with_coe;
>> + dev_info(priv->device, "TX COE limited to %u tx queues\n",
>> + priv->tx_q_with_coe);
>> + }
>
>What about:
>+ if (priv->plat->tx_coe && !priv->plat->tx_queues_with_coe)
>+ priv->plat->tx_queues_with_coe = priv->plat->tx_queues_to_use;
>+ else if (!priv->plat->tx_coe)
>+ priv->plat->tx_queues_with_coe = 0;
>+ else if (priv->plat->tx_queues_with_coe < priv->plat->tx_queues_to_use)
>+ dev_info(priv->device, "TX COE is available for %u queues\n", priv->plat->tx_queues_with_coe);
>
>?
>
>-Serge(y)
Hi Serge,
Agreed.
Thanks for the suggestion. Will rework in next version.
BR,
Rohan
>>
>>
prev parent reply other threads:[~2023-08-19 0:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-18 13:53 [PATCH net-next v4 0/2] net: stmmac: Tx coe sw fallback Rohan G Thomas
2023-08-18 13:53 ` [PATCH net-next v4 1/2] dt-bindings: net: snps,dwmac: Tx queues with coe Rohan G Thomas
2023-08-18 13:53 ` [PATCH net-next v4 2/2] net: stmmac: Tx coe sw fallback Rohan G Thomas
2023-08-18 18:19 ` Serge Semin
2023-08-19 0:53 ` Rohan G Thomas [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=20230819005326.22204-1-rohan.g.thomas@intel.com \
--to=rohan.g.thomas@intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=fancer.lancer@gmail.com \
--cc=joabreu@synopsys.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peppe.cavallaro@st.com \
--cc=robh+dt@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).