On Tue, Feb 27, 2024 at 03:31:06PM +0100, Przemek Kitszel wrote:
> Simplify stats accumulation logic to fix the case where we don't take
> previous stat value into account, we should always respect it.
> 
> Main netdev stats of our PF (Tx/Rx packets/bytes) were reported orders of
> magnitude too big during OpenStack reconfiguration events, possibly other
> reconfiguration cases too.
> 
> The regression was reported to be between 6.1 and 6.2, so I was almost
> certain that on of the two "preserve stats over reset" commits were the
> culprit. While reading the code, it was found that in some cases we will
> increase the stats by arbitrarily large number (thanks to ignoring "-prev"
> part of condition, after zeroing it).
> 
> Note that this fixes also the case where we were around limits of u64, but
> that was not the regression reported.
> 
> Full disclosure: I remember suggesting this particular piece of code to
> Ben a few years ago, so blame on me.
> 
> Fixes: 2fd5e433cd26 ("ice: Accumulate HW and Netdev statistics over reset")
> Reported-by: Nebojsa Stevanovic <nebojsa.stevano...@gcore.com>
> Link: 
> https://lore.kernel.org/intel-wired-lan/vi1pr02mb439744dedaa7b59b9a2833fe91...@vi1pr02mb4397.eurprd02.prod.outlook.com
> Reported-by: Christian Rohmann <christian.rohm...@inovex.de>
> Link: 
> https://lore.kernel.org/intel-wired-lan/f38a6ca4-af05-48b1-a3e6-17ef2054e...@inovex.de
> Reviewed-by: Jacob Keller <jacob.e.kel...@intel.com>
> Signed-off-by: Przemek Kitszel <przemyslaw.kits...@intel.com>

Reviewed-by: Simon Horman <ho...@kernel.org>

Reply via email to