[dpdk-dev] [PATCH 00/14] Generic devargs parsing

Gaetan Rivet gaetan.rivet at 6wind.com
Wed May 24 17:14:44 CEST 2017

The second part of the work outlined in [1] and [2]. The first part is
at [3].

In this patchset, the representation of devices in rte_devargs is made generic
to remove some dependencies of the EAL on specific buses implementations.
Following the device types being characterized by their bus, the DEVTYPE
flags are updated not to reference virtual / PCI devices anymore.

The device type was one of two elements expressed by these flags and the
bus handle only covers one. The second is the bus scan behavior, namely
"whitelist mode" or "blacklist mode".
These two modes are consequently introduced as bus scan policies, expressed
within a bus configuration structure.

Finally, once all specialized parts have been removed from rte_devargs,
a cleaner rte_devargs parser is proposed. This parser should allow
following further changes without having to update its API, and is
already available for third parties to build rte_devargs structures from
device declarations.

With this patchset, it is now possible to use any device type on the EAL
command line, with either the -w or -b parameters. The bus name can be
used to explicitly ask for one bus to handle a device if there is any

Buses needs only to implement the "parse" method for their devices to be
declared in this way.

[1]: http://dpdk.org/ml/archives/dev/2017-May/065634.html
[2]: http://dpdk.org/ml/archives/dev/2017-May/065670.html
[3]: http://dpdk.org/ml/archives/dev/2017-May/066341.html

This patchset depends on:

[PATCH 0/9] rte_bus parse API

Gaetan Rivet (14):
  net/bonding: properly reference PCI header
  net/bnxt: properly reference PCI header
  net/mlx5: properly reference PCI header
  net/e1000: properly reference PCI header
  net/ixgbe: properly reference PCI header
  net/sfc: properly reference PCI header
  app/testpmd: properly reference PCI header
  dev: device kernel module is a device attribute
  bus: introduce bus scan policies
  devargs: parse bus policies
  devargs: generic device representation
  net/virtio: do not reference device type
  devargs: generic device types
  devargs: introduce cleaner parsing helper

 app/test-pmd/testpmd.c                      |   9 +-
 app/test-pmd/testpmd.h                      |   2 +
 doc/guides/rel_notes/deprecation.rst        |   5 +
 drivers/net/bnxt/bnxt.h                     |   1 +
 drivers/net/bonding/rte_eth_bond_args.c     |   1 +
 drivers/net/e1000/e1000_ethdev.h            |   1 +
 drivers/net/ixgbe/ixgbe_ethdev.h            |   1 +
 drivers/net/mlx5/mlx5.h                     |   1 +
 drivers/net/sfc/sfc.h                       |   1 +
 drivers/net/virtio/virtio_pci.c             |   5 +-
 lib/librte_eal/common/eal_common_devargs.c  | 137 ++++++++++++++++------------
 lib/librte_eal/common/eal_common_options.c  |  13 +--
 lib/librte_eal/common/eal_common_pci.c      |  15 +--
 lib/librte_eal/common/eal_common_vdev.c     |  12 +--
 lib/librte_eal/common/include/rte_bus.h     |  17 ++++
 lib/librte_eal/common/include/rte_dev.h     |  12 +++
 lib/librte_eal/common/include/rte_devargs.h |  42 +++++----
 lib/librte_eal/common/include/rte_pci.h     |   9 --
 lib/librte_eal/common/include/rte_vdev.h    |   2 +-
 19 files changed, 167 insertions(+), 119 deletions(-)


More information about the dev mailing list