All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Hunt <david.hunt@intel.com>
To: dev@dpdk.org
Cc: david.hunt@intel.com, stable@dpdk.org
Subject: [dpdk-dev] [PATCH v2 4/4] test/power: fix turbo test
Date: Wed, 12 May 2021 17:32:54 +0100	[thread overview]
Message-ID: <20210512163254.9945-4-david.hunt@intel.com> (raw)
In-Reply-To: <20210512163254.9945-1-david.hunt@intel.com>

when turbo is enabled or disabled, the frequency is set to a low non-turbo
frequency, so we need to set to the frequency expected by the test before
checking.

Fixes: aeaeaf5f2d62 ("test/power: add cases for turbo feature")
Cc: stable@dpdk.org

Signed-off-by: David Hunt <david.hunt@intel.com>

---
changes in v2
   none
---
 app/test/test_power_cpufreq.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c
index c24b706f4f..0c3adc5f33 100644
--- a/app/test/test_power_cpufreq.c
+++ b/app/test/test_power_cpufreq.c
@@ -436,6 +436,12 @@ check_power_turbo(void)
 				TEST_POWER_LCORE_ID);
 		return -1;
 	}
+	ret = rte_power_freq_max(TEST_POWER_LCORE_ID);
+	if (ret < 0) {
+		printf("Fail to scale up the freq to max on lcore %u\n",
+						TEST_POWER_LCORE_ID);
+		return -1;
+	}
 
 	/* Check the current frequency */
 	ret = check_cur_freq(TEST_POWER_LCORE_ID, 0, true);
@@ -455,6 +461,12 @@ check_power_turbo(void)
 				TEST_POWER_LCORE_ID);
 		return -1;
 	}
+	ret = rte_power_freq_max(TEST_POWER_LCORE_ID);
+	if (ret < 0) {
+		printf("Fail to scale up the freq to max on lcore %u\n",
+						TEST_POWER_LCORE_ID);
+		return -1;
+	}
 
 	/* Check the current frequency */
 	ret = check_cur_freq(TEST_POWER_LCORE_ID, 1, false);
-- 
2.17.1


  parent reply	other threads:[~2021-05-12 16:33 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-22 14:40 [dpdk-dev] [PATCH v1 1/4] test/power: fix check for cpu frequency David Hunt
2021-04-22 14:40 ` [dpdk-dev] [PATCH v1 2/4] test/power: add turbo mode to freq check function David Hunt
2021-04-22 16:13   ` Burakov, Anatoly
2021-05-12 15:34     ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2021-05-12 16:38       ` David Hunt
2021-04-22 14:40 ` [dpdk-dev] [PATCH v1 3/4] test/power: fix low freq test when turbo enabled David Hunt
2021-04-22 14:40 ` [dpdk-dev] [PATCH v1 4/4] test/power: fix turbo test David Hunt
2021-04-29 10:34 ` [dpdk-dev] [PATCH v1 1/4] test/power: fix check for cpu frequency Pattan, Reshma
2021-05-11 13:27   ` [dpdk-dev] [dpdk-stable] " Thomas Monjalon
2021-05-11 14:41   ` [dpdk-dev] " David Hunt
2021-05-11 14:46     ` Pattan, Reshma
2021-05-12 16:32 ` [dpdk-dev] [PATCH v2 " David Hunt
2021-05-12 16:32   ` [dpdk-dev] [PATCH v2 2/4] test/power: add turbo mode to freq check function David Hunt
2021-05-12 16:32   ` [dpdk-dev] [PATCH v2 3/4] test/power: fix low freq test when turbo enabled David Hunt
2021-05-12 16:32   ` David Hunt [this message]
2021-05-12 20:05     ` [dpdk-dev] [dpdk-stable] [PATCH v2 4/4] test/power: fix turbo test Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210512163254.9945-4-david.hunt@intel.com \
    --to=david.hunt@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.