[Intel-wired-lan] [PATCH net v3] ice: safer stats processing
G, GurucharanX
gurucharanx.g at intel.com
Tue Dec 7 11:19:16 UTC 2021
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of Jesse
> Brandeburg
> Sent: Saturday, November 13, 2021 6:36 AM
> To: intel-wired-lan at lists.osuosl.org
> Subject: [Intel-wired-lan] [PATCH net v3] ice: safer stats processing
>
> The driver was zeroing live stats that could be fetched by
> ndo_get_stats64 at any time. This could result in inconsistent statistics, and the
> telltale sign was when reading stats frequently from /proc/net/dev, the stats
> would go backwards.
>
> Fix by collecting stats into a local, and delaying when we write to the structure
> so it's not incremental.
>
> Fixes: fcea6f3da546 ("ice: Add stats and ethtool support")
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg at intel.com>
> ---
> v3: change to use GFP_ATOMIC to prevent BUG due to sleeping alloc
> v2: changed to use kzalloc instead of stack variable
> ---
> drivers/net/ethernet/intel/ice/ice_main.c | 31 +++++++++++++++--------
> 1 file changed, 20 insertions(+), 11 deletions(-)
>
Tested-by: Gurucharan G <gurucharanx.g at intel.com> (A Contingent worker at Intel)
More information about the Intel-wired-lan
mailing list