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 97517A0579 for ; Wed, 7 Apr 2021 11:59:02 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 886A61410BD; Wed, 7 Apr 2021 11:59:02 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 451A94013F; Wed, 7 Apr 2021 11:58:59 +0200 (CEST) IronPort-SDR: s0asRTwZbeimHjg3iXQ2eDWeTqptVU47Ol3rJ5lDs/f4o4BpvxXW6n59EXb+LLhSDtwp3v7RO6 4Y3NUJa+n+3Q== X-IronPort-AV: E=McAfee;i="6000,8403,9946"; a="172747241" X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="172747241" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 02:58:57 -0700 IronPort-SDR: 79ja79C6WORyzRlGPJZB2KkjgojQSabUrIbGp5ziqcZCB8uA9IoWjcXNb/be9eo9EpsrN1kY8W CbtzABMmyyPA== X-IronPort-AV: E=Sophos;i="5.82,203,1613462400"; d="scan'208";a="530146354" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.215.35]) ([10.213.215.35]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2021 02:58:55 -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: Date: Wed, 7 Apr 2021 10:58:51 +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: <20210407074636.26891-3-richael.zhuang@arm.com> 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 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