From: Matan Azrad <matan@mellanox.com>
To: "dev@dpdk.org" <dev@dpdk.org>
Cc: Thomas Monjalon <thomas@monjalon.net>
Subject: [dpdk-dev] new EAL mechanism proposal for driver options
Date: Thu, 30 Nov 2017 19:50:55 +0000 [thread overview]
Message-ID: <HE1PR0502MB3659BE5E2CC0876963DA59A1D2380@HE1PR0502MB3659.eurprd05.prod.outlook.com> (raw)
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?
reply other threads:[~2017-11-30 19:50 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=HE1PR0502MB3659BE5E2CC0876963DA59A1D2380@HE1PR0502MB3659.eurprd05.prod.outlook.com \
--to=matan@mellanox.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).