patch 'power: fix variable shadowing' has been queued to stable release 23.11.7
Shani Peretz
shperetz at nvidia.com
Tue Mar 31 08:23:39 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/cd0c3aa6c818ec615c3e9b03e8d2595479aeae91
Thanks.
Shani
---
>From cd0c3aa6c818ec615c3e9b03e8d2595479aeae91 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Wed, 14 Jan 2026 15:44:22 +0000
Subject: [PATCH] power: fix variable shadowing
[ upstream commit 1893a6331a46603803a23d07a5a6a9fa564cbc3d ]
The "pause_duration" variable is a global and then shadowed as a local
var in clb_pause. Rename the local variable to allow building with
"-Wshadow".
Fixes: 4a8fbc28e431 ("power: add get/set pause duration API")
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Acked-by: Stephen Hemminger <stephen at networkplumber.org>
---
lib/power/rte_power_pmd_mgmt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/power/rte_power_pmd_mgmt.c b/lib/power/rte_power_pmd_mgmt.c
index 20aa753c3a..d11499a0ea 100644
--- a/lib/power/rte_power_pmd_mgmt.c
+++ b/lib/power/rte_power_pmd_mgmt.c
@@ -321,7 +321,7 @@ clb_pause(uint16_t port_id __rte_unused, uint16_t qidx __rte_unused,
struct queue_list_entry *queue_conf = arg;
struct pmd_core_cfg *lcore_conf;
const bool empty = nb_rx == 0;
- uint32_t pause_duration = rte_power_pmd_mgmt_get_pause_duration();
+ const uint32_t duration = rte_power_pmd_mgmt_get_pause_duration();
lcore_conf = &lcore_cfgs[lcore];
@@ -341,11 +341,11 @@ clb_pause(uint16_t port_id __rte_unused, uint16_t qidx __rte_unused,
if (global_data.intrinsics_support.power_pause) {
const uint64_t cur = rte_rdtsc();
const uint64_t wait_tsc =
- cur + global_data.tsc_per_us * pause_duration;
+ cur + global_data.tsc_per_us * duration;
rte_power_pause(wait_tsc);
} else {
uint64_t i;
- for (i = 0; i < global_data.pause_per_us * pause_duration; i++)
+ for (i = 0; i < global_data.pause_per_us * duration; i++)
rte_pause();
}
}
--
2.43.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-03-31 00:32:31.355631472 +0300
+++ 0020-power-fix-variable-shadowing.patch 2026-03-31 00:32:28.628377000 +0300
@@ -1 +1 @@
-From 1893a6331a46603803a23d07a5a6a9fa564cbc3d Mon Sep 17 00:00:00 2001
+From cd0c3aa6c818ec615c3e9b03e8d2595479aeae91 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 1893a6331a46603803a23d07a5a6a9fa564cbc3d ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 6cacc562c2..a4d53aac2a 100644
+index 20aa753c3a..d11499a0ea 100644
@@ -23 +24 @@
-@@ -337,7 +337,7 @@ clb_pause(uint16_t port_id __rte_unused, uint16_t qidx __rte_unused,
+@@ -321,7 +321,7 @@ clb_pause(uint16_t port_id __rte_unused, uint16_t qidx __rte_unused,
@@ -30 +31 @@
- lcore_conf = RTE_LCORE_VAR(lcore_cfgs);
+ lcore_conf = &lcore_cfgs[lcore];
@@ -32 +33 @@
-@@ -357,11 +357,11 @@ clb_pause(uint16_t port_id __rte_unused, uint16_t qidx __rte_unused,
+@@ -341,11 +341,11 @@ clb_pause(uint16_t port_id __rte_unused, uint16_t qidx __rte_unused,
More information about the stable
mailing list