DPDK  24.03.0
rte_power_intrinsics.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: BSD-3-Clause
2  * Copyright(c) 2020 Intel Corporation
3  */
4 
5 #ifndef _RTE_POWER_INTRINSIC_H_
6 #define _RTE_POWER_INTRINSIC_H_
7 
8 #include <inttypes.h>
9 
10 #include <rte_spinlock.h>
11 
21 #define RTE_POWER_MONITOR_OPAQUE_SZ 4
22 
37 typedef int (*rte_power_monitor_clb_t)(const uint64_t val,
38  const uint64_t opaque[RTE_POWER_MONITOR_OPAQUE_SZ]);
39 
40 struct rte_power_monitor_cond {
41  volatile void *addr;
42  uint8_t size;
51  uint64_t opaque[RTE_POWER_MONITOR_OPAQUE_SZ];
53 };
54 
83 int rte_power_monitor(const struct rte_power_monitor_cond *pmc,
84  const uint64_t tsc_timestamp);
85 
99 int rte_power_monitor_wakeup(const unsigned int lcore_id);
100 
117 int rte_power_pause(const uint64_t tsc_timestamp);
118 
147 int rte_power_monitor_multi(const struct rte_power_monitor_cond pmc[],
148  const uint32_t num, const uint64_t tsc_timestamp);
149 
150 #endif /* _RTE_POWER_INTRINSIC_H_ */
#define RTE_POWER_MONITOR_OPAQUE_SZ
int rte_power_pause(const uint64_t tsc_timestamp)
int rte_power_monitor_multi(const struct rte_power_monitor_cond pmc[], const uint32_t num, const uint64_t tsc_timestamp)
int(* rte_power_monitor_clb_t)(const uint64_t val, const uint64_t opaque[RTE_POWER_MONITOR_OPAQUE_SZ])
int rte_power_monitor(const struct rte_power_monitor_cond *pmc, const uint64_t tsc_timestamp)
int rte_power_monitor_wakeup(const unsigned int lcore_id)