Re: [PATCH net 1/4] net: bcmgenet: accumulate the DIM packet and byte counters

From: Florian Fainelli

Date: Wed Nov 18 2026 - 14:58:24 EST


On 11/18/26 11:55, Nicolai Buchwitz wrote:
net_dim() computes rates from the difference between two samples and
needs running totals, but bcmgenet_desc_rx() passes the counts of the
last poll. Adaptive coalescing then picks profiles from wrong rates.

On a CM4 at a steady 300 Mbit/s UDP, DIM changed profile about 1000
times in 20 s. With the fix it settles, and Rx interrupts drop from about
4500/s to 2240/s.

Accumulate the counters instead.

Fixes: 9f4ca05827a2 ("net: bcmgenet: Add support for adaptive RX coalescing")
Signed-off-by: Nicolai Buchwitz <nb@xxxxxxxxxxx>

Reviewed-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
--
Florian