From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8AD20A0C45 for ; Thu, 10 Jun 2021 14:08:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D23140FDF; Thu, 10 Jun 2021 14:08:09 +0200 (CEST) Received: from youngberry.canonical.com (youngberry.canonical.com [91.189.89.112]) by mails.dpdk.org (Postfix) with ESMTP id 7F9954003C for ; Thu, 10 Jun 2021 14:08:08 +0200 (CEST) Received: from 2.general.paelzer.uk.vpn ([10.172.196.173] helo=localhost.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lrJTk-0000BE-AO; Thu, 10 Jun 2021 12:08:08 +0000 From: Christian Ehrhardt To: David Hunt Cc: dpdk stable Date: Thu, 10 Jun 2021 14:06:26 +0200 Message-Id: <20210610120641.885862-38-christian.ehrhardt@canonical.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210610120641.885862-1-christian.ehrhardt@canonical.com> References: <20210610120641.885862-1-christian.ehrhardt@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'test/power: add turbo mode to frequency check' has been queued to stable release 19.11.9 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 19.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 06/12/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/cpaelzer/dpdk-stable-queue This queued commit can be viewed at: https://github.com/cpaelzer/dpdk-stable-queue/commit/bad1135b3c27b62436d1f7c1e2463a0c1d60cba9 Thanks. Christian Ehrhardt --- >From bad1135b3c27b62436d1f7c1e2463a0c1d60cba9 Mon Sep 17 00:00:00 2001 From: David Hunt Date: Wed, 12 May 2021 17:32:52 +0100 Subject: [PATCH] test/power: add turbo mode to frequency check [ upstream commit 6db92b3b9bb130acf0bc9d774ab2d75ea67d00df ] With the intel_pstate driver and turbo enabled, the top frequency in the frequency array is the P1+1, i.e. 2300001, whereas the frequency shown in scaling_cur_freq could be a lot higher. This patch adds a flag to the check_cur_freq function so that we can specify if a frequency is greater than expected (turbo mode), in which case the check should be successful. Fixes: aeaeaf5f2d62 ("test/power: add cases for turbo feature") Signed-off-by: David Hunt --- app/test/test_power_cpufreq.c | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c index 25e77ab375..24ecfceaaf 100644 --- a/app/test/test_power_cpufreq.c +++ b/app/test/test_power_cpufreq.c @@ -48,7 +48,7 @@ static uint32_t total_freq_num; static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX]; static int -check_cur_freq(unsigned lcore_id, uint32_t idx) +check_cur_freq(unsigned int lcore_id, uint32_t idx, bool turbo) { #define TEST_POWER_CONVERT_TO_DECIMAL 10 #define MAX_LOOP 100 @@ -90,7 +90,10 @@ check_cur_freq(unsigned lcore_id, uint32_t idx) / TEST_ROUND_FREQ_TO_N_100000; freq_conv = freq_conv * TEST_ROUND_FREQ_TO_N_100000; - ret = (freqs[idx] == freq_conv ? 0 : -1); + if (turbo) + ret = (freqs[idx] <= freq_conv ? 0 : -1); + else + ret = (freqs[idx] == freq_conv ? 0 : -1); if (ret == 0) break; @@ -183,7 +186,7 @@ check_power_get_freq(void) } /* Check the current frequency */ - ret = check_cur_freq(TEST_POWER_LCORE_ID, count); + ret = check_cur_freq(TEST_POWER_LCORE_ID, count, false); if (ret < 0) return -1; @@ -233,7 +236,7 @@ check_power_set_freq(void) } /* Check the current frequency */ - ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1); + ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false); if (ret < 0) return -1; @@ -269,7 +272,7 @@ check_power_freq_down(void) } /* Check the current frequency */ - ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1); + ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false); if (ret < 0) return -1; @@ -288,7 +291,7 @@ check_power_freq_down(void) } /* Check the current frequency */ - ret = check_cur_freq(TEST_POWER_LCORE_ID, 1); + ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false); if (ret < 0) return -1; @@ -324,7 +327,7 @@ check_power_freq_up(void) } /* Check the current frequency */ - ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 2); + ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 2, false); if (ret < 0) return -1; @@ -343,7 +346,7 @@ check_power_freq_up(void) } /* Check the current frequency */ - ret = check_cur_freq(TEST_POWER_LCORE_ID, 0); + ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true); if (ret < 0) return -1; @@ -371,7 +374,7 @@ check_power_freq_max(void) } /* Check the current frequency */ - ret = check_cur_freq(TEST_POWER_LCORE_ID, 0); + ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true); if (ret < 0) return -1; @@ -399,7 +402,7 @@ check_power_freq_min(void) } /* Check the current frequency */ - ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1); + ret = check_cur_freq(TEST_POWER_LCORE_ID, total_freq_num - 1, false); if (ret < 0) return -1; @@ -433,7 +436,7 @@ check_power_turbo(void) } /* Check the current frequency */ - ret = check_cur_freq(TEST_POWER_LCORE_ID, 0); + ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true); if (ret < 0) return -1; @@ -452,7 +455,7 @@ check_power_turbo(void) } /* Check the current frequency */ - ret = check_cur_freq(TEST_POWER_LCORE_ID, 1); + ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false); if (ret < 0) return -1; -- 2.31.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-06-10 14:04:59.863631637 +0200 +++ 0038-test-power-add-turbo-mode-to-frequency-check.patch 2021-06-10 14:04:58.066024643 +0200 @@ -1 +1 @@ -From 6db92b3b9bb130acf0bc9d774ab2d75ea67d00df Mon Sep 17 00:00:00 2001 +From bad1135b3c27b62436d1f7c1e2463a0c1d60cba9 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 6db92b3b9bb130acf0bc9d774ab2d75ea67d00df ] + @@ -15 +16,0 @@ -Cc: stable@dpdk.org @@ -23 +24 @@ -index 52f58ef8b2..2b4728d2e1 100644 +index 25e77ab375..24ecfceaaf 100644