* [PATCH net] bnxt_en: Write doorbell when linearizing skb fails
@ 2026-08-26 0:02 Joe Damato
2026-08-26 6:00 ` Michael Chan
2026-08-27 9:30 ` patchwork-bot+netdevbpf
0 siblings, 2 replies; 4+ messages in thread
From: Joe Damato @ 2026-08-26 0:02 UTC (permalink / raw)
To: netdev, Michael Chan, Pavan Chebbi, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Andy Gospodarek,
Somnath Kotur, Simon Horman
Cc: kalesh-anakkur.purayil, linux-kernel, Joe Damato, stable
When the driver is handed a burst of packets, the doorbell is deferred
until the end. If the last packet has a huge number of frags, but fails
to linearize, the doorbell will not be written adding latency on TX for
any packets in the ring and holding their DMA mappings until the next
TX. Note that the queue is not stopped, so this issue would delay
pending BDs until the next TX.
This issue was discovered by Sashiko and reading the code verifies that,
while unlikely, it is possible.
Fix this by jumping to tx_free, which replicates the same pre-existing
logic but also writes the doorbell.
Fixes: b91e82129400 ("bnxt_en: Linearize TX SKB if the fragments exceed the max")
Cc: stable@vger.kernel.org
Signed-off-by: Joe Damato <joe@dama.to>
---
drivers/net/ethernet/broadcom/bnxt/bnxt.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
index 9c2cc50276a5..d59bcca73a2b 100644
--- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
+++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
@@ -502,11 +502,8 @@ static netdev_tx_t bnxt_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (skb_shinfo(skb)->nr_frags > TX_MAX_FRAGS) {
netdev_warn_once(dev, "SKB has too many (%d) fragments, max supported is %d. SKB will be linearized.\n",
skb_shinfo(skb)->nr_frags, TX_MAX_FRAGS);
- if (skb_linearize(skb)) {
- dev_kfree_skb_any(skb);
- dev_core_stats_tx_dropped_inc(dev);
- return NETDEV_TX_OK;
- }
+ if (skb_linearize(skb))
+ goto tx_free;
}
#endif
if (skb_is_gso(skb) &&
base-commit: dc4b95b8fee95113587e93ca116356032d271371
--
2.53.0-Meta
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] bnxt_en: Write doorbell when linearizing skb fails
2026-08-26 0:02 [PATCH net] bnxt_en: Write doorbell when linearizing skb fails Joe Damato
@ 2026-08-26 6:00 ` Michael Chan
2026-08-26 12:30 ` Andy Gospodarek
2026-08-27 9:30 ` patchwork-bot+netdevbpf
1 sibling, 1 reply; 4+ messages in thread
From: Michael Chan @ 2026-08-26 6:00 UTC (permalink / raw)
To: Joe Damato
Cc: netdev, Pavan Chebbi, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Andy Gospodarek, Somnath Kotur,
Simon Horman, kalesh-anakkur.purayil, linux-kernel, stable
[-- Attachment #1: Type: text/plain, Size: 927 bytes --]
On Tue, Aug 25, 2026 at 5:02 PM Joe Damato <joe@dama.to> wrote:
>
> When the driver is handed a burst of packets, the doorbell is deferred
> until the end. If the last packet has a huge number of frags, but fails
> to linearize, the doorbell will not be written adding latency on TX for
> any packets in the ring and holding their DMA mappings until the next
> TX. Note that the queue is not stopped, so this issue would delay
> pending BDs until the next TX.
>
> This issue was discovered by Sashiko and reading the code verifies that,
> while unlikely, it is possible.
>
> Fix this by jumping to tx_free, which replicates the same pre-existing
> logic but also writes the doorbell.
>
> Fixes: b91e82129400 ("bnxt_en: Linearize TX SKB if the fragments exceed the max")
> Cc: stable@vger.kernel.org
> Signed-off-by: Joe Damato <joe@dama.to>
Thanks.
Reviewed-by: Michael Chan <michael.chan@broadcom.com>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5469 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] bnxt_en: Write doorbell when linearizing skb fails
2026-08-26 6:00 ` Michael Chan
@ 2026-08-26 12:30 ` Andy Gospodarek
0 siblings, 0 replies; 4+ messages in thread
From: Andy Gospodarek @ 2026-08-26 12:30 UTC (permalink / raw)
To: Michael Chan
Cc: Joe Damato, netdev, Pavan Chebbi, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Somnath Kotur,
Simon Horman, kalesh-anakkur.purayil, linux-kernel, stable
[-- Attachment #1.1: Type: text/plain, Size: 1135 bytes --]
On Wed, Aug 26, 2026 at 2:00 AM Michael Chan <michael.chan@broadcom.com>
wrote:
>
> On Tue, Aug 25, 2026 at 5:02 PM Joe Damato <joe@dama.to> wrote:
> >
> > When the driver is handed a burst of packets, the doorbell is deferred
> > until the end. If the last packet has a huge number of frags, but fails
> > to linearize, the doorbell will not be written adding latency on TX for
> > any packets in the ring and holding their DMA mappings until the next
> > TX. Note that the queue is not stopped, so this issue would delay
> > pending BDs until the next TX.
> >
> > This issue was discovered by Sashiko and reading the code verifies that,
> > while unlikely, it is possible.
> >
> > Fix this by jumping to tx_free, which replicates the same pre-existing
> > logic but also writes the doorbell.
> >
> > Fixes: b91e82129400 ("bnxt_en: Linearize TX SKB if the fragments exceed
the max")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Joe Damato <joe@dama.to>
>
> Thanks.
> Reviewed-by: Michael Chan <michael.chan@broadcom.com>
Looks good to me, too.
Reviewed-by: Andy Gospodarek <gospo@broadcom.com>
[-- Attachment #1.2: Type: text/html, Size: 1658 bytes --]
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 5489 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] bnxt_en: Write doorbell when linearizing skb fails
2026-08-26 0:02 [PATCH net] bnxt_en: Write doorbell when linearizing skb fails Joe Damato
2026-08-26 6:00 ` Michael Chan
@ 2026-08-27 9:30 ` patchwork-bot+netdevbpf
1 sibling, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-27 9:30 UTC (permalink / raw)
To: Joe Damato
Cc: netdev, michael.chan, pavan.chebbi, andrew+netdev, davem,
edumazet, kuba, pabeni, andrew.gospodarek, somnath.kotur, horms,
kalesh-anakkur.purayil, linux-kernel, stable
Hello:
This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:
On Tue, 25 Aug 2026 17:02:33 -0700 you wrote:
> When the driver is handed a burst of packets, the doorbell is deferred
> until the end. If the last packet has a huge number of frags, but fails
> to linearize, the doorbell will not be written adding latency on TX for
> any packets in the ring and holding their DMA mappings until the next
> TX. Note that the queue is not stopped, so this issue would delay
> pending BDs until the next TX.
>
> [...]
Here is the summary with links:
- [net] bnxt_en: Write doorbell when linearizing skb fails
https://git.kernel.org/netdev/net/c/00eeab0c644a
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-27 9:31 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26 0:02 [PATCH net] bnxt_en: Write doorbell when linearizing skb fails Joe Damato
2026-08-26 6:00 ` Michael Chan
2026-08-26 12:30 ` Andy Gospodarek
2026-08-27 9:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox