DPDK
19.05.0
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
lib
librte_power
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
PM_ENV_PSTATE_CPUFREQ};
25
39
int
rte_power_set_env
(
enum
power_management_env env);
40
45
void
rte_power_unset_env
(
void
);
46
53
enum
power_management_env
rte_power_get_env
(
void
);
54
67
int
rte_power_init
(
unsigned
int
lcore_id);
68
80
int
rte_power_exit
(
unsigned
int
lcore_id);
81
97
typedef
uint32_t (*
rte_power_freqs_t
)(
unsigned
int
lcore_id, uint32_t *freqs,
98
uint32_t num);
99
100
extern
rte_power_freqs_t
rte_power_freqs;
101
113
typedef
uint32_t (*
rte_power_get_freq_t
)(
unsigned
int
lcore_id);
114
115
extern
rte_power_get_freq_t
rte_power_get_freq;
116
133
typedef
int (*
rte_power_set_freq_t
)(
unsigned
int
lcore_id, uint32_t index);
134
135
extern
rte_power_set_freq_t
rte_power_set_freq;
136
149
typedef
int (*
rte_power_freq_change_t
)(
unsigned
int
lcore_id);
150
164
extern
rte_power_freq_change_t
rte_power_freq_up
;
165
180
extern
rte_power_freq_change_t
rte_power_freq_down
;
181
195
extern
rte_power_freq_change_t
rte_power_freq_max
;
196
210
extern
rte_power_freq_change_t
rte_power_freq_min
;
211
224
extern
rte_power_freq_change_t
rte_power_turbo_status
;
225
237
extern
rte_power_freq_change_t
rte_power_freq_enable_turbo
;
238
250
extern
rte_power_freq_change_t
rte_power_freq_disable_turbo
;
251
255
struct
rte_power_core_capabilities
{
256
RTE_STD_C11
257
union
{
258
uint64_t capabilities;
259
RTE_STD_C11
260
struct
{
261
uint64_t
turbo
:1;
262
uint64_t
priority
:1;
263
};
264
};
265
};
266
281
typedef
int (*
rte_power_get_capabilities_t
)(
unsigned
int
lcore_id,
282
struct
rte_power_core_capabilities
*caps);
283
284
extern
rte_power_get_capabilities_t
rte_power_get_capabilities;
285
286
#ifdef __cplusplus
287
}
288
#endif
289
290
#endif
Generated by
1.8.1.2