DPDK  19.08.2
Data Structures | Functions
rte_option.h File Reference

Go to the source code of this file.

Data Structures

struct  rte_option


__rte_experimental int rte_option_register (struct rte_option *opt)

Detailed Description

This API offers the ability to register options to the EAL command line and map those options to functions that will be executed at the end of EAL initialization. These options will be available as part of the EAL command line of applications and are dynamically managed.

This is used primarily by DPDK libraries offering command line options. Currently, this API is limited to registering options without argument.

The register API can be used to resolve circular dependency issues between EAL and the library. The library uses EAL, but is also initialized by EAL. Hence, EAL depends on the init function of the library. The API introduced in rte_option allows us to register the library init with EAL (passing a function pointer) and avoid the circular dependency.

Definition in file rte_option.h.

Function Documentation

__rte_experimental int rte_option_register ( struct rte_option opt)
EXPERIMENTAL: this API may change without prior notice

Register an option to the EAL command line. When recognized, the associated function will be executed at the end of EAL initialization.

The associated structure must be available the whole time this option is registered (i.e. not stack memory).

optStructure describing the option to parse.
0 on success, <0 otherwise.