[PATCH V2 14/15] power: allow the service core to config power QoS
Huisong Li
lihuisong at huawei.com
Thu May 7 04:42:29 CEST 2026
The service core thread can use power QoS API.
So allow these cores to config it.
Signed-off-by: Huisong Li <lihuisong at huawei.com>
---
lib/power/rte_power_qos.c | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/lib/power/rte_power_qos.c b/lib/power/rte_power_qos.c
index be230d1c50..f6630b08f7 100644
--- a/lib/power/rte_power_qos.c
+++ b/lib/power/rte_power_qos.c
@@ -27,10 +27,7 @@ rte_power_qos_set_cpu_resume_latency(uint16_t lcore_id, int latency)
FILE *f;
int ret;
- if (!rte_lcore_is_enabled(lcore_id)) {
- POWER_LOG(ERR, "lcore id %u is not enabled", lcore_id);
- return -EINVAL;
- }
+ RTE_POWER_VALID_LCOREID_OR_ERR_RET(lcore_id, -EINVAL);
ret = power_get_lcore_mapped_cpu_id(lcore_id, &cpu_id);
if (ret != 0)
return ret;
@@ -82,10 +79,7 @@ rte_power_qos_get_cpu_resume_latency(uint16_t lcore_id)
FILE *f;
int ret;
- if (!rte_lcore_is_enabled(lcore_id)) {
- POWER_LOG(ERR, "lcore id %u is not enabled", lcore_id);
- return -EINVAL;
- }
+ RTE_POWER_VALID_LCOREID_OR_ERR_RET(lcore_id, -EINVAL);
ret = power_get_lcore_mapped_cpu_id(lcore_id, &cpu_id);
if (ret != 0)
return ret;
--
2.33.0
More information about the dev
mailing list