patch 'net/ice: fix statistics' has been queued to stable release 24.11.4
Kevin Traynor
ktraynor at redhat.com
Fri Nov 21 12:20:55 CET 2025
Hi,
FYI, your patch has been queued to stable release 24.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/26/25. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1e30fd1b8e0ec3383b899f86310076a3a2099a51
Thanks.
Kevin
---
>From 1e30fd1b8e0ec3383b899f86310076a3a2099a51 Mon Sep 17 00:00:00 2001
From: Zhichao Zeng <zhichaox.zeng at intel.com>
Date: Thu, 13 Nov 2025 15:47:10 +0800
Subject: [PATCH] net/ice: fix statistics
[ upstream commit 9ac3d9cc61bc70fdc6dff14969a7111a673be932 ]
The statistics contain 40 bits. The lower 32 bits are read first, followed
by the upper 8 bits.
In some cases, after reading the lower 32 bits, a carry occurs from
the lower bits, which causes the final statistics to be incorrect.
This commit fixes this issue.
Fixes: a37bde56314d ("net/ice: support statistics")
Signed-off-by: Zhichao Zeng <zhichaox.zeng at intel.com>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/net/ice/ice_ethdev.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index ada0558863..4f122f946c 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -5968,8 +5968,14 @@ ice_stat_update_40(struct ice_hw *hw,
{
uint64_t new_data;
+ uint32_t lo_old, hi, lo;
- new_data = (uint64_t)ICE_READ_REG(hw, loreg);
- new_data |= (uint64_t)(ICE_READ_REG(hw, hireg) & ICE_8_BIT_MASK) <<
- ICE_32_BIT_WIDTH;
+ do {
+ lo_old = ICE_READ_REG(hw, loreg);
+ hi = ICE_READ_REG(hw, hireg);
+ lo = ICE_READ_REG(hw, loreg);
+ } while (lo_old > lo);
+
+ new_data = (uint64_t)lo;
+ new_data |= (uint64_t)(hi & ICE_8_BIT_MASK) << ICE_32_BIT_WIDTH;
if (!offset_loaded)
--
2.51.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-11-21 11:05:11.789942447 +0000
+++ 0071-net-ice-fix-statistics.patch 2025-11-21 11:05:09.550201540 +0000
@@ -1 +1 @@
-From 9ac3d9cc61bc70fdc6dff14969a7111a673be932 Mon Sep 17 00:00:00 2001
+From 1e30fd1b8e0ec3383b899f86310076a3a2099a51 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9ac3d9cc61bc70fdc6dff14969a7111a673be932 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
- drivers/net/intel/ice/ice_ethdev.c | 12 +++++++++---
+ drivers/net/ice/ice_ethdev.c | 12 +++++++++---
@@ -23,5 +24,5 @@
-diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
-index c1d92435d1..c721d135f5 100644
---- a/drivers/net/intel/ice/ice_ethdev.c
-+++ b/drivers/net/intel/ice/ice_ethdev.c
-@@ -6418,8 +6418,14 @@ ice_stat_update_40(struct ice_hw *hw,
+diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
+index ada0558863..4f122f946c 100644
+--- a/drivers/net/ice/ice_ethdev.c
++++ b/drivers/net/ice/ice_ethdev.c
+@@ -5968,8 +5968,14 @@ ice_stat_update_40(struct ice_hw *hw,
More information about the stable
mailing list