From: Simon Horman <horms@kernel.org>
To: 2694439648@qq.com
Cc: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@foss.st.com, hailong.fan@siengine.com,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
inux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: stmmac: Modify the judgment condition of "tx_avail" from 1 to 2
Date: Mon, 1 Dec 2025 11:13:02 +0000 [thread overview]
Message-ID: <aS14PnwjbFcD_J70@horms.kernel.org> (raw)
In-Reply-To: <tencent_22959DC8315158E23D77C14B9B33C97EA60A@qq.com>
On Mon, Dec 01, 2025 at 10:57:01AM +0800, 2694439648@qq.com wrote:
> From: "hailong.fan" <hailong.fan@siengine.com>
>
> Under certain conditions, a WARN_ON will be triggered
> if avail equals 1.
>
> For example, when a VLAN packet is to send,
> stmmac_vlan_insert consumes one unit of space,
> and the data itself consumes another.
> actually requiring 2 units of space in total.
Hi,
I am wondering if there are other cases where an extra
descriptor is needed. And if so, can multiple such conditions
occur at the same time?
I am also wondering if the VLAN condition can be detected,
so a descriptor is only reserved for VLAN use if it will
actually be used for a VLAN.
And I think it would be worth noting how this problem was discovered
e.g. by inspection, using tooling (static analysis, AI, ...).
And how it has been tested e.g. On real HW, compile tested only.
As this is a fix for Networking code present in the net tree
it should be based on that tree. And targeted at that tree like this:
Subject: [PATCH net] ...
Also, as a fix for net, it should have a fixes tag.
Generally, this should denote the first patch where the problem would
manifest. In this case this seems to be a likely candidate:
Fixes: 30d932279dc2 ("net: stmmac: Add support for VLAN Insertion Offload")
The tag should go immediately above other tags, in this case your
Signed-off-by line, without any blank lines in between. And, like other
tags, it should not be line-wrapped.
For more information on the workflow for Networking changes please see:
https://docs.kernel.org/process/maintainer-netdev.html
>
> Signed-off-by: hailong.fan <hailong.fan@siengine.com>
next prev parent reply other threads:[~2025-12-01 11:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-12-01 2:57 [PATCH] net: stmmac: Modify the judgment condition of "tx_avail" from 1 to 2 2694439648
2025-12-01 11:13 ` Simon Horman [this message]
2025-12-01 12:21 ` Eric Dumazet
2025-12-02 1:24 ` 回复: " Fan Hailong/范海龙
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=aS14PnwjbFcD_J70@horms.kernel.org \
--to=horms@kernel.org \
--cc=2694439648@qq.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hailong.fan@siengine.com \
--cc=inux-kernel@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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;
as well as URLs for NNTP newsgroup(s).