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

  • 1 if supported βœ…
  • 0 if unsupported πŸ™ˆ
  • -1 if error, with rte_errno indicating 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

  • 0 on 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

  • 0 on 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

  • 0 on 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

  • 1 on success with frequency changed.
  • 0 on 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

  • 1 on success with frequency changed.
  • 0 on 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

  • 1 on success with frequency changed.
  • 0 on 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

  • 1 on success with frequency changed.
  • 0 on 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

  • 1 on success with frequency changed.
  • 0 on 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

  • 1 turbo boost enabled.
  • 0 turbo 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

  • 0 on 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

  • 0 on 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 to rte_power_core_capabilities object.

Returns

  • 0 on 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