From: fengchengwen <fengchengwen@huawei.com>
To: Huisong Li <lihuisong@huawei.com>, <thomas@monjalon.net>,
<anatoly.burakov@intel.com>, <sivaprasad.tummala@amd.com>
Cc: <dev@dpdk.org>, <stephen@networkplumber.org>,
<yangxingui@huawei.com>, <zhanjie9@hisilicon.com>
Subject: Re: [PATCH v4 0/9] power: centralize lcore ID validation
Date: Mon, 15 Jun 2026 17:22:57 +0800 [thread overview]
Message-ID: <2a191a7f-5439-407b-b2cd-44dae6ab0cbc@huawei.com> (raw)
In-Reply-To: <20260615073050.1996063-1-lihuisong@huawei.com>
LGTM
Series-acked-by: Chengwen Feng <fengchengwen@huawei.com>
On 6/15/2026 3:30 PM, Huisong Li wrote:
> This series centralizes the lcore ID verification in the power cpufreq
> framework, replacing the per-driver range checks with a common validation.
>
> Background
> ----------
> Currently, various cpufreq drivers implement their own lcore ID checks,
> which are limited to simple range validation against RTE_MAX_LCORE and
> involve significant code duplication across 12+ functions per driver.
> The checks are duplicated across all drivers — any change requires
> updating 5+ drivers identically. Moreover, these checks do not verify
> whether the lcore is actually managed by the application. So it is better
> to verify lcore ID in cpufreq core.
>
> For cpufreq-related APIs, although service cores do not typically invoke
> these APIs, they may operate in polling modes where power management is
> required. To maintain compatibility with applications using service cores,
> the validation logic now explicitly accepts both ROLE_RTE and ROLE_SERVICE.
>
> The usage of power QoS APIs are similar to that of cpufreq. They also can
> accepts ROLE_RTE and ROLE_SERVICE.
>
> For PMD power management APIs, the lcore must be ROLE_RTE because these
> are used together with the data plane of ethdev PMD. Hence,
> rte_lcore_is_enabled() is used for validation.
>
> Key Changes:
> ------------
> Patch 1: Adds a common macro (RTE_POWER_VALID_LCOREID_OR_ERR_RET)
> that accepts both roles.
> Patch 2: Adds the validation to the cpufreq framework layer.
> Patches 3-7: Remove the now-redundant per-driver RTE_MAX_LCORE checks.
> Patch 8: Update power QoS to use the new validation, allowing
> service cores to configure QoS parameters.
> Patch 9: Add lcore validation to PMD management functions.
>
> Changes:
> --------
> v4: remove the patch that add the helper function rte_lcore_is_eal_managed.
>
> v3:
> - update release note.
> - add __rte_experimental for new helper function.
> - restructure this patch set to facilitate review.
>
> v2:
> - allow the service cores to set power API.
>
> ----
>
> Huisong Li (9):
> power: add a common macro to verify lcore ID
> power/cpufreq: add the lcore ID verification to framework
> power/acpi: remove redundant lcore ID checks
> power/amd_pstate: remove redundant lcore ID checks
> power/cppc: remove redundant lcore ID checks
> power/intel_pstate: remove redundant lcore ID checks
> power/kvm_vm: remove redundant lcore ID checks
> power: allow the service core to config power QoS
> power: add lcore ID check for PMD mgmt
>
> doc/guides/rel_notes/release_26_07.rst | 7 ++
> drivers/power/acpi/acpi_cpufreq.c | 65 -------------------
> drivers/power/amd_pstate/amd_pstate_cpufreq.c | 65 -------------------
> drivers/power/cppc/cppc_cpufreq.c | 65 -------------------
> .../power/intel_pstate/intel_pstate_cpufreq.c | 65 -------------------
> drivers/power/kvm_vm/guest_channel.c | 22 -------
> drivers/power/kvm_vm/kvm_vm.c | 10 ---
> lib/power/power_common.h | 8 +++
> lib/power/rte_power_cpufreq.c | 13 ++++
> lib/power/rte_power_pmd_mgmt.c | 21 +++---
> lib/power/rte_power_qos.c | 10 +--
> 11 files changed, 41 insertions(+), 310 deletions(-)
>
prev parent reply other threads:[~2026-06-15 9:23 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-15 7:30 [PATCH v4 0/9] power: centralize lcore ID validation Huisong Li
2026-06-15 7:30 ` [PATCH v4 1/9] power: add a common macro to verify lcore ID Huisong Li
2026-06-15 7:30 ` [PATCH v4 2/9] power/cpufreq: add the lcore ID verification to framework Huisong Li
2026-06-15 7:30 ` [PATCH v4 3/9] power/acpi: remove redundant lcore ID checks Huisong Li
2026-06-15 7:30 ` [PATCH v4 4/9] power/amd_pstate: " Huisong Li
2026-06-15 7:30 ` [PATCH v4 5/9] power/cppc: " Huisong Li
2026-06-15 7:30 ` [PATCH v4 6/9] power/intel_pstate: " Huisong Li
2026-06-15 7:30 ` [PATCH v4 7/9] power/kvm_vm: " Huisong Li
2026-06-15 7:30 ` [PATCH v4 8/9] power: allow the service core to config power QoS Huisong Li
2026-06-15 7:30 ` [PATCH v4 9/9] power: add lcore ID check for PMD mgmt Huisong Li
2026-06-15 9:22 ` fengchengwen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2a191a7f-5439-407b-b2cd-44dae6ab0cbc@huawei.com \
--to=fengchengwen@huawei.com \
--cc=anatoly.burakov@intel.com \
--cc=dev@dpdk.org \
--cc=lihuisong@huawei.com \
--cc=sivaprasad.tummala@amd.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
--cc=yangxingui@huawei.com \
--cc=zhanjie9@hisilicon.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox