* [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
2026-11-18 21:01 ` Florian Fainelli
0 siblings, 2 replies; 5+ 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 related [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: bcmgenet: write the Tx producer index when a frame is dropped
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
2026-11-18 21:01 ` Florian Fainelli
1 sibling, 1 reply; 5+ messages in thread
From: netdev-bot+sinfo @ 2026-11-18 20:43 UTC (permalink / raw)
To: Nicolai Buchwitz
Cc: Doug Berger, Florian Fainelli, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Justin Chen,
Broadcom internal kernel review list, netdev, linux-kernel
Hi!
This is an automated message. This series looks like a fix, but its
commit messages seem to be missing some information:
- What hardware the change was tested on. For driver fixes please
mention the device (and if relevant firmware version) used for
testing, or say that the change was not tested on real hardware.
Please do not repost the series just to address the above. Instead,
reply to this email with the missing information, so that reviewers
can take it into account.
*IMPORTANT*: If you do repost (for other reasons) - please include
the relevant info in the cover letter or commit messages.
--
The evaluation is done by an LLM so it may be wrong, if you think
that is the case please reply and explain.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: bcmgenet: write the Tx producer index when a frame is dropped
2026-11-18 20:43 ` netdev-bot+sinfo
@ 2026-11-18 20:46 ` Nicolai Buchwitz
0 siblings, 0 replies; 5+ messages in thread
From: Nicolai Buchwitz @ 2026-11-18 20:46 UTC (permalink / raw)
To: netdev-bot+sinfo
Cc: Doug Berger, Florian Fainelli, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Justin Chen,
Broadcom internal kernel review list, netdev, linux-kernel
On 18.11.2026 21:43, netdev-bot+sinfo@kernel.org wrote:
> Hi!
>
> This is an automated message. This series looks like a fix, but its
> commit messages seem to be missing some information:
>
> - What hardware the change was tested on. For driver fixes please
> mention the device (and if relevant firmware version) used for
> testing, or say that the change was not tested on real hardware.
>
> Please do not repost the series just to address the above. Instead,
> reply to this email with the missing information, so that reviewers
> can take it into account.
>
> *IMPORTANT*: If you do repost (for other reasons) - please include
> the relevant info in the cover letter or commit messages.
As usual this has been tested on Raspberry Pi CM4 (bcm2711)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: bcmgenet: write the Tx producer index when a frame is dropped
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 21:01 ` Florian Fainelli
2026-11-18 23:13 ` Eric Dumazet
1 sibling, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2026-11-18 21:01 UTC (permalink / raw)
To: Nicolai Buchwitz, Doug Berger, Florian Fainelli, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni
Cc: Justin Chen, Broadcom internal kernel review list, netdev,
linux-kernel
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>
--
Florian
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH net-next] net: bcmgenet: write the Tx producer index when a frame is dropped
2026-11-18 21:01 ` Florian Fainelli
@ 2026-11-18 23:13 ` Eric Dumazet
0 siblings, 0 replies; 5+ messages in thread
From: Eric Dumazet @ 2026-11-18 23:13 UTC (permalink / raw)
To: Florian Fainelli
Cc: Nicolai Buchwitz, Doug Berger, Andrew Lunn, David S. Miller,
Jakub Kicinski, Paolo Abeni, Justin Chen,
Broadcom internal kernel review list, netdev, linux-kernel
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-11-18 23:13 UTC | newest]
Thread overview: 5+ 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
2026-11-18 21:01 ` Florian Fainelli
2026-11-18 23:13 ` Eric Dumazet
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox