From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0D69C433B4 for ; Thu, 22 Apr 2021 16:16:11 +0000 (UTC) Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by mail.kernel.org (Postfix) with ESMTP id 1CC2161417 for ; Thu, 22 Apr 2021 16:16:11 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1CC2161417 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0DBC941CAF; Thu, 22 Apr 2021 18:16:10 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 53D0841C9D; Thu, 22 Apr 2021 18:16:08 +0200 (CEST) IronPort-SDR: iyBZJdOukXOKvtbn4uXdqPzVGWvkVW42xR0b74PIAyeeMcneN0EI5MVsSaU/pCGn1UGo4hDN+G hM5irgMB37Iw== X-IronPort-AV: E=McAfee;i="6200,9189,9962"; a="183047372" X-IronPort-AV: E=Sophos;i="5.82,242,1613462400"; d="scan'208";a="183047372" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2021 09:13:10 -0700 IronPort-SDR: hSGoywmdC3pydgGvE2Ta11uFl6S6fDKXsnWrOynHLLkqA56yy9a038+fExU5ik6QgC2kaeelAW RRjF/hoquqTg== X-IronPort-AV: E=Sophos;i="5.82,242,1613462400"; d="scan'208";a="384816889" Received: from aburakov-mobl.ger.corp.intel.com (HELO [10.213.222.135]) ([10.213.222.135]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Apr 2021 09:13:07 -0700 To: David Hunt , dev@dpdk.org Cc: stable@dpdk.org References: <20210422144030.16746-1-david.hunt@intel.com> <20210422144030.16746-2-david.hunt@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Thu, 22 Apr 2021 17:13:03 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <20210422144030.16746-2-david.hunt@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1 2/4] test/power: add turbo mode to freq check function 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" On 22-Apr-21 3:40 PM, David Hunt wrote: > With the intel_pstate driver and turbo enabled, the top frequency in > the frequency array is the P1+1, i.e. 2300001, whereas the frequency > shown in scaling_cur_freq could be a lot higher. > > This patch adds a flag to the check_cur_freq function so that we can > specify if a frequency is greater than expected (turbo mode), in which > case the check should be successful. > > Fixes: aeaeaf5f2d62 ("test/power: add cases for turbo feature") > Cc: stable@dpdk.org > > Signed-off-by: David Hunt > --- > app/test/test_power_cpufreq.c | 27 +++++++++++++++------------ > 1 file changed, 15 insertions(+), 12 deletions(-) > > diff --git a/app/test/test_power_cpufreq.c b/app/test/test_power_cpufreq.c > index 52f58ef8b2..33a68cf645 100644 > --- a/app/test/test_power_cpufreq.c > +++ b/app/test/test_power_cpufreq.c > @@ -48,7 +48,7 @@ static uint32_t total_freq_num; > static uint32_t freqs[TEST_POWER_FREQS_NUM_MAX]; > > static int > -check_cur_freq(unsigned lcore_id, uint32_t idx) > +check_cur_freq(unsigned int lcore_id, uint32_t idx, int turbo) Nitpicking, but stdbool exists :) it would be nice to use bool type for bool variables, not int. -- Thanks, Anatoly