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 E8A9BA0C41 for ; Wed, 12 May 2021 18:33:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BD1334110B; Wed, 12 May 2021 18:33:21 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 8A8AD4003F; Wed, 12 May 2021 18:33:17 +0200 (CEST) IronPort-SDR: ctFRmRksIE2t8HEEFMaAEj4RwcAzroxnVpOBhmS7s0gTK1lRa6DvvXaYWypkILSfvUrArD7U7m wiK660qzEHRg== X-IronPort-AV: E=McAfee;i="6200,9189,9982"; a="180014981" X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="180014981" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 May 2021 09:33:07 -0700 IronPort-SDR: VEsk1dMMcAZva/QwFsFVYQ09kIicQXyF6JS3otRZT7jrgHYtYCHITREXpWBNXKKTPclPhaf+Sh jUzRH5FwrQxQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.82,293,1613462400"; d="scan'208";a="430816430" Received: from silpixa00399952.ir.intel.com (HELO silpixa00399952.ger.corp.intel.com) ([10.237.222.38]) by orsmga007.jf.intel.com with ESMTP; 12 May 2021 09:33:06 -0700 From: David Hunt To: dev@dpdk.org Cc: david.hunt@intel.com, stable@dpdk.org Date: Wed, 12 May 2021 17:32:54 +0100 Message-Id: <20210512163254.9945-4-david.hunt@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210512163254.9945-1-david.hunt@intel.com> References: <20210422144030.16746-1-david.hunt@intel.com> <20210512163254.9945-1-david.hunt@intel.com> Subject: [dpdk-stable] [PATCH v2 4/4] test/power: fix turbo test 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" 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 --- 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