[v1,3/4] test/power: fix low freq test when turbo enabled

Message ID 20210422144030.16746-3-david.hunt@intel.com (mailing list archive)
State Superseded, archived
Delegated to: Thomas Monjalon
Headers
Series [v1,1/4] test/power: fix check for cpu frequency |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Hunt, David April 22, 2021, 2:40 p.m. UTC
  With the intel_pstate driver and turbo enabled, indexing is slightly
different to normal, so to get the test to work properly, enable
turbo at the start.

Fixes: ed7c51a6a680 ("app/test: vm power management")
Cc: stable@dpdk.org

Signed-off-by: David Hunt <david.hunt@intel.com>
---
 app/test/test_power_cpufreq.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index 33a68cf645..e2be807318 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -249,6 +249,8 @@  check_power_freq_down(void)
 {
 	int ret;
 
+	rte_power_freq_enable_turbo(TEST_POWER_LCORE_ID);
+
 	/* test with an invalid lcore id */
 	ret = rte_power_freq_down(TEST_POWER_LCORE_INVALID);
 	if (ret >= 0) {