DPDK  18.05.1
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_byteorder.h>
15 #include <rte_log.h>
16 #include <rte_string_fns.h>
17 
18 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 /* Power Management Environment State */
23 enum power_management_env {PM_ENV_NOT_SET, PM_ENV_ACPI_CPUFREQ, PM_ENV_KVM_VM};
24 
37 int rte_power_set_env(enum power_management_env env);
38 
43 void rte_power_unset_env(void);
44 
51 enum power_management_env rte_power_get_env(void);
52 
65 int rte_power_init(unsigned int lcore_id);
66 
78 int rte_power_exit(unsigned int lcore_id);
79 
95 typedef uint32_t (*rte_power_freqs_t)(unsigned int lcore_id, uint32_t *freqs,
96  uint32_t num);
97 
98 extern rte_power_freqs_t rte_power_freqs;
99 
111 typedef uint32_t (*rte_power_get_freq_t)(unsigned int lcore_id);
112 
113 extern rte_power_get_freq_t rte_power_get_freq;
114 
131 typedef int (*rte_power_set_freq_t)(unsigned int lcore_id, uint32_t index);
132 
133 extern rte_power_set_freq_t rte_power_set_freq;
134 
147 typedef int (*rte_power_freq_change_t)(unsigned int lcore_id);
148 
163 
179 
194 
209 
223 
236 
249 
250 
251 #ifdef __cplusplus
252 }
253 #endif
254 
255 #endif