[PATCH iwl-net 10/10] ice: fix unsigned stat widths
Loktionov, Aleksandr
aleksandr.loktionov at intel.com
Fri Oct 2 13:12:19 UTC 2026
> -----Original Message-----
> From: Petr Oros <poros at redhat.com>
> Sent: Friday, October 2, 2026 3:08 PM
> To: netdev at vger.kernel.org
> Cc: Oros, Petr <poros at redhat.com>; Nguyen, Anthony L
> <anthony.l.nguyen at intel.com>; Kitszel, Przemyslaw
> <przemyslaw.kitszel at intel.com>; Andrew Lunn <andrew+netdev at lunn.ch>;
> David S. Miller <davem at davemloft.net>; Eric Dumazet
> <edumazet at kernel.org>; Jakub Kicinski <kuba at kernel.org>; Paolo Abeni
> <pabeni at redhat.com>; Lobakin, Aleksander
> <aleksander.lobakin at intel.com>; Alexei Starovoitov <ast at kernel.org>;
> Daniel Borkmann <daniel at iogearbox.net>; Jesper Dangaard Brouer
> <hawk at kernel.org>; John Fastabend <john.fastabend at gmail.com>;
> Stanislav Fomichev <sdf at fomichev.me>; Henry Tieman
> <henry.w.tieman at intel.com>; Anirudh Venkataramanan
> <anirudh.venkataramanan at intel.com>; Michal Swiatkowski
> <michal.swiatkowski at linux.intel.com>; Jesse Brandeburg
> <jbrandeb at kernel.org>; Preethi Banala <preethi.banala at intel.com>;
> Kiran Patil <kiran.patil at intel.com>; Dan Nowlin
> <dan.nowlin at intel.com>; Stephen Hemminger
> <stephen at networkplumber.org>; intel-wired-lan at lists.osuosl.org; linux-
> kernel at vger.kernel.org; bpf at vger.kernel.org
> Subject: [PATCH iwl-net 10/10] ice: fix unsigned stat widths
>
> tx_restart, tx_busy, rx_buf_failed and rx_page_failed in struct
> ice_vsi are u32, but ice_update_vsi_ring_stats() fills them with sums
> of the 64-bit per ring counters. The values are truncated and the
> ethtool statistics exported from them wrap at 2^32 while the ring
> counters keep counting.
>
> Make them u64 like tx_linearize next to them.
>
> i40e fixed the same truncation in commit 3b8428b84539 ("i40e: fix
> unsigned stat widths").
>
> Fixes: fcea6f3da546 ("ice: Add stats and ethtool support")
> Assisted-by: LLM
> Signed-off-by: Petr Oros <poros at redhat.com>
> ---
> drivers/net/ethernet/intel/ice/ice.h | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/ice/ice.h
> b/drivers/net/ethernet/intel/ice/ice.h
> index 6c596e5a315175..a985b81efbe2d6 100644
> --- a/drivers/net/ethernet/intel/ice/ice.h
> +++ b/drivers/net/ethernet/intel/ice/ice.h
> @@ -344,10 +344,10 @@ struct ice_vsi {
> u64 tx_linearize;
> DECLARE_BITMAP(state, ICE_VSI_STATE_NBITS);
> unsigned int current_netdev_flags;
> - u32 tx_restart;
> - u32 tx_busy;
> - u32 rx_buf_failed;
> - u32 rx_page_failed;
> + u64 tx_restart;
> + u64 tx_busy;
> + u64 rx_buf_failed;
> + u64 rx_page_failed;
> u16 num_q_vectors;
> /* tell if only dynamic irq allocation is allowed */
> bool irq_dyn_alloc;
> --
> 2.55.0
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov at intel.com>
More information about the Intel-wired-lan
mailing list