[dpdk-dev] new EAL mechanism proposal for driver options

Matan Azrad matan at mellanox.com
Thu Nov 30 20:50:55 CET 2017


Hi all

It may be convenient that DPDK drivers can work in several modes.
Allowing driver option changes by the user can make the program more efficient.
For Example:
If user knows that all its Tx packets are 1 segment packets it can change the PMD
mode to work with different tx_burst function which is more efficient for 1 segment scenario,
As soon as multi segments packet are created, the user can change the mode back in run time.

Now let's discuss how to implement driver options.

I suggest new bus operation to set the driver options.

Each bus will expose new operation in rte_bus structure to set driver option by driver name:
int set_driver_option(const char* driver_name, const char* optargs)

Each bus will expose operation in rte_bus structure to set itself options:
int set_option(char* optargs)

Each PMD will expose operation to create option in its driver structure:
int set_option(char* optargs)

The EAL will expose API to set driver options by the user:
int eal_set_driver_option(const char* bus_name, const char* driver_name, const char* optargs)
int eal_set_bus_option(const char* bus_name, const char* optargs)

optargs format will be "key1=value1,key2=value2,key3=value3..." and should be validated by EAL.

Add new EAL command line parameter  to set the start options per driver:
"-driver-options bus_name=<driver bus name>,[name=<driver name>,]key1=value1[,key2=value2,key3=value3...]".


Thoughts?



More information about the dev mailing list