1 Star 0 Fork 72

叶青龙/dpdk

forked from src-openEuler/dpdk 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0256-examples-l3fwd-power-support-CPPC-cpufreq.patch 1.87 KB
一键复制 编辑 原始数据 按行查看 历史
From 9f45602b8df4c7a0eca4228ab94de824b1c5337b Mon Sep 17 00:00:00 2001
From: Jie Hai <haijie1@huawei.com>
Date: Tue, 31 Jan 2023 10:58:52 +0800
Subject: examples/l3fwd-power: support CPPC cpufreq
[ upstream commit bc6fe48468767df2b6a31c9de06796164981cbaf ]
Currently the l3fwd-power only supports ACPI cpufreq and Pstate
cpufreq, This patch adds CPPC cpufreq.
Signed-off-by: Jie Hai <haijie1@huawei.com>
Acked-by: David Hunt <david.hunt@intel.com>
Acked-by: Dongdong Liu <liudongdong3@huawei.com>
---
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 20e5b59af9..a2eb35d6e2 100644
--- a/examples/l3fwd-power/main.c
+++ b/examples/l3fwd-power/main.c
@@ -2290,9 +2290,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;
}
}
@@ -2456,12 +2457,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");
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yeqinglong01/dpdk.git
git@gitee.com:yeqinglong01/dpdk.git
yeqinglong01
dpdk
dpdk
master

搜索帮助