]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ice: pass pointer to ice_fetch_u64_stats_per_ring
authorJacob Keller <jacob.e.keller@intel.com>
Thu, 20 Nov 2025 20:20:42 +0000 (12:20 -0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Mon, 26 Jan 2026 17:32:35 +0000 (09:32 -0800)
commitfb5b8f3c887067a925e021c148ae41bb88f4d22b
tree1711b08af15c8c8b1f87183bafae2c831580d823
parentbf2e36c9dab95e41516fbcf7b1cc804539b2d021
ice: pass pointer to ice_fetch_u64_stats_per_ring

The ice_fetch_u64_stats_per_ring function takes a pointer to the syncp from
the ring stats to synchronize reading of the packet stats. It also takes a
*copy* of the ice_q_stats fields instead of a pointer to the stats. This
completely defeats the point of using the u64_stats API. We pass the stats
by value, so they are static at the point of reading within the
u64_stats_fetch_retry loop.

Simplify the function to take a pointer to the ice_ring_stats instead of
two separate parameters. Additionally, since we never call this outside of
ice_main.c, make it a static function.

Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Rinitha S <sx.rinitha@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice.h
drivers/net/ethernet/intel/ice/ice_main.c