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 6BFFEA0548; Thu, 22 Apr 2021 16:41:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 442F541DA5; Thu, 22 Apr 2021 16:40:45 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 5E96241D92; Thu, 22 Apr 2021 16:40:41 +0200 (CEST) IronPort-SDR: TUX8+pkifgNVXEoBKsSiCxWusf+O8++YWDaL8Qmyq6kO8ETHHxgEeYQ9Xd/JqDvTFMPqpS7lIr ZtWHif2Pa7iA== X-IronPort-AV: E=McAfee;i="6200,9189,9962"; a="192709713" X-IronPort-AV: E=Sophos;i="5.82,242,1613462400"; d="scan'208";a="192709713" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2021 07:40:39 -0700 IronPort-SDR: Kn1Fh05hrIedZh1zJ/HZAxAYfkixeuuqNd6Wu8eleErGGhFiFwsP2G79B1vAzFcyq7jgWMpJUB B7KgvFE8DYWg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,242,1613462400"; d="scan'208";a="453274005" Received: from silpixa00399952.ir.intel.com (HELO silpixa00399952.ger.corp.intel.com) ([10.237.222.38]) by FMSMGA003.fm.intel.com with ESMTP; 22 Apr 2021 07:40:37 -0700 From: David Hunt To: dev@dpdk.org Cc: david.hunt@intel.com, stable@dpdk.org Date: Thu, 22 Apr 2021 15:40:30 +0100 Message-Id: <20210422144030.16746-4-david.hunt@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210422144030.16746-1-david.hunt@intel.com> References: <20210422144030.16746-1-david.hunt@intel.com> Subject: [dpdk-dev] [PATCH v1 4/4] test/power: fix turbo test X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 --- 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 e2be807318..ceffebc428 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, 1); @@ -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, 0); -- 2.17.1