DPDK 25.03.0-rc0
rte_power_cpufreq.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
3 * Copyright(c) 2024 Advanced Micro Devices, Inc.
4 */
5
6#ifndef RTE_POWER_CPUFREQ_H
7#define RTE_POWER_CPUFREQ_H
8
14#include <rte_common.h>
15#include <rte_log.h>
16
17#include "power_cpufreq.h"
18
19#ifdef __cplusplus
20extern "C" {
21#endif
22
23/* Power Management Environment State */
24enum power_management_env {
25 PM_ENV_NOT_SET = 0,
26 PM_ENV_ACPI_CPUFREQ,
27 PM_ENV_KVM_VM,
28 PM_ENV_PSTATE_CPUFREQ,
29 PM_ENV_CPPC_CPUFREQ,
30 PM_ENV_AMD_PSTATE_CPUFREQ
31};
32
45int rte_power_check_env_supported(enum power_management_env env);
46
60int rte_power_set_env(enum power_management_env env);
61
67
74enum power_management_env rte_power_get_env(void);
75
88int rte_power_init(unsigned int lcore_id);
89
101int rte_power_exit(unsigned int lcore_id);
102
118uint32_t rte_power_freqs(unsigned int lcore_id, uint32_t *freqs, uint32_t num);
119
131uint32_t rte_power_get_freq(unsigned int lcore_id);
132
149uint32_t rte_power_set_freq(unsigned int lcore_id, uint32_t index);
150
164int rte_power_freq_up(unsigned int lcore_id);
165
179int rte_power_freq_down(unsigned int lcore_id);
180
194int rte_power_freq_max(unsigned int lcore_id);
195
209int rte_power_freq_min(unsigned int lcore_id);
210
223int rte_power_turbo_status(unsigned int lcore_id);
224
236int rte_power_freq_enable_turbo(unsigned int lcore_id);
237
249int rte_power_freq_disable_turbo(unsigned int lcore_id);
250
265int rte_power_get_capabilities(unsigned int lcore_id,
266 struct rte_power_core_capabilities *caps);
267
268#ifdef __cplusplus
269}
270#endif
271
272#endif /* RTE_POWER_CPUFREQ_H */
uint32_t rte_power_freqs(unsigned int lcore_id, uint32_t *freqs, uint32_t num)
int rte_power_freq_down(unsigned int lcore_id)
void rte_power_unset_env(void)
int rte_power_freq_max(unsigned int lcore_id)
int rte_power_turbo_status(unsigned int lcore_id)
int rte_power_set_env(enum power_management_env env)
int rte_power_get_capabilities(unsigned int lcore_id, struct rte_power_core_capabilities *caps)
uint32_t rte_power_set_freq(unsigned int lcore_id, uint32_t index)
int rte_power_freq_min(unsigned int lcore_id)
int rte_power_check_env_supported(enum power_management_env env)
int rte_power_init(unsigned int lcore_id)
int rte_power_freq_enable_turbo(unsigned int lcore_id)
int rte_power_freq_disable_turbo(unsigned int lcore_id)
int rte_power_freq_up(unsigned int lcore_id)
enum power_management_env rte_power_get_env(void)
uint32_t rte_power_get_freq(unsigned int lcore_id)
int rte_power_exit(unsigned int lcore_id)