Re: [PATCH net-next v10 06/10] bng_en: add HW stats infra and structured ethtool ops
From: Paolo Abeni
Date: Tue Mar 31 2026 - 10:04:18 EST
On 3/27/26 9:13 PM, Bhargava Marreddy wrote:
> @@ -1024,10 +1208,12 @@ static int bnge_alloc_core(struct bnge_net *bn)
> txr->bnapi = bnapi2;
> }
>
> - rc = bnge_alloc_ring_stats(bn);
> + rc = bnge_alloc_stats(bn);
> if (rc)
> goto err_free_core;
Sashico says:
---
Does tying the statistics memory allocation to bnge_alloc_core() cause
accumulated statistics to be lost when the interface is toggled down?
When the interface is brought down, bnge_free_core() calls
bnge_free_port_stats() which frees sw_stats and clears the
BNGE_FLAG_PORT_STATS flag. Any ethtool queries made while the interface
is down will then silently abort and return empty statistics, and all
historical counters will be permanently erased.
Should the software accumulators be allocated once at probe time so they
can persist across link state changes?
---
Please have a look at the full report, it could include other relevant
things.
https://sashiko.dev/#/patchset/20260327201343.16146-1-bhargava.marreddy%40broadcom.com
/P