rte_power_intrinsics.h(3) | DPDK | rte_power_intrinsics.h(3) |
NAME¶
rte_power_intrinsics.h
SYNOPSIS¶
#include <inttypes.h>
#include <rte_spinlock.h>
Macros¶
#define RTE_POWER_MONITOR_OPAQUE_SZ 4
Typedefs¶
typedef int(* rte_power_monitor_clb_t) (const
uint64_t val, const uint64_t opaque[RTE_POWER_MONITOR_OPAQUE_SZ])
Functions¶
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)
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)
Detailed Description¶
Advanced power management operations.
This file define APIs for advanced power management, which are architecture-dependent.
Definition in file rte_power_intrinsics.h.
Macro Definition Documentation¶
#define RTE_POWER_MONITOR_OPAQUE_SZ 4¶
Size of the opaque data in monitor condition
Definition at line 21 of file rte_power_intrinsics.h.
Typedef Documentation¶
typedef int(* rte_power_monitor_clb_t) (const uint64_t val, const uint64_t opaque[RTE_POWER_MONITOR_OPAQUE_SZ])¶
Callback definition for monitoring conditions. Callbacks with this signature will be used by rte_power_monitor() to check if the entering of power optimized state should be aborted.
Parameters:
opaque Callback-specific data.
Returns:
Definition at line 37 of file rte_power_intrinsics.h.
Function Documentation¶
int rte_power_monitor (const struct rte_power_monitor_cond * pmc, const uint64_t tsc_timestamp)¶
Monitor specific address for changes. This will cause the CPU to enter an architecture-defined optimized power state until either the specified memory address is written to, a certain TSC timestamp is reached, or other reasons cause the CPU to wake up.
Additionally, an expected value (pmc->val), mask (pmc->mask), and data size (pmc->size) are provided in the pmc power monitoring condition. If the mask is non-zero, the current value pointed to by the pmc->addr pointer will be read and compared against the expected value, and if they match, the entering of optimized power state will be aborted. This is intended to prevent the CPU from entering optimized power state and waiting on a write that has already happened by the time this API is called.
Warning:
Parameters:
tsc_timestamp Maximum TSC timestamp to wait for. Note that the wait behavior is architecture-dependent.
Returns:
int rte_power_monitor_wakeup (const unsigned int lcore_id)¶
Wake up a specific lcore that is in a power optimized state and is monitoring an address.
Note:
This function will not wake up a core that is in a power optimized state due to calling rte_power_pause.
Parameters:
int rte_power_pause (const uint64_t tsc_timestamp)¶
Enter an architecture-defined optimized power state until a certain TSC timestamp is reached.
Warning:
Parameters:
Returns:
int rte_power_monitor_multi (const struct rte_power_monitor_cond pmc[], const uint32_t num, const uint64_t tsc_timestamp)¶
Monitor a set of addresses for changes. This will cause the CPU to enter an architecture-defined optimized power state until either one of the specified memory addresses is written to, a certain TSC timestamp is reached, or other reasons cause the CPU to wake up.
Additionally, expected 64-bit values and 64-bit masks are provided. If mask is non-zero, the current value pointed to by the p pointer will be checked against the expected value, and if they do not match, the entering of optimized power state may be aborted.
Warning:
Parameters:
num Length of the pmc array.
tsc_timestamp Maximum TSC timestamp to wait for. Note that the wait behavior is architecture-dependent.
Returns:
Author¶
Generated automatically by Doxygen for DPDK from the source code.
Thu May 23 2024 | Version 23.11.0 |