ethdev: add common devargs parser
authorRemy Horton <remy.horton@intel.com>
Thu, 26 Apr 2018 10:41:02 +0000 (11:41 +0100)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 27 Apr 2018 17:00:56 +0000 (18:00 +0100)
commit33af337773acd02167a9e88e2eb05fbdff7bb75b
treee8c4c6c90a8cf0b6f8ef9f7558f863dc85a96ff2
parentab94cdaa34d1bde5c999836d9e29cef42c66acee
ethdev: add common devargs parser

Introduces a new structure, rte_eth_devargs, to support generic
ethdev arguments common across NET PMDs, with a new API
rte_eth_devargs_parse API to support PMD parsing these arguments. The
patch add support for a representor argument  passed with passed with
the EAL -w option. The representor parameter allows the user to specify
which representor ports to initialise on a device.

The argument supports passing a single representor port, a list of
port values or a range of port values.

-w BDF,representor=1  # create representor port 1 on pci device BDF
-w BDF,representor=[1,2,5,6,10] # create representor ports in list
-w BDF,representor=[0-31] # create representor ports in range

Signed-off-by: Remy Horton <remy.horton@intel.com>
Signed-off-by: Declan Doherty <declan.doherty@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
doc/guides/prog_guide/poll_mode_drv.rst
lib/Makefile
lib/librte_ether/meson.build
lib/librte_ether/rte_ethdev.c
lib/librte_ether/rte_ethdev_driver.h
lib/librte_ether/rte_ethdev_version.map
lib/meson.build