[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <IA1PR11MB624158AA7D14FBC4CFB2AC5A8BA8A@IA1PR11MB6241.namprd11.prod.outlook.com>
Date: Thu, 18 Dec 2025 10:51:34 +0000
From: "Rinitha, SX" <sx.rinitha@...el.com>
To: "Keller, Jacob E" <jacob.e.keller@...el.com>, "Loktionov, Aleksandr"
<aleksandr.loktionov@...el.com>, "Lobakin, Aleksander"
<aleksander.lobakin@...el.com>, "Nguyen, Anthony L"
<anthony.l.nguyen@...el.com>, "Kitszel, Przemyslaw"
<przemyslaw.kitszel@...el.com>
CC: Simon Horman <horms@...nel.org>, "intel-wired-lan@...ts.osuosl.org"
<intel-wired-lan@...ts.osuosl.org>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "Keller, Jacob E" <jacob.e.keller@...el.com>,
"Loktionov, Aleksandr" <aleksandr.loktionov@...el.com>
Subject: RE: [Intel-wired-lan] [PATCH iwl-next v4 6/6] ice: convert all ring
stats to u64_stats_t
> -----Original Message-----
> From: Intel-wired-lan <intel-wired-lan-bounces@...osl.org> On Behalf Of Jacob Keller
> Sent: 21 November 2025 01:51
> To: Loktionov, Aleksandr <aleksandr.loktionov@...el.com>; Lobakin, Aleksander <aleksander.lobakin@...el.com>; Nguyen, Anthony L <anthony.l.nguyen@...el.com>; Kitszel, Przemyslaw <przemyslaw.kitszel@...el.com>
> Cc: Simon Horman <horms@...nel.org>; intel-wired-lan@...ts.osuosl.org; netdev@...r.kernel.org; Keller, Jacob E <jacob.e.keller@...el.com>; Loktionov, Aleksandr <aleksandr.loktionov@...el.com>
> Subject: [Intel-wired-lan] [PATCH iwl-next v4 6/6] ice: convert all ring stats to u64_stats_t
>
> After several cleanups, the ice driver is now finally ready to convert all Tx and Rx ring stats to the u64_stats_t and proper use of the u64 stats APIs.
>
> The final remaining part to cleanup is the VSI stats accumulation logic in ice_update_vsi_ring_stats().
>
> Refactor the function and its helpers so that all stat values (and not just pkts and bytes) use the u64_stats APIs. The ice_fetch_u64_(tx|rx)_stats functions read the stat values using u64_stats_read and then copy them into local ice_vsi_(tx|rx)_stats structures. This does require making a new struct with the stat fields as u64.
>
> The ice_update_vsi_(tx|rx)_ring_stats functions call the fetch functions per ring and accumulate the result into one copy of the struct. This accumulated total is then used to update the relevant VSI fields.
>
> Since these are relatively small, the contents are all stored on the stack rather than allocating and freeing memory.
>
> Once the accumulator side is updated, the helper ice_stats_read and ice_stats_inc and other related helper functions all easily translate to use of u64_stats_read and u64_stats_inc. This completes the refactor and ensures that all stats accesses now make proper use of the API.
>
> Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@...el.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> ---
> drivers/net/ethernet/intel/ice/ice_txrx.h | 28 +++-- drivers/net/ethernet/intel/ice/ice_lib.c | 29 ++--- drivers/net/ethernet/intel/ice/ice_main.c | 180 ++++++++++++++++++++----------
> 3 files changed, 147 insertions(+), 90 deletions(-)
>
Tested-by: Rinitha S <sx.rinitha@...el.com> (A Contingent worker at Intel)
Powered by blists - more mailing lists