Thread View: linux.kernel.netdev
1 messages
1 total messages
Started by Nicolai Buchwitz
Fri, 20 Nov 2026 22:42
[PATCH net v2 3/5] net: bcmgenet: reset the Rx discard count with the ring
Author: Nicolai Buchwitz
Date: Fri, 20 Nov 2026 22:42
Date: Fri, 20 Nov 2026 22:42
31 lines
9544 bytes
9544 bytes
Ring init clears the hardware discard counter but not
ring->old_discards. Discards after an ifdown and ifup or a resume are
then missing from rx_missed. On a CM4, after an ifdown and ifup, 3666
discards showed up as 0 in rx_missed.
Reset old_discards together with the ring.
Fixes: d26ea6cc48da ("net: bcmgenet: collect Rx discarded packet count")
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
Signed-off-by: Nicolai Buchwitz <nb@tipi-net.de>
---
drivers/net/ethernet/broadcom/genet/bcmgenet.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index f9f38445568f..b81408e6293c 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -2826,6 +2826,8 @@ static int bcmgenet_init_rx_ring(struct bcmgenet_priv *priv,
ring->read_ptr = start_ptr;
ring->cb_ptr = start_ptr;
ring->end_ptr = end_ptr - 1;
+ /* Zeroing RDMA_PROD_INDEX below also clears the discard counter */
+ ring->old_discards = 0;
ret = bcmgenet_rx_ring_create_pool(priv, ring);
if (ret)
--
2.53.0
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