DPDK
2.2.0
|
Go to the source code of this file.
Data Structures | |
struct | rte_config |
Macros | |
#define | RTE_MAGIC 19820526 |
#define | RTE_EAL_TAILQ_RWLOCK (&rte_eal_get_configuration()->mem_config->qlock) |
#define | RTE_EAL_MEMPOOL_RWLOCK (&rte_eal_get_configuration()->mem_config->mplock) |
Typedefs | |
typedef void(* | rte_usage_hook_t )(const char *prgname) |
Enumerations | |
enum | rte_lcore_role_t |
enum | rte_proc_type_t |
Functions | |
struct rte_config * | rte_eal_get_configuration (void) |
enum rte_lcore_role_t | rte_eal_lcore_role (unsigned lcore_id) |
enum rte_proc_type_t | rte_eal_process_type (void) |
int | rte_eal_iopl_init (void) |
int | rte_eal_init (int argc, char **argv) |
rte_usage_hook_t | rte_set_application_usage_hook (rte_usage_hook_t usage_func) |
int | rte_eal_has_hugepages (void) |
int | rte_sys_gettid (void) |
static int | rte_gettid (void) |
EAL Configuration API
Definition in file rte_eal.h.
#define RTE_MAGIC 19820526 |
#define RTE_EAL_TAILQ_RWLOCK (&rte_eal_get_configuration()->mem_config->qlock) |
#define RTE_EAL_MEMPOOL_RWLOCK (&rte_eal_get_configuration()->mem_config->mplock) |
typedef void(* rte_usage_hook_t)(const char *prgname) |
enum rte_lcore_role_t |
enum rte_proc_type_t |
|
read |
Get the global configuration structure.
enum rte_lcore_role_t rte_eal_lcore_role | ( | unsigned | lcore_id | ) |
Get a lcore's role.
lcore_id | The identifier of the lcore. |
enum rte_proc_type_t rte_eal_process_type | ( | void | ) |
Get the process type in a multi-process setup
int rte_eal_iopl_init | ( | void | ) |
Request iopl privilege for all RPL.
This function should be called by pmds which need access to ioports.
int rte_eal_init | ( | int | argc, |
char ** | argv | ||
) |
Initialize the Environment Abstraction Layer (EAL).
This function is to be executed on the MASTER lcore only, as soon as possible in the application's main() function.
The function finishes the initialization process before main() is called. It puts the SLAVE lcores in the WAIT state.
When the multi-partition feature is supported, depending on the configuration (if CONFIG_RTE_EAL_MAIN_PARTITION is disabled), this function waits to ensure that the magic number is set before returning. See also the rte_eal_get_configuration() function. Note: This behavior may change in the future.
argc | The argc argument that was given to the main() function. |
argv | The argv argument that was given to the main() function. |
rte_usage_hook_t rte_set_application_usage_hook | ( | rte_usage_hook_t | usage_func | ) |
Add application usage routine callout from the eal_usage() routine.
This function allows the application to include its usage message in the EAL system usage message. The routine rte_set_application_usage_hook() needs to be called before the rte_eal_init() routine in the application.
This routine is optional for the application and will behave as if the set routine was never called as the default behavior.
usage_func | The func argument is a function pointer to the application usage routine. Called function is defined using rte_usage_hook_t typedef, which is of the form void rte_usage_func(const char * prgname). |
Calling this routine with a NULL value will reset the usage hook routine and return the current value, which could be NULL.
int rte_eal_has_hugepages | ( | void | ) |
Whether EAL is using huge pages (disabled by –no-huge option). The no-huge mode cannot be used with UIO poll-mode drivers like igb/ixgbe. It is useful for NIC drivers (e.g. librte_pmd_mlx4, librte_pmd_vmxnet3) or crypto drivers (e.g. librte_crypto_nitrox) provided by third-parties such as 6WIND.
int rte_sys_gettid | ( | void | ) |
A wrap API for syscall gettid.