• Benjamin Mikailenko's avatar
    ice: Accumulate ring statistics over reset · 288ecf49
    Benjamin Mikailenko authored
    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: default avatarBenjamin Mikailenko <benjamin.mikailenko@intel.com>
    Tested-by: Gurucharan G <gurucharanx.g@intel.com> (A Contingent worker at Intel)
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    288ecf49
ice_repr.c 11.3 KB