From: patchwork-bot+netdevbpf@kernel.org
To: Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>
Cc: maxime.chevallier@bootlin.com, 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, peppe.cavallaro@st.com,
alexandre.torgue@st.com, netdev@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net] net: stmmac: fix TX descriptor availability check for TSO traffic
Date: Thu, 10 Sep 2026 15:40:05 +0000 [thread overview]
Message-ID: <178905480513.1504082.12531935982183581.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20260907-stmmac-fix-tso-nfrags-check-v1-1-328459906cdb@oss.qualcomm.com>
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 07 Sep 2026 23:46:45 +0200 you wrote:
> stmmac_tso_xmit() estimates the number of free TX descriptors required by
> a TSO skb as:
>
> (skb->len - proto_hdr_len) / TSO_MAX_BUFF_SIZE + 1
>
> which assumes the payload is split into TSO_MAX_BUFF_SIZE chunks. This
> underestimates the descriptors actually consumed by stmmac_tso_allocator(),
> since each fragment is mapped individually and so it needs at least one
> descriptor regardless of its size. Moreover, one descriptor is used for
> the L2/L3/L4 headers and, when the MSS changes, one more is consumed for
> the MSS context descriptor.
> For a highly fragmented TSO skb the check can therefore pass even when the
> ring has too few free slots. stmmac_tso_allocator() then writes past the
> available descriptors, overwriting descriptors still owned by the DMA
> engine, corrupting the TX ring.
> Add stmmac_tso_get_num_desc() to compute the exact number of descriptors
> needed for the header, the linear payload and each fragment, plus the MSS
> context descriptor when required, and use it in the availability check.
>
> [...]
Here is the summary with links:
- [net] net: stmmac: fix TX descriptor availability check for TSO traffic
https://git.kernel.org/netdev/net/c/5e38d732ec67
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2026-09-10 15:41 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-07 21:46 [PATCH net] net: stmmac: fix TX descriptor availability check for TSO traffic Lorenzo Bianconi
2026-09-10 9:48 ` netdev-bot+sashiko
2026-09-10 13:08 ` Lorenzo Bianconi
2026-09-10 15:40 ` patchwork-bot+netdevbpf [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=178905480513.1504082.12531935982183581.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=alexandre.torgue@st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=lorenzo.bianconi@oss.qualcomm.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peppe.cavallaro@st.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.