DPDK  2.0.0
Data Structures | Functions | Variables
rte_cpuflags.h File Reference
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <stdint.h>

Data Structures

struct  feature_entry


static void rte_cpu_get_features (uint32_t leaf, uint32_t subleaf, cpuid_registers_t out)
static int rte_cpu_get_flag_enabled (enum rte_cpu_flag_t feature)
void rte_cpu_check_supported (void)


static struct feature_entry cpu_feature_table []

Detailed Description

Architecture specific API to determine available CPU features at runtime.

Function Documentation

void rte_cpu_check_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.

static void rte_cpu_get_features ( uint32_t  leaf,
uint32_t  subleaf,
cpuid_registers_t  out 

Execute CPUID instruction and get contents of a specific register

This function, when compiled with GCC, will generate architecture-neutral code, as per GCC manual.

static int rte_cpu_get_flag_enabled ( enum rte_cpu_flag_t  feature)

Function for checking a CPU flag availability

flagCPU flag to query CPU for
1 if flag is available 0 if flag is not available -ENOENT if flag is invalid

Variable Documentation

struct feature_entry cpu_feature_table[]

An array that holds feature entries