rte_power_cpufreq.h(3)
π rte_power_cpufreq.h β the whole lore π
so bestie, this is the manual page for rte_power_cpufreq.h, from the Library Functions Manual. it's DPDK's CPU frequency management header β the whole friend group of functions that lets you vibe-check and steer how fast your lcores are running. no cap, it's giving "control freak but make it power management" and we're obsessed. π¦
β¨ NAME β¨
rte_power_cpufreq.h β periodt, that's the name.
π SYNOPSIS π
#include <rte_common.h>
#include <rte_log.h>
πΈ Data Structures πΈ
struct rte_power_core_capabilities
π₯ Functions π₯
int rte_power_check_env_supported (enum power_management_env env)
int rte_power_set_env (enum power_management_env env)
void rte_power_unset_env (void)
enum power_management_env rte_power_get_env (void)
int rte_power_init (unsigned int lcore_id)
int rte_power_exit (unsigned int lcore_id)
uint32_t rte_power_freqs (unsigned int lcore_id, uint32_t *freqs,
uint32_t num)
uint32_t rte_power_get_freq (unsigned int lcore_id)
uint32_t rte_power_set_freq (unsigned int lcore_id, uint32_t index)
int rte_power_freq_up (unsigned int lcore_id)
int rte_power_freq_down (unsigned int lcore_id)
int rte_power_freq_max (unsigned int lcore_id)
int rte_power_freq_min (unsigned int lcore_id)
int rte_power_turbo_status (unsigned int lcore_id)
int rte_power_freq_enable_turbo (unsigned int lcore_id)
int rte_power_freq_disable_turbo (unsigned int lcore_id)
int rte_power_get_capabilities (unsigned int lcore_id, struct
rte_power_core_capabilities *caps)
π Detailed Description π
<h2>CPU Frequency Management</h2>
that's the whole plot bestie β CPU Frequency Management, main character energy only. π
Definition in file rte_power_cpufreq.h.
π Function Documentation π
π€ int rte_power_check_env_supported (enum power_management_env env)
hits the vibe check on whether one specific power management environment type is actually supported on the system that's running right now. like, does this box even do the thing? π«Ά
Parameters
envβ the environment type you want to check support for.
Returns
1if supported β0if unsupported π-1if error, withrte_errnoindicating reason for error. π
π€ int rte_power_set_env (enum power_management_env env)
sets the default power management implementation. real talk: if you don't call this before rte_power_init(), then auto-detect of the environment just happens on its own, no input needed. it is thread safe. and heads up β a new env can be set only in uninitialized state, so if a different env was already set, rte_power_unset_env must be called first. no skipping steps bestie. π
Parameters
envβ env. the environment in which to initialise Power Management for.
Returns
0on success.- Negative on error.
π€ void rte_power_unset_env (void)
unsets the global environment configuration. and listen β this can only be called after all threads have completed. all of them. every single one. β οΈ
π€ enum power_management_env rte_power_get_env (void)
gets the default power management implementation. just tell me what we're working with. π¦
Returns
power_management_env β the configured environment.
π€ int rte_power_init (unsigned int lcore_id)
initializes power management for one specific lcore. if rte_power_set_env() hasn't been called, an auto-detect of the environment will start and it'll initialise the corresponding resources for you. it's giving self-sufficient. β¨
Parameters
lcore_idβ lcore id.
Returns
0on success.- Negative on error.
π€ int rte_power_exit (unsigned int lcore_id)
exits power management on one specific lcore. this will call the environment dependent exit function, so it's whatever that env decides. π
Parameters
lcore_idβ lcore id.
Returns
0on success.- Negative on error.
π€ uint32_t rte_power_freqs (unsigned int lcore_id, uint32_t * freqs, uint32_t num)
gets the available frequencies of one specific lcore. this one is a function pointer definition, so fr fr, review each environment's specific documentation for usage. π
Parameters
lcore_idβ lcore id.freqsβ the buffer array to save the frequencies.numβ the number of frequencies to get.
Returns
the number of available frequencies.
π€ uint32_t rte_power_get_freq (unsigned int lcore_id)
returns the current index of available frequencies of one specific lcore. also a function pointer definition β review each environment's specific documentation for usage. iykyk. π«
Parameters
lcore_idβ lcore id.
Returns
the current index of available frequencies.
π€ uint32_t rte_power_set_freq (unsigned int lcore_id, uint32_t index)
sets a new frequency for one specific lcore by telling it the index of available frequencies. yes, index, not the raw frequency, don't come for me. it's a function pointer definition β review each environment's specific documentation for usage. π₯
Parameters
lcore_idβ lcore id.indexβ the index of available frequencies.
Returns
1on success with frequency changed.0on success without frequency changed.- Negative on error.
π€ int rte_power_freq_up (unsigned int lcore_id)
scales up the frequency of one specific lcore according to the available frequencies. glow up but for silicon. review each environment's specific documentation for usage. πΈ
Parameters
lcore_idβ lcore id.
Returns
1on success with frequency changed.0on success without frequency changed.- Negative on error.
π€ int rte_power_freq_down (unsigned int lcore_id)
scales down the frequency of one specific lcore according to the available frequencies. calm down era. review each environment's specific documentation for usage. π§
Parameters
lcore_idβ lcore id.
Returns
1on success with frequency changed.0on success without frequency changed.- Negative on error.
π€ int rte_power_freq_max (unsigned int lcore_id)
scales the frequency of one specific lcore up to the highest according to the available frequencies. maxxing, literally. review each environment's specific documentation for usage. π₯
Parameters
lcore_idβ lcore id.
Returns
1on success with frequency changed.0on success without frequency changed.- Negative on error.
π€ int rte_power_freq_min (unsigned int lcore_id)
scales the frequency of one specific lcore down to the lowest according to the available frequencies. review each environment's specific documentation for usage.. (yes, two dots, it's the original's vibe.) π
Parameters
lcore_idβ lcore id.
Returns
1on success with frequency changed.0on success without frequency changed.- Negative on error.
π€ int rte_power_turbo_status (unsigned int lcore_id)
queries the Turbo Boost status of one specific lcore. review each environment's specific documentation for usage.. π
Parameters
lcore_idβ lcore id.
Returns
1turbo boost enabled.0turbo boost disabled.- Negative on error.
π€ int rte_power_freq_enable_turbo (unsigned int lcore_id)
enables Turbo Boost for this lcore. activated. review each environment's specific documentation for usage.. π
Parameters
lcore_idβ lcore id.
Returns
0on success.- Negative on error.
π€ int rte_power_freq_disable_turbo (unsigned int lcore_id)
disables Turbo Boost for this lcore. sorry turbo, not today. review each environment's specific documentation for usage.. π
Parameters
lcore_idβ lcore id.
Returns
0on success.- Negative on error.
π€ int rte_power_get_capabilities (unsigned int lcore_id, struct rte_power_core_capabilities * caps)
returns power capabilities for one specific lcore. it's a function pointer definition β review each environment's specific documentation for usage. π€
Parameters
lcore_idβ lcore id.capsβ pointer torte_power_core_capabilitiesobject.
Returns
0on success.- Negative on error.
π Author π
Generated automatically by Doxygen for DPDK from the source code. no human wrote this one bestie, it's a robot doing its little robot thing. π€β¨
okay that's the whole page, and for the cute sign-off: this is DPDK, Version 25.11.3 π β rte_power_cpufreq.h(3), and that's a wrap, 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