rte_power_pmd_mgmt.h(3)
π rte_power_pmd_mgmt.h π
okay bestie, so this is rte_power_pmd_mgmt.h β it lives in the Library Functions Manual, section 3 (3 = library functions, iykyk), and it's literally the whole PMD power management era. If you've ever wanted your NIC queues to stop cosplaying a jet engine when there's no traffic, this is your girl. Let's get into it. π¦
β¨ NAME β¨
rte_power_pmd_mgmt.h
πΈ SYNOPSIS πΈ
#include <stdint.h>
#include <rte_log.h>
#include <rte_power_cpufreq.h>
Enumerations
enum rte_power_pmd_mgmt_type { RTE_POWER_MGMT_TYPE_MONITOR = 1,
RTE_POWER_MGMT_TYPE_PAUSE, RTE_POWER_MGMT_TYPE_SCALE }
Functions
int rte_power_ethdev_pmgmt_queue_enable (unsigned int lcore_id, uint16_t
port_id, uint16_t queue_id, enum rte_power_pmd_mgmt_type mode)
int rte_power_ethdev_pmgmt_queue_disable (unsigned int lcore_id,
uint16_t port_id, uint16_t queue_id)
void rte_power_pmd_mgmt_set_emptypoll_max (unsigned int max)
unsigned int rte_power_pmd_mgmt_get_emptypoll_max (void)
int rte_power_pmd_mgmt_set_pause_duration (unsigned int duration)
unsigned int rte_power_pmd_mgmt_get_pause_duration (void)
int rte_power_pmd_mgmt_set_scaling_freq_min (unsigned int lcore,
unsigned int min)
int rte_power_pmd_mgmt_set_scaling_freq_max (unsigned int lcore,
unsigned int max)
int rte_power_pmd_mgmt_get_scaling_freq_min (unsigned int lcore)
int rte_power_pmd_mgmt_get_scaling_freq_max (unsigned int lcore)
π Detailed Description π
RTE PMD Power Management
Definition in file rte_power_pmd_mgmt.h.
π§ Enumeration Type Documentation π§
enum rte_power_pmd_mgmt_type
PMD Power Management Type β the three moods your Rx queue can be in, pick one babe π
Enumerator
RTE_POWER_MGMT_TYPE_MONITORβ use power-optimized monitoring to wait for incoming traffic (she's watching, but she's comfy π)RTE_POWER_MGMT_TYPE_PAUSEβ use power-optimized sleep to avoid busy polling (naptime instead of spinning π΄)RTE_POWER_MGMT_TYPE_SCALEβ use frequency scaling when traffic is low (chill freqs for chill times π)
Definition at line 25 of file rte_power_pmd_mgmt.h.
π Function Documentation π
int rte_power_ethdev_pmgmt_queue_enable (unsigned int lcore_id, uint16_t port_id, uint16_t queue_id, enum rte_power_pmd_mgmt_type mode)
Enable power management on a specified Ethernet device Rx queue and lcore. Turn the vibe on β¨
Note: this function is not thread-safe. fr fr, don't be sharing her.
Warning: this function must be called when all affected Ethernet queues are stopped and no Rx/Tx is in progress! Like, actually stopped. No cap. π
Parameters
lcore_idβ the lcore the Rx queue will be polled from.port_idβ the port identifier of the Ethernet device.queue_idβ the queue identifier of the Ethernet device.modeβ the power management scheme to use for specified Rx queue.
Returns
0 on success, <0 on error
int rte_power_ethdev_pmgmt_queue_disable (unsigned int lcore_id, uint16_t port_id, uint16_t queue_id)
Disable power management on a specified Ethernet device Rx queue and lcore. Closing the tab on her π
Note: also not thread-safe.
Warning: must be called when all affected Ethernet queues are stopped and no Rx/Tx is in progress! Same energy as above, bestie, do not skip this. π
Parameters
lcore_idβ the lcore the Rx queue is polled from.port_idβ the port identifier of the Ethernet device.queue_idβ the queue identifier of the Ethernet device.
Returns
0 on success, <0 on error
void rte_power_pmd_mgmt_set_emptypoll_max (unsigned int max)
Set an emptypoll_max to a specified value. It's how many empty polls you wait through before entering sleep state β basically how many times she checks her phone before actually going to bed π
Parameters
maxβ the value to setemptypoll_maxto.
unsigned int rte_power_pmd_mgmt_get_emptypoll_max (void)
Get the current value of emptypoll_max.
Returns
The current emptypoll_max value
int rte_power_pmd_mgmt_set_pause_duration (unsigned int duration)
Set the pause_duration. Used to adjust the pause mode callback duration. How long the lil nap lasts π
Note: duration must be greater than zero. Zero is not a vibe check she passes.
Parameters
durationβ the value to setpause_durationto.
Returns
0 on success, <0 on error
unsigned int rte_power_pmd_mgmt_get_pause_duration (void)
Get the current value of pause_duration.
Returns
The current pause_duration value.
int rte_power_pmd_mgmt_set_scaling_freq_min (unsigned int lcore, unsigned int min)
Set the min frequency to be used for frequency scaling, or zero to use defaults.
Note: supported by Pstate mode.
Parameters
lcoreβ the ID of the lcore to set the min frequency for.minβ the value, in KiloHertz, to set the minimum frequency to.
Returns
0 on success, <0 on error
int rte_power_pmd_mgmt_set_scaling_freq_max (unsigned int lcore, unsigned int max)
Set the max frequency to be used for frequency scaling, or zero to use defaults.
Note: supported by Pstate mode.
Parameters
lcoreβ the ID of the lcore to set the max frequency for.maxβ the value, in KiloHertz, to set the maximum frequency to. Ifmaxis0, it is considered 'not set'.
Returns
0 on success, <0 on error
int rte_power_pmd_mgmt_get_scaling_freq_min (unsigned int lcore)
Get the current configured min frequency used for frequency scaling.
Note: supported by Pstate mode.
Parameters
lcoreβ the ID of the lcore to get the min frequency for.
Returns
0 if no value has been configured via the 'set' API. >0 if a minimum frequency has been configured β the value is the minimum frequency, in KiloHertz, used for frequency scaling. <0 on error
int rte_power_pmd_mgmt_get_scaling_freq_max (unsigned int lcore)
Get the current configured max frequency used for frequency scaling.
Note: supported by Pstate mode.
Parameters
lcoreβ the ID of the lcore to get the max frequency for.
Returns
0 if no value has been configured via the 'set' API. >0 if a maximum frequency has been configured β the value is the maximum frequency, in KiloHertz, used for frequency scaling. <0 on error
π Author π
Generated automatically by Doxygen for DPDK from the source code. Not me writing an essay, the robot did it π€β¨
and that's the whole page, bestie β go forth and power-manage responsibly π This was the rte_power_pmd_mgmt.h(3) page from DPDK, Version 25.11.3 β mwah, she ate, periodt. π«ΆπΈ
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms