[dpdk-stable] patch 'Revert "test/power: fix CPU frequency when turbo enabled"' has been queued to stable release 20.11.3

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 12 15:05:45 CEST 2021


Hi,

FYI, your patch has been queued to stable release 20.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/14/21. 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/234cd7c51de33f16d3ab6eeb4b3b3906155ae12d

Thanks.

Luca Boccassi

---
>From 234cd7c51de33f16d3ab6eeb4b3b3906155ae12d Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi at microsoft.com>
Date: Mon, 12 Jul 2021 12:53:43 +0100
Subject: [PATCH] Revert "test/power: fix CPU frequency when turbo enabled"

This reverts commit b9599ebada5a044d4e143ce641cd32a49c4db19b.
---
 app/test/test_power_cpufreq.c | 21 ++++++++-------------
 1 file changed, 8 insertions(+), 13 deletions(-)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index ac71babcce..0c3adc5f33 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -55,9 +55,7 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
 	FILE *f;
 	char fullpath[PATH_MAX];
 	char buf[BUFSIZ];
-	enum power_management_env env;
 	uint32_t cur_freq;
-	uint32_t freq_conv;
 	int ret = -1;
 	int i;
 
@@ -82,18 +80,15 @@ check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo)
 			goto fail_all;
 
 		cur_freq = strtoul(buf, NULL, TEST_POWER_CONVERT_TO_DECIMAL);
-		freq_conv = cur_freq;
 
-		env = rte_power_get_env();
-		if (env == PM_ENV_CPPC_CPUFREQ) {
-			/* convert the frequency to nearest 100000 value
-			 * Ex: if cur_freq=1396789 then freq_conv=1400000
-			 * Ex: if cur_freq=800030 then freq_conv=800000
-			 */
-			freq_conv = (cur_freq + TEST_FREQ_ROUNDING_DELTA)
-						/ TEST_ROUND_FREQ_TO_N_100000;
-			freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;
-		}
+		/* convert the frequency to nearest 100000 value
+		 * Ex: if cur_freq=1396789 then freq_conv=1400000
+		 * Ex: if cur_freq=800030 then freq_conv=800000
+		 */
+		unsigned int freq_conv = 0;
+		freq_conv = (cur_freq + TEST_FREQ_ROUNDING_DELTA)
+					/ TEST_ROUND_FREQ_TO_N_100000;
+		freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000;
 
 		if (turbo)
 			ret = (freqs[idx] <= freq_conv ? 0 : -1);
-- 
2.30.2



More information about the stable mailing list