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 4605741E38; Thu, 9 Mar 2023 08:23:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD26440ED7; Thu, 9 Mar 2023 08:23:35 +0100 (CET) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id 84CE6400D7 for ; Thu, 9 Mar 2023 08:23:34 +0100 (CET) Received: from kwepemi500017.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4PXLJC419FzKmXD; Thu, 9 Mar 2023 15:23:23 +0800 (CST) Received: from [10.67.103.235] (10.67.103.235) by kwepemi500017.china.huawei.com (7.221.188.110) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.21; Thu, 9 Mar 2023 15:23:31 +0800 Subject: Re: [PATCH] examples/l3fwd-power: support CPPC cpufreq To: Jie Hai , , Thomas Monjalon , Ferruh Yigit References: <20230131025852.11240-1-haijie1@huawei.com> CC: From: Dongdong Liu Message-ID: Date: Thu, 9 Mar 2023 15:23:30 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <20230131025852.11240-1-haijie1@huawei.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.103.235] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To kwepemi500017.china.huawei.com (7.221.188.110) X-CFilter-Loop: Reflected 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 Hi Jie On 2023/1/31 10:58, Jie Hai wrote: > Currently the l3fwd-power only supports ACPI cpufreq and Pstate > cpufreq, This patch adds CPPC cpufreq. > > Signed-off-by: Jie Hai Looks good, so Acked-by: Dongdong Liu Thanks, Dongdong > --- > examples/l3fwd-power/main.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/examples/l3fwd-power/main.c b/examples/l3fwd-power/main.c > index fd3ade330f82..5090d5598172 100644 > --- a/examples/l3fwd-power/main.c > +++ b/examples/l3fwd-power/main.c > @@ -2453,9 +2453,10 @@ init_power_library(void) > /* we're not supporting the VM channel mode */ > env = rte_power_get_env(); > if (env != PM_ENV_ACPI_CPUFREQ && > - env != PM_ENV_PSTATE_CPUFREQ) { > + env != PM_ENV_PSTATE_CPUFREQ && > + env != PM_ENV_CPPC_CPUFREQ) { > RTE_LOG(ERR, POWER, > - "Only ACPI and PSTATE mode are supported\n"); > + "Only ACPI, PSTATE and CPPC mode are supported\n"); > return -1; > } > } > @@ -2639,12 +2640,14 @@ autodetect_mode(void) > /* > * Empty poll and telemetry modes have to be specifically requested to > * be enabled, but we can auto-detect between interrupt mode with or > - * without frequency scaling. Both ACPI and pstate can be used. > + * without frequency scaling. Any of ACPI, pstate and CPPC can be used. > */ > if (rte_power_check_env_supported(PM_ENV_ACPI_CPUFREQ)) > return APP_MODE_LEGACY; > if (rte_power_check_env_supported(PM_ENV_PSTATE_CPUFREQ)) > return APP_MODE_LEGACY; > + if (rte_power_check_env_supported(PM_ENV_CPPC_CPUFREQ)) > + return APP_MODE_LEGACY; > > RTE_LOG(NOTICE, L3FWD_POWER, "Frequency scaling not supported, selecting interrupt-only mode\n"); > >