> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of Jacob > Keller > Sent: 21 November 2025 01:51 > To: Loktionov, Aleksandr <[email protected]>; Lobakin, Aleksander > <[email protected]>; Nguyen, Anthony L > <[email protected]>; Kitszel, Przemyslaw > <[email protected]> > Cc: Simon Horman <[email protected]>; [email protected]; > [email protected]; Keller, Jacob E <[email protected]>; > Loktionov, Aleksandr <[email protected]> > Subject: [Intel-wired-lan] [PATCH iwl-next v4 4/6] ice: use u64_stats API to > access pkts/bytes in dim sample > > The __ice_update_sample and __ice_get_ethtool_stats functions directly > accesses the pkts and bytes counters from the ring stats. A following change > is going to update the fields to be u64_stats_t type, and will need to be > accessed appropriately. This will ensure that the accesses do not cause > load/store tearing. > > Add helper functions similar to the ones used for updating the stats values, > and use them. This ensures use of the syncp pointer on 32-bit architectures. > Once the fields are updated to u64_stats_t, it will then properly avoid tears > on all architectures. > > Reviewed-by: Aleksandr Loktionov <[email protected]> > Signed-off-by: Jacob Keller <[email protected]> > --- > drivers/net/ethernet/intel/ice/ice_lib.h | 6 +++++ > drivers/net/ethernet/intel/ice/ice_ethtool.c | 26 +++++++++++++------- > drivers/net/ethernet/intel/ice/ice_lib.c | 36 ++++++++++++++++++++++++++++ > drivers/net/ethernet/intel/ice/ice_txrx.c | 29 +++++++++++----------- > 4 files changed, 75 insertions(+), 22 deletions(-) >
Tested-by: Rinitha S <[email protected]> (A Contingent worker at Intel)
