[PATCH v2 3/3] test/power: fix nominal frequency check with amd-pstate

Stephen Hemminger stephen at networkplumber.org
Tue Sep 8 18:52:34 CEST 2026


The turbo test checks that the core runs at frequency index 1 after
scaling up with turbo disabled. That index is only nominal for
acpi-cpufreq; amd-pstate spreads its buckets between scaling_min_freq
and scaling_max_freq, putting nominal at index 47 on a Ryzen 9 7945HX.
Use the index reported by rte_power_get_freq() instead.

Fixes: 1ed04d33cf19 ("power: support amd-pstate cpufreq driver")
Cc: stable at dpdk.org

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 app/test/test_power_cpufreq.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 08bce4c0d1..1f79b80e6f 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -486,8 +486,9 @@ check_power_turbo(void)
 		return -1;
 	}
 
-	/* Check the current frequency */
-	ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);
+	/* Nominal frequency is not at a fixed index in the table. */
+	ret = check_cur_freq(TEST_POWER_LCORE_ID,
+			rte_power_get_freq(TEST_POWER_LCORE_ID), false);
 	if (ret < 0)
 		return -1;
 
-- 
2.53.0



More information about the stable mailing list