patch 'net/ice: fix statistics' has been queued to stable release 22.11.11
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Thu Nov 20 13:44:36 CET 2025
Hi,
FYI, your patch has been queued to stable release 22.11.11
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/22/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/7759b183a64b85b6db7b1a44a866c127a472afd8
Thanks.
Luca Boccassi
---
>From 7759b183a64b85b6db7b1a44a866c127a472afd8 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 591d067851..fb92d81e7f 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -5299,10 +5299,16 @@ ice_stat_update_40(struct ice_hw *hw,
uint64_t *stat)
{
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)
*offset = new_data;
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-11-20 12:44:12.940659364 +0000
+++ 0004-net-ice-fix-statistics.patch 2025-11-20 12:44:12.774087887 +0000
@@ -1 +1 @@
-From 9ac3d9cc61bc70fdc6dff14969a7111a673be932 Mon Sep 17 00:00:00 2001
+From 7759b183a64b85b6db7b1a44a866c127a472afd8 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
-@@ -6417,10 +6417,16 @@ 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 591d067851..fb92d81e7f 100644
+--- a/drivers/net/ice/ice_ethdev.c
++++ b/drivers/net/ice/ice_ethdev.c
+@@ -5299,10 +5299,16 @@ ice_stat_update_40(struct ice_hw *hw,
More information about the stable
mailing list