[Intel-wired-lan] [net-next, v2 2/2] ice: Accumulate ring statistics over reset
G, GurucharanX
gurucharanx.g at intel.com
Wed Oct 12 13:38:10 UTC 2022
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces at osuosl.org> On Behalf Of
> Benjamin Mikailenko
> Sent: Tuesday, October 11, 2022 12:52 AM
> To: intel-wired-lan at lists.osuosl.org
> Cc: Mikailenko, Benjamin <benjamin.mikailenko at intel.com>
> Subject: [Intel-wired-lan] [net-next, v2 2/2] ice: Accumulate ring statistics
> over reset
>
> Resets may occur with or without user interaction. For example, a TX hang or
> reconfiguration of parameters will result in a reset. During reset, the VSI is
> freed, freeing any statistics structures inside as well. This would create an
> issue for the user where a reset happens in the background, statistics set to
> zero, and the user checks ring statistics expecting them to be populated.
>
> To ensure this doesn't happen, accumulate ring statistics over reset.
>
> Define a new ring statistics structure, ice_ring_stats. The new structure lives
> in the VSI's parent, preserving ring statistics when VSI is freed.
>
> 1. Define a new structure vsi_ring_stats in the PF scope 2. Allocate/free stats
> only during probe, unload, or change in ring size 3. Replace previous ring
> statistics functionality with new structure
>
> Signed-off-by: Benjamin Mikailenko <benjamin.mikailenko at intel.com>
> ---
> drivers/net/ethernet/intel/ice/ice.h | 6 +
> drivers/net/ethernet/intel/ice/ice_ethtool.c | 12 +-
> drivers/net/ethernet/intel/ice/ice_lib.c | 256 +++++++++++++++++-
> drivers/net/ethernet/intel/ice/ice_main.c | 48 +++-
> drivers/net/ethernet/intel/ice/ice_repr.c | 10 +-
> drivers/net/ethernet/intel/ice/ice_txrx.c | 40 ++-
> drivers/net/ethernet/intel/ice/ice_txrx.h | 18 +-
> drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 2 +-
> drivers/net/ethernet/intel/ice/ice_xsk.c | 25 +-
> 9 files changed, 359 insertions(+), 58 deletions(-)
>
Tested-by: Gurucharan <gurucharanx.g at intel.com> (A Contingent worker at Intel)
More information about the Intel-wired-lan
mailing list