patch 'net/ice: fix variable shadowing' has been queued to stable release 23.11.7
Shani Peretz
shperetz at nvidia.com
Tue Mar 31 08:23:45 CEST 2026
Hi,
FYI, your patch has been queued to stable release 23.11.7
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/05/26. 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/shanipr/dpdk-stable
This queued commit can be viewed at:
https://github.com/shanipr/dpdk-stable/commit/145904ad882c5b2a33377cdda349d18824e26dba
Thanks.
Shani
---
>From 145904ad882c5b2a33377cdda349d18824e26dba Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Wed, 14 Jan 2026 15:44:29 +0000
Subject: [PATCH] net/ice: fix variable shadowing
[ upstream commit 085df9fdcbceb2453deee4b55750c51cf30ba8a8 ]
The RTE_MIN macro used newly-defined local variables internally, which
means that it had variable shadowing issues when one RTE_MIN call was
used inside another. Fix this for ice driver by using two separate
RTE_MIN calls to have the same effect.
Fixes: 8c03aa5e00f0 ("net/ice: optimize maximum queue number calculation")
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
drivers/net/ice/ice_ethdev.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
index fc6fc1a3e8..ef101bbed5 100644
--- a/drivers/net/ice/ice_ethdev.c
+++ b/drivers/net/ice/ice_ethdev.c
@@ -879,12 +879,13 @@ ice_vsi_config_tc_queue_mapping(struct ice_vsi *vsi,
}
/* vector 0 is reserved and 1 vector for ctrl vsi */
- if (vsi->adapter->hw.func_caps.common_cap.num_msix_vectors < 2)
+ if (vsi->adapter->hw.func_caps.common_cap.num_msix_vectors < 2) {
vsi->nb_qps = 0;
- else
- vsi->nb_qps = RTE_MIN
- ((uint16_t)vsi->adapter->hw.func_caps.common_cap.num_msix_vectors - 2,
- RTE_MIN(vsi->nb_qps, ICE_MAX_Q_PER_TC));
+ } else {
+ vsi->nb_qps = RTE_MIN(vsi->nb_qps, ICE_MAX_Q_PER_TC);
+ vsi->nb_qps = RTE_MIN(vsi->nb_qps,
+ (uint16_t)vsi->adapter->hw.func_caps.common_cap.num_msix_vectors - 2);
+ }
/* nb_qps(hex) -> fls */
/* 0000 -> 0 */
--
2.43.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-31 00:32:31.834192936 +0300
+++ 0026-net-ice-fix-variable-shadowing.patch 2026-03-31 00:32:28.732345000 +0300
@@ -1 +1 @@
-From 085df9fdcbceb2453deee4b55750c51cf30ba8a8 Mon Sep 17 00:00:00 2001
+From 145904ad882c5b2a33377cdda349d18824e26dba Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 085df9fdcbceb2453deee4b55750c51cf30ba8a8 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -17,2 +18,2 @@
- drivers/net/intel/ice/ice_ethdev.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
+ drivers/net/ice/ice_ethdev.c | 11 ++++++-----
+ 1 file changed, 6 insertions(+), 5 deletions(-)
@@ -20,6 +21,10 @@
-diff --git a/drivers/net/intel/ice/ice_ethdev.c b/drivers/net/intel/ice/ice_ethdev.c
-index c721d135f5..3242572cd8 100644
---- a/drivers/net/intel/ice/ice_ethdev.c
-+++ b/drivers/net/intel/ice/ice_ethdev.c
-@@ -999,9 +999,9 @@ ice_vsi_config_tc_queue_mapping(struct ice_hw *hw, struct ice_vsi *vsi,
- if (vsi->adapter->hw.func_caps.common_cap.num_msix_vectors < 2) {
+diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c
+index fc6fc1a3e8..ef101bbed5 100644
+--- a/drivers/net/ice/ice_ethdev.c
++++ b/drivers/net/ice/ice_ethdev.c
+@@ -879,12 +879,13 @@ ice_vsi_config_tc_queue_mapping(struct ice_vsi *vsi,
+ }
+
+ /* vector 0 is reserved and 1 vector for ctrl vsi */
+- if (vsi->adapter->hw.func_caps.common_cap.num_msix_vectors < 2)
++ if (vsi->adapter->hw.func_caps.common_cap.num_msix_vectors < 2) {
@@ -27 +32 @@
- } else {
+- else
@@ -30,0 +36 @@
++ } else {
@@ -33,0 +40 @@
++ }
@@ -35,2 +42,2 @@
- /* cap max QPs to what the HW reports as num-children for each layer.
- * Multiply num_children for each layer from the entry_point layer to
+ /* nb_qps(hex) -> fls */
+ /* 0000 -> 0 */
More information about the stable
mailing list