mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next] net: bcmgenet: write the Tx producer index when a frame is dropped
@ 2026-11-18 20:40 Nicolai Buchwitz
  2026-11-18 20:43 ` netdev-bot+sinfo
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolai Buchwitz @ 2026-11-18 20:40 UTC (permalink / raw)
  To: Doug Berger, Florian Fainelli, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Nicolai Buchwitz
  Cc: Justin Chen, Broadcom internal kernel review list, netdev, linux-kernel

With xmit_more, queued frames reach the hardware only when a later frame
writes TDMA_PROD_INDEX. If that frame is dropped, the write is skipped
and the queued frames wait for the next transmit on that ring, which may
never come.

Write the producer index on the drop paths too.

Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
Another bug flagged by sashiko over the past few months.

Writing the producer index on every exit is the correct way to handle
this, but I could not reproduce a stall. Thus net-next it is.
---
 drivers/net/ethernet/broadcom/genet/bcmgenet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 61f5a4c2f0cd..6545caf3232d 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2254,11 +2254,11 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
 	if (ring->free_bds <= ring->stop_thld)
 		netif_tx_stop_queue(txq);
 
+out:
+	/* A dropped frame can end an xmit_more batch */
 	if (!netdev_xmit_more() || netif_xmit_stopped(txq))
-		/* Packets are ready, update producer index */
 		bcmgenet_tdma_ring_writel(priv, ring->index,
 					  ring->prod_index, TDMA_PROD_INDEX);
-out:
 	spin_unlock(&ring->lock);
 
 	return ret;

---
base-commit: d6816d9a93b66a12bf01e10037e377f3333ad6cc
change-id: 20261118-nb-genet-xmit-drop-kick-nn-89a5cfa585fe

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


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

end of thread, other threads:[~2026-11-18 20:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-18 20:40 [PATCH net-next] net: bcmgenet: write the Tx producer index when a frame is dropped Nicolai Buchwitz
2026-11-18 20:43 ` netdev-bot+sinfo
2026-11-18 20:46   ` Nicolai Buchwitz

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®