patch 'examples/l3fwd-power: fix uncore deinit for non-legacy' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Tue Oct 27 12:50:14 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 10/29/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/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/1976f98d0ef45e443238fbe0b33d18d882d8d6a4
Thanks.
Luca Boccassi
---
>From 1976f98d0ef45e443238fbe0b33d18d882d8d6a4 Mon Sep 17 00:00:00 2001
From: Huisong Li <lihuisong at huawei.com>
Date: Wed, 12 Aug 2026 17:49:51 +0800
Subject: [PATCH] examples/l3fwd-power: fix uncore deinit for non-legacy
[ upstream commit da43de491a7906292cd08ab16fac4db5d53b6baa ]
Uncore resources were not being deinitialized in non-legacy modes (such
as pmd-mgmt), causing the uncore frequency not to return to its original
value after the application exited.
The root cause is that uncore initialization can be performed for all
modes, whereas the deinitialization logic is incorrectly restricted
to legacy mode only. So do the deinitialization of uncore on all app
modes.
Fixes: 10db2a5b8724 ("examples/l3fwd-power: add options for uncore frequency")
Signed-off-by: Huisong Li <lihuisong at huawei.com>
---
examples/l3fwd-power/main.c | 66 ++++++++++++++++++++-----------------
1 file changed, 35 insertions(+), 31 deletions(-)
diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c
index 0d667394b27..5c735f2883c 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -2254,28 +2254,31 @@ init_power_library(void)
unsigned int lcore_id;
int ret = 0;
- RTE_LCORE_FOREACH(lcore_id) {
- /* init power management library */
- ret = rte_power_init(lcore_id);
- if (ret) {
- RTE_LOG(ERR, L3FWD_POWER,
- "Library initialization failed on core %u\n",
- lcore_id);
- return ret;
- }
- /* we're not supporting the VM channel mode */
- env = rte_power_get_env();
- if (env != PM_ENV_ACPI_CPUFREQ &&
- env != PM_ENV_PSTATE_CPUFREQ &&
- env != PM_ENV_AMD_PSTATE_CPUFREQ &&
- env != PM_ENV_CPPC_CPUFREQ) {
- RTE_LOG(ERR, L3FWD_POWER,
- "Only ACPI and PSTATE mode are supported\n");
- return -1;
+ /* only legacy mode relies on the initialization of cpufreq library */
+ if (app_mode == APP_MODE_LEGACY) {
+ RTE_LCORE_FOREACH(lcore_id) {
+ /* init power management library */
+ ret = rte_power_init(lcore_id);
+ if (ret) {
+ RTE_LOG(ERR, L3FWD_POWER,
+ "Library initialization failed on core %u\n",
+ lcore_id);
+ return ret;
+ }
+ /* we're not supporting the VM channel mode */
+ env = rte_power_get_env();
+ if (env != PM_ENV_ACPI_CPUFREQ &&
+ env != PM_ENV_PSTATE_CPUFREQ &&
+ env != PM_ENV_AMD_PSTATE_CPUFREQ &&
+ env != PM_ENV_CPPC_CPUFREQ) {
+ RTE_LOG(ERR, L3FWD_POWER,
+ "Only ACPI and PSTATE mode are supported\n");
+ return -1;
+ }
}
}
- if (cpu_resume_latency != -1) {
+ if (app_mode == APP_MODE_LEGACY && cpu_resume_latency != -1) {
RTE_LCORE_FOREACH(lcore_id) {
/* Back old CPU resume latency. */
ret = rte_power_qos_get_cpu_resume_latency(lcore_id);
@@ -2313,14 +2316,16 @@ deinit_power_library(void)
unsigned int lcore_id, max_pkg, max_die, die, pkg;
int ret = 0;
- RTE_LCORE_FOREACH(lcore_id) {
- /* deinit power management library */
- ret = rte_power_exit(lcore_id);
- if (ret) {
- RTE_LOG(ERR, L3FWD_POWER,
- "Library deinitialization failed on core %u\n",
- lcore_id);
- return ret;
+ if (app_mode == APP_MODE_LEGACY) {
+ RTE_LCORE_FOREACH(lcore_id) {
+ /* deinit power management library */
+ ret = rte_power_exit(lcore_id);
+ if (ret) {
+ RTE_LOG(ERR, L3FWD_POWER,
+ "Library deinitialization failed on core %u\n",
+ lcore_id);
+ return ret;
+ }
}
}
@@ -2344,7 +2349,7 @@ deinit_power_library(void)
}
}
- if (cpu_resume_latency != -1) {
+ if (app_mode == APP_MODE_LEGACY && cpu_resume_latency != -1) {
RTE_LCORE_FOREACH(lcore_id) {
/* Restore the original value. */
rte_power_qos_set_cpu_resume_latency(lcore_id,
@@ -2586,8 +2591,7 @@ main(int argc, char **argv)
RTE_LOG(INFO, L3FWD_POWER, "Selected operation mode: %s\n",
mode_to_str(app_mode));
- /* only legacy mode relies on power library */
- if ((app_mode == APP_MODE_LEGACY) && init_power_library())
+ if (init_power_library())
rte_exit(EXIT_FAILURE, "init_power_library failed\n");
if (update_lcore_params() < 0)
@@ -2959,7 +2963,7 @@ main(int argc, char **argv)
rte_eth_dev_close(portid);
}
- if ((app_mode == APP_MODE_LEGACY) && deinit_power_library())
+ if (deinit_power_library())
rte_exit(EXIT_FAILURE, "deinit_power_library failed\n");
if (rte_eal_cleanup() < 0)
--
2.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-10-27 11:43:58.360862206 +0000
+++ 0120-examples-l3fwd-power-fix-uncore-deinit-for-non-legac.patch 2026-10-27 11:43:53.650063658 +0000
@@ -1 +1 @@
-From da43de491a7906292cd08ab16fac4db5d53b6baa Mon Sep 17 00:00:00 2001
+From 1976f98d0ef45e443238fbe0b33d18d882d8d6a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit da43de491a7906292cd08ab16fac4db5d53b6baa ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index 705cab8f2d..4b0128eeaa 100644
+index 0d667394b27..5c735f2883c 100644
@@ -27 +28 @@
-@@ -2270,28 +2270,31 @@ init_power_library(void)
+@@ -2254,28 +2254,31 @@ init_power_library(void)
@@ -78 +79 @@
-@@ -2329,14 +2332,16 @@ deinit_power_library(void)
+@@ -2313,14 +2316,16 @@ deinit_power_library(void)
@@ -103 +104 @@
-@@ -2360,7 +2365,7 @@ deinit_power_library(void)
+@@ -2344,7 +2349,7 @@ deinit_power_library(void)
@@ -112 +113 @@
-@@ -2602,8 +2607,7 @@ main(int argc, char **argv)
+@@ -2586,8 +2591,7 @@ main(int argc, char **argv)
@@ -122 +123 @@
-@@ -2975,7 +2979,7 @@ main(int argc, char **argv)
+@@ -2959,7 +2963,7 @@ main(int argc, char **argv)
More information about the stable
mailing list