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 2B647A0548; Thu, 22 Apr 2021 18:16:10 +0200 (CEST) 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