rte_cpuflags.h(3)
π rte_cpuflags.h(3) β Library Functions Manual π
okay bestie, sit down, hydrate, because we're reading the manual page for rte_cpuflags.h and it's genuinely so useful. it's a C header, it lives in the DPDK-verse, and its whole personality is "let me tell you what your CPU can actually do at runtime." let's get into it π«Ά
β¨ NAME β¨
rte_cpuflags.h β the header itself, icon, no notes π
πΈ SYNOPSIS πΈ
#include 'rte_common.h'
#include <errno.h>
#include <rte_compat.h>
π Data Structures
struct rte_cpu_intrinsics
π¦ Functions
void rte_cpu_get_intrinsics_support (struct rte_cpu_intrinsics *intrinsics)
__extension__ const char * rte_cpu_get_flag_name (enum rte_cpu_flag_t feature)
__extension__ int rte_cpu_get_flag_enabled (enum rte_cpu_flag_t feature)
int rte_cpu_is_supported (void)
unsigned long rte_cpu_getauxval (unsigned long type)
int rte_cpu_strcmp_auxval (unsigned long type, const char *str)
π Detailed Description π
Architecture specific API to determine available CPU features at runtime. that's the whole vibe. your binary got compiled assuming certain CPU goodies exist, and this page is how you check what's actually there on the machine you're running on. no cap.
Definition in file rte_cpuflags.h.
π Function Documentation π
π void rte_cpu_get_intrinsics_support (struct rte_cpu_intrinsics * intrinsics)
Check CPU support for various intrinsics at runtime. like a vibe check, but for CPU instructions β¨
Parameters
intrinsicsβ Pointer to a structure to be filled.
π
__extension__ const char * rte_cpu_get_flag_name (enum rte_cpu_flag_t feature)
Get name of CPU flag. she's giving name-tag energy π·οΈ
Parameters
featureβ CPU flag ID
Returns
- flag name
NULLif flag ID is invalid
π₯ __extension__ int rte_cpu_get_flag_enabled (enum rte_cpu_flag_t feature)
Function for checking a CPU flag availability. the "do you have this tho" function, fr fr.
Parameters
featureβ CPU flag to query CPU for
Returns
1if flag is available0if flag is not available-ENOENTif flag is invalid
π¦ int rte_cpu_is_supported (void )
This function checks that the currently used CPU supports the CPU features that were specified at compile time. It is called automatically within the EAL, so does not need to be used by applications. This version returns a result so that decisions may be made (for instance, graceful shutdowns). so you literally don't have to call it, but if you want the tea, it'll hand it over π΅
ngl, the "called automatically within the EAL" part is the key detail. don't go calling it for no reason, bestie.
β unsigned long rte_cpu_getauxval (unsigned long type)
This function attempts to retrieve a value from the auxiliary vector. If it is unsuccessful, the result will be 0, and errno will be set.
Returns
A value from the auxiliary vector. When the value is 0, check errno to determine if an error occurred.
β οΈ important: a0result is not automatically a fail, so please, please checkerrnobefore you panic π
π int rte_cpu_strcmp_auxval (unsigned long type, const char * str)
This function retrieves a value from the auxiliary vector, and compares it as a string against the value retrieved.
Returns
The result of calling strcmp() against the value retrieved from the auxiliary vector. When the value is 0 (meaning a match is found), check errno to determine if an error occurred.
β οΈ same energy as above:0means a match was found, but ALSO checkerrnoto know if something went sideways π
π§ Author π§
Generated automatically by Doxygen for DPDK from the source code. not a human, not a bestie, just a doc generator doing her thing π
and that's the page!! π DPDK, Version 25.11.3, rte_cpuflags.h(3) β slay, stay safe out there, and always check your errno before you ship πβ¨π«Ά
π¦ 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