DPDK 22.11.0-rc2
rte_power.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright(c) 2010-2014 Intel Corporation
3 */
4
5#ifndef _RTE_POWER_H
6#define _RTE_POWER_H
7
13#include <rte_common.h>
14#include <rte_log.h>
15#include <rte_power_guest_channel.h>
16
17#ifdef __cplusplus
18extern "C" {
19#endif
20
21/* Power Management Environment State */
22enum power_management_env {PM_ENV_NOT_SET, PM_ENV_ACPI_CPUFREQ, PM_ENV_KVM_VM,
23 PM_ENV_PSTATE_CPUFREQ, PM_ENV_CPPC_CPUFREQ};
24
40__rte_experimental
41int rte_power_check_env_supported(enum power_management_env env);
42
56int rte_power_set_env(enum power_management_env env);
57
63
70enum power_management_env rte_power_get_env(void);
71
84int rte_power_init(unsigned int lcore_id);
85
97int rte_power_exit(unsigned int lcore_id);
98
114typedef uint32_t (*rte_power_freqs_t)(unsigned int lcore_id, uint32_t *freqs,
115 uint32_t num);
116
117extern rte_power_freqs_t rte_power_freqs;
118
130typedef uint32_t (*rte_power_get_freq_t)(unsigned int lcore_id);
131
132extern rte_power_get_freq_t rte_power_get_freq;
133
150typedef int (*rte_power_set_freq_t)(unsigned int lcore_id, uint32_t index);
151
152extern rte_power_set_freq_t rte_power_set_freq;
153
166typedef int (*rte_power_freq_change_t)(unsigned int lcore_id);
167
182
198
213
228
242
255
268
274 union {
275 uint64_t capabilities;
277 struct {
278 uint64_t turbo:1;
279 uint64_t priority:1;
280 };
281 };
282};
283
298typedef int (*rte_power_get_capabilities_t)(unsigned int lcore_id,
299 struct rte_power_core_capabilities *caps);
300
301extern rte_power_get_capabilities_t rte_power_get_capabilities;
302
303#ifdef __cplusplus
304}
305#endif
306
307#endif
#define RTE_STD_C11
Definition: rte_common.h:39
int(* rte_power_freq_change_t)(unsigned int lcore_id)
Definition: rte_power.h:166
void rte_power_unset_env(void)
rte_power_freq_change_t rte_power_freq_max
int rte_power_set_env(enum power_management_env env)
uint32_t(* rte_power_freqs_t)(unsigned int lcore_id, uint32_t *freqs, uint32_t num)
Definition: rte_power.h:114
rte_power_freq_change_t rte_power_freq_down
uint32_t(* rte_power_get_freq_t)(unsigned int lcore_id)
Definition: rte_power.h:130
rte_power_freq_change_t rte_power_freq_up
__rte_experimental int rte_power_check_env_supported(enum power_management_env env)
rte_power_freq_change_t rte_power_freq_enable_turbo
rte_power_freq_change_t rte_power_freq_min
int rte_power_init(unsigned int lcore_id)
rte_power_freq_change_t rte_power_turbo_status
enum power_management_env rte_power_get_env(void)
int(* rte_power_get_capabilities_t)(unsigned int lcore_id, struct rte_power_core_capabilities *caps)
Definition: rte_power.h:298
rte_power_freq_change_t rte_power_freq_disable_turbo
int rte_power_exit(unsigned int lcore_id)
int(* rte_power_set_freq_t)(unsigned int lcore_id, uint32_t index)
Definition: rte_power.h:150