mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: macb: fix software FCS handling of shared and requeued skbs
@ 2026-10-06  5:41 Nicolai Buchwitz
  2026-10-06  5:41 ` [PATCH net 1/2] net: macb: check TX ring before modifying skb Nicolai Buchwitz
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Nicolai Buchwitz @ 2026-10-06  5:41 UTC (permalink / raw)
  To: Théo Lebrun, Conor Dooley, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Richard Cochran,
	Claudiu Beznea
  Cc: netdev, linux-kernel, Nicolai Buchwitz

While testing the genet MTU series I used a Raspberry Pi CM5 (RP1 GEM)
as pktgen source for the CM4. With clone_skb the CM5 rebooted after a
few seconds. Further investigation showed that macb_pad_and_fcs()
appends the FCS in place, so the shared skb grows with every transmit
until BQL completes more than was queued and dql_completed() hits its
BUG_ON.

The same code also modifies the skb before the TX ring check, so a
NETDEV_TX_BUSY retry gets an skb that was already replaced or grown.

Patch 1 checks the ring first, patch 2 copies shared skbs.

Tested on Raspberry CM5 with pktgen at 60/20000 bytes, clone_skb 0/
1000, burst 1/32.

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
Nicolai Buchwitz (2):
      net: macb: check TX ring before modifying skb
      net: macb: copy shared skbs before appending the FCS

 drivers/net/ethernet/cadence/macb_main.c | 80 +++++++++++++++++++-------------
 1 file changed, 49 insertions(+), 31 deletions(-)
---
base-commit: d5a007b9b457c915ab1a53227e8939e4018aa97a
change-id: 20261004-nb-macb-shared-skb-net-13174995332b

Best regards,
-- 
Nicolai Buchwitz <nb@tipi-net.de>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-10-08 18:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06  5:41 [PATCH net 0/2] net: macb: fix software FCS handling of shared and requeued skbs Nicolai Buchwitz
2026-10-06  5:41 ` [PATCH net 1/2] net: macb: check TX ring before modifying skb Nicolai Buchwitz
2026-10-06  5:41 ` [PATCH net 2/2] net: macb: copy shared skbs before appending the FCS Nicolai Buchwitz
2026-10-08 18:50 ` [PATCH net 0/2] net: macb: fix software FCS handling of shared and requeued skbs 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

all inboxes | Powered by JetHome®