DPDK-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 00/15] power: unify and improve lcore ID verification
@ 2026-04-16  3:05 Huisong Li
  2026-04-16  3:05 ` [PATCH v1 01/15] power/kvm_vm: enforce enabled lcore ID check Huisong Li
                   ` (16 more replies)
  0 siblings, 17 replies; 39+ messages in thread
From: Huisong Li @ 2026-04-16  3:05 UTC (permalink / raw)
  To: anatoly.burakov, sivaprasad.tummala
  Cc: dev, thomas, fengchengwen, yangxingui, zhanjie9, lihuisong

This patch series reworks the lcore ID verification logic within the power
library to ensure consistency and improve maintainability. Currently, various
cpufreq drivers implement their own lcore ID checks, often relying on simple
range checks that do not account for whether a core is actually enabled in
the application.

Key Changes:
1. Replaces basic range checks with rte_lcore_is_enabled() across all
   cpufreq drivers (ACPI, AMD P-state, CPPC, Intel P-state, and KVM VM).
   This ensures the power library only operates on lcores assigned to the
   application.
2. Introduces a common macro in the power library's internal headers to
   standardize lcore ID verification.
3. Moves the verification logic from individual driver implementations up
   to the high-level framework API. This reduces duplication code and
   ensures that all drivers benefit from uniform validation.
4. Updates the power QoS and PMD Management libraries to use the new macro.

Huisong Li (15):
  power/kvm_vm: enforce enabled lcore ID check
  power/acpi_cpufreq: enforce enabled lcore ID check
  power/amd_pstate: enforce enabled lcore ID check
  power/cppc_cpufreq: enforce enabled lcore ID check
  power/intel_pstate: enforce enabled lcore ID check
  power: enforce enabled lcore ID check
  power: add a common macro to verify lcore ID
  power/pmd_mgmt: replace lcore ID verification with new macro
  power/qos: replace the lcore ID verification with new macro
  power/cpufreq: add the lcore ID verification to framework
  power/acpi_cpufreq: remove the verification of lcore ID
  power/amd_pstate: remove the verification of lcore ID
  power/cppc_cpufreq: remove the verification of lcore ID
  power/intel_pstate: remove the verification of lcore ID
  power/kvm_vm: remove the verification of lcore ID

 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/kvm_vm.c                 | 10 ---
 lib/power/power_common.h                      |  7 ++
 lib/power/rte_power_cpufreq.c                 | 14 ++++
 lib/power/rte_power_pmd_mgmt.c                | 25 ++-----
 lib/power/rte_power_qos.c                     | 10 +--
 9 files changed, 30 insertions(+), 296 deletions(-)

-- 
2.33.0


^ permalink raw reply	[flat|nested] 39+ messages in thread

end of thread, other threads:[~2026-05-07  2:43 UTC | newest]

Thread overview: 39+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16  3:05 [PATCH v1 00/15] power: unify and improve lcore ID verification Huisong Li
2026-04-16  3:05 ` [PATCH v1 01/15] power/kvm_vm: enforce enabled lcore ID check Huisong Li
2026-04-16 15:48   ` Stephen Hemminger
2026-04-17  2:51     ` lihuisong (C)
2026-04-21 11:07       ` lihuisong (C)
2026-04-21 14:23       ` Stephen Hemminger
2026-04-22  9:18         ` lihuisong (C)
2026-04-16  3:05 ` [PATCH v1 02/15] power/acpi_cpufreq: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 03/15] power/amd_pstate: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 04/15] power/cppc_cpufreq: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 05/15] power/intel_pstate: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 06/15] power: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 07/15] power: add a common macro to verify lcore ID Huisong Li
2026-04-16  3:06 ` [PATCH v1 08/15] power/pmd_mgmt: replace lcore ID verification with new macro Huisong Li
2026-04-16  3:06 ` [PATCH v1 09/15] power/qos: replace the " Huisong Li
2026-04-16  3:06 ` [PATCH v1 10/15] power/cpufreq: add the lcore ID verification to framework Huisong Li
2026-04-16  3:06 ` [PATCH v1 11/15] power/acpi_cpufreq: remove the verification of lcore ID Huisong Li
2026-04-16  3:06 ` [PATCH v1 12/15] power/amd_pstate: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 13/15] power/cppc_cpufreq: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 14/15] power/intel_pstate: " Huisong Li
2026-04-16  3:06 ` [PATCH v1 15/15] power/kvm_vm: " Huisong Li
2026-04-16 15:51 ` [PATCH v1 00/15] power: unify and improve lcore ID verification Stephen Hemminger
2026-04-17  2:53   ` lihuisong (C)
2026-05-07  2:42 ` [PATCH V2 " Huisong Li
2026-05-07  2:42   ` [PATCH V2 01/15] eal: add interface to check if lcore is EAL managed Huisong Li
2026-05-07  2:42   ` [PATCH V2 02/15] power/kvm_vm: validate lcore role in cpufreq API Huisong Li
2026-05-07  2:42   ` [PATCH V2 03/15] power/acpi_cpufreq: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 04/15] power/amd_pstate: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 05/15] power/cppc_cpufreq: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 06/15] power/intel_pstate: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 07/15] power: add a common macro to verify lcore ID Huisong Li
2026-05-07  2:42   ` [PATCH V2 08/15] power/cpufreq: add the lcore ID verification to framework Huisong Li
2026-05-07  2:42   ` [PATCH V2 09/15] power/acpi_cpufreq: remove the verification of lcore ID Huisong Li
2026-05-07  2:42   ` [PATCH V2 10/15] power/amd_pstate: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 11/15] power/cppc_cpufreq: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 12/15] power/intel_pstate: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 13/15] power/kvm_vm: " Huisong Li
2026-05-07  2:42   ` [PATCH V2 14/15] power: allow the service core to config power QoS Huisong Li
2026-05-07  2:42   ` [PATCH V2 15/15] power: add lcore ID check for PMD mgmt Huisong Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox