Fix OOB access to the stats arrays. The first commit (new in v5) fixes stats code against VSI_CHNL case (ADQ).
Next three commits are simple refactors to make the rest smaller, the fifth one untangles the logic/lifetime of the stats array entries, then we have the final fix for OOB access to the stats array (combined for both PF and VF VSIs. v5 handles now also the PF VSI stats resizes better, fixing devlink reload issue reported in v4 by Clashiko. v0 https://lore.kernel.org/netdev/[email protected] v2 https://sashiko.dev/#/message/20260812204619.32253-3-przemyslaw.kitszel%40intel.com v4 (a resend of ~the same v3) https://lore.kernel.org/netdev/[email protected] Most notable changes in v5 already noted in the cover letter, individual patches have much more notes. --- Przemek Kitszel (6): ice: skip stats handling for channel VSIs on rebuild ice: extract __ice_vsi_free_stats() ice: extract ice_vsi_new_stat_arrays() ice: extract ice_vsi_get_num_qs() ice: rebuild ring stats arrays instead of reallocating them in place ice: size ring stats arrays from the final queue count drivers/net/ethernet/intel/ice/ice.h | 8 +- drivers/net/ethernet/intel/ice/ice_lib.c | 343 ++++++++++++++--------- 2 files changed, 210 insertions(+), 141 deletions(-) -- 2.51.1
