Subject: Re: [Intel-wired-lan] [PATCH iwl-net] ice: Reset stats on queues num change

From: Alexander Lobakin <[email-masked]>
Date: Wed, 19 Jul 2023 17:25:51 +0200

From: Przemek Kitszel <[email-masked]>
Date: Fri, 14 Jul 2023 07:47:21 -0400

> Reset VSI stats on queues number change.

Please don't.

> 
> Commit 288ecf491b16 ("ice: Accumulate ring statistics over reset")
> implemented functionality for interface statistics to persist over reset,
> but it left stats persisting over queue count reconfiguration.

And? Why do you guys think we need to zero stats for the turned off
queues? Let the stats have the same lifetime as pci_dev has.

> 
> Following scenario is fixed here:
>  # Observe statistics for Tx/Rx queues
> ethtool -S ethX
>  # change number of queues
> ethtool -L ethX combined 10
>  # Observe statistics for Tx/Rx queues (after reset)
> ethtool -S ethX
> 
> Ben has left a note where to place the VSI stats reset,
> what made this fix much easier to do.
> 
> Note that newly allocated structs (case of num_txq > prev_txq) don't
> need zeroing.
> 
> Fixes: 288ecf491b16 ("ice: Accumulate ring statistics over reset")
> Suggested-by: Benjamin Mikailenko <[email-masked]>
> Signed-off-by: Przemek Kitszel <[email-masked]>
[...]

Thanks,
Olek