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 53586A0579 for ; Thu, 8 Apr 2021 16:55:59 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 458F51410F8; Thu, 8 Apr 2021 16:55:59 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 830074068B; Thu, 8 Apr 2021 16:55:56 +0200 (CEST) IronPort-SDR: /N1L5c1SSlMNqSKAeoDvijcN1qmVa7ITdfUVfAs5Rg9X0xChnrJObmD874hW9QpMn6OtbBYh+k Zc/sNolhBPYA== X-IronPort-AV: E=McAfee;i="6000,8403,9948"; a="180687187" X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="180687187" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 07:55:55 -0700 IronPort-SDR: YfoNsGnWZF90a2QmdS0vGRA4SdyPa49QTaz4Zhbvb7zCQF6kdAVgn3mR8SOT+1YmqKwwKpnN1o 2b28AAyogqIA== X-IronPort-AV: E=Sophos;i="5.82,206,1613462400"; d="scan'208";a="449705921" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.235.68]) ([10.213.235.68]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Apr 2021 07:55:53 -0700 To: Richael Zhuang , "dev@dpdk.org" Cc: "lukaszx.krakowiak@intel.com" , "stable@dpdk.org" , David Hunt References: <20210407023910.51052-1-richael.zhuang@arm.com> <20210407074636.26891-1-richael.zhuang@arm.com> <20210407074636.26891-3-richael.zhuang@arm.com> From: "Burakov, Anatoly" Message-ID: <8aff7f9a-8d29-df49-d883-ddba286f1889@intel.com> Date: Thu, 8 Apr 2021 15:55:50 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v3 2/3] test/power: fix a bug in cpufreq autotest 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" On 08-Apr-21 3:10 AM, Richael Zhuang wrote: > Hi, > Thanks for your comments. > My change is to make the check_power_turbo() to continue only when rte_power_turbo_status(TEST_POWER_LCORE_ID) returns 1 which means turbo is available. Sure, but the code reads like if the turbo status isn't available, then the code just treats it as "unsupported", where in reality it could've been supported, but failed for some other reason. > > -----Original Message----- > From: Burakov, Anatoly > Sent: Wednesday, April 7, 2021 5:59 PM > To: Richael Zhuang ; dev@dpdk.org > Cc: lukaszx.krakowiak@intel.com; stable@dpdk.org; David Hunt > Subject: Re: [dpdk-dev] [PATCH v3 2/3] test/power: fix a bug in cpufreq autotest > > On 07-Apr-21 8:46 AM, Richael Zhuang wrote: >> For platforms that don't support turbo boost,rte_power_turbo_status() >> returns "-ENOTSUP" (like power_kvm_vm_turbo_status()). So don't allow >> check_power_turbo() to continue if >> rte_power_turbo_status(TEST_POWER_LCORE_ID)!=1 >> >> Fixes: aeaeaf5f2d62 ("test/power: add cases for turbo feature") >> Cc: lukaszx.krakowiak@intel.com >> Cc: stable@dpdk.org >> >> Signed-off-by: Richael Zhuang >> --- >> app/test/test_power_cpufreq.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/app/test/test_power_cpufreq.c >> b/app/test/test_power_cpufreq.c index 1f4d8bb05..cda74bd8a 100644 >> --- a/app/test/test_power_cpufreq.c >> +++ b/app/test/test_power_cpufreq.c >> @@ -386,7 +386,7 @@ check_power_turbo(void) >> { >> int ret; >> >> -if (rte_power_turbo_status(TEST_POWER_LCORE_ID) == 0) { >> +if (rte_power_turbo_status(TEST_POWER_LCORE_ID) != 1) { >> printf("Turbo not available on lcore %u, skipping test\n", >> TEST_POWER_LCORE_ID); >> return 0; >> > > If what you're really checking is -ENOTSUP, maybe check for that? > Because otherwise it seems like you're making unwarranted assumptions about why the call failed... > > -- > Thanks, > Anatoly > IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you. > -- Thanks, Anatoly