๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
3 messages
3 total messages Started by Nicolai Buchwitz Wed, 18 Nov 2026 20:40
[PATCH net-next] net: bcmgenet: write the Tx producer index when a frame is dropped
#18759
Author: Nicolai Buchwitz
Date: Wed, 18 Nov 2026 20:40
44 lines
10013 bytes
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>
Re: [PATCH net-next] net: bcmgenet: write the Tx producer index when a frame is dropped
#18796
Author: Eric Dumazet
Date: Wed, 18 Nov 2026 23:13
23 lines
9819 bytes
Le mer. 18 nov. 2026 ร  22:01, Florian Fainelli
<florian.fainelli@broadcom.com> a รฉcrit :
>
> On 11/18/26 12:40, Nicolai Buchwitz wrote:
> > 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>
>
> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>

I think this is a net candidate, even if you could not reproduce the bug.

Fixes: ddd0ca5d60b3 ("net: bcmgenet: add support for xmit_more")

Reviewed-by: Eric Dumazet <edumazet@kernel.org>
Re: [PATCH net-next] net: bcmgenet: write the Tx producer index when a frame is dropped
#20059
Author: patchwork-bot+netdevbpf
Date: Sat, 21 Nov 2026 01:00
24 lines
8723 bytes
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 18 Nov 2026 21:40:39 +0100 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net-next] net: bcmgenet: write the Tx producer index when a frame is dropped
    https://git.kernel.org/netdev/net-next/c/16cc4936fb8e

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads