[dpdk-stable] [dpdk-dev] [PATCH v1 2/4] test/power: add turbo mode to freq check function

Burakov, Anatoly anatoly.burakov at intel.com
Thu Apr 22 18:13:03 CEST 2021


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 at dpdk.org
> 
> Signed-off-by: David Hunt <david.hunt at intel.com>
> ---
>   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


More information about the stable mailing list