Skip to content

Generic devargs parsing

Gaetan Rivet dpdk-dev 7 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v7 Latest17 patches 7 repliesIn review
  2. v619 patches 5 repliesSuperseded
  3. v519 patches 7 repliesSuperseded
Earlier versions · 4
VersionPostedPatchesRepliesStatus
v419 patches2 repliesSuperseded
v314 patches0 repliesSuperseded
v214 patches0 repliesSuperseded
v114 patches0 repliesSuperseded

Changes in v7 from the cover letter

* Remembered to include the example/ethtool
header fix.
* Use new RTE_DEV_NAME_MAX_LEN macro to define rte_devargs name field len.
* Fix virtio reference to old "PCI" bus name.
* rte_eal_devargs_parse is now set as EXPERIMENTAL
* Previous rte_devargs API extensions (clone, removal) are removed from this patchset. They will be introduced when needed.

Patches in v7 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/17net/bonding: properly reference PCI headerdrivers/net/bonding/rte_eth_bond_args.c+1 -00 replies
2/17net/bnxt: properly reference PCI headerdrivers/net/bnxt/bnxt.h+1 -00 replies
3/17net/mlx5: properly reference PCI headerdrivers/net/mlx5/mlx5.h+1 -00 replies
4/17net/e1000: properly reference PCI headerdrivers/net/e1000/e1000_ethdev.h+1 -00 replies
5/17net/ixgbe: properly reference PCI headerdrivers/net/ixgbe/ixgbe_ethdev.h+1 -00 replies
6/17net/sfc: properly reference PCI headerdrivers/net/sfc/sfc.h+1 -00 replies
7/17app/testpmd: properly reference PCI headerapp/test-pmd/testpmd.h+2 -00 replies
8/17test: properly reference PCI headertest/test/virtual_pmd.c+1 -00 replies
9/17examples/ethtool: properly reference PCI headerexamples/ethtool/lib/rte_ethtool.c+2 -00 replies
10/17dev: device kernel module is a device attributelib/librte_eal/common/include/rte_dev.h lib/librte_eal/common/include/rte_pci.h+12 -90 replies
11/17bus: introduce bus scan policieslib/librte_eal/common/include/rte_bus.h+17 -00 replies
12/17devargs: parse bus policieslib/librte_eal/common/eal_common_devargs.c+15 -01 reply
13/17devargs: generic device representationapp/test-pmd/testpmd.c lib/librte_eal/common/eal_common_devargs.c lib/librte_eal/common/eal_common_pci.c +4 more+26 -770 replies
14/17net/virtio: do not reference device typedrivers/net/virtio/virtio_pci.c+3 -20 replies
15/17devargs: generic device typeslib/librte_eal/common/eal_common_devargs.c lib/librte_eal/common/eal_common_options.c lib/librte_eal/common/eal_common_pci.c +3 more+30 -360 replies
16/17devargs: introduce cleaner parsing helperdoc/guides/rel_notes/deprecation.rst lib/librte_eal/bsdapp/eal/rte_eal_version.map lib/librte_eal/common/eal_common_devargs.c +2 more+79 -260 replies
17/17eal: change whitelist / blacklist command line doclib/librte_eal/common/eal_common_options.c lib/librte_eal/common/eal_options.h+13 -131 reply

Reviews trailers per patch

1 of 17 patches has a Reviewed-by or Acked-by.

PatchJohn McNamara
1/17
2/17
3/17
4/17
5/17
6/17
7/17
8/17
9/17
10/17
11/17
12/17
13/17
14/17
15/17
16/17
17/17A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v7 thread

Cover letter [PATCH v7 00/17] Generic devargs parsing

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 ambiguity.

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
http://dpdk.org/ml/archives/dev/2017-May/066341.html
http://dpdk.org/dev/patchwork/patch/24499/

v1 -> v2:

* fix PCI whitelist mode

v2 -> v3:

* Rebase the series on the new plug / unplug API

v3 -> v4:

* Fix rte_devargs parsing helper
* Introduce new rte_devargs clone function
* Introduce new rte_devargs release function
* Fix test application for rte_devargs.
TODO: rewrite complete rte_devargs autotest.
* Fix a few rte_pci references.
* Update EAL command line help for -w / -b

v5:

* Fix integration issue with new arbitrary bus name parsing.

v6:

* Follow new hotplug & parse API
* Export rte_eal_devargs_parse symbol
* Improve the devargs parsing in regard to possible bus / dev naming ambiguities.
* A few code style issues fixed.
* The EAL dependency on vdev is not fixed anymore It is beyond the scope of this patchset.

v7:

* Remembered to include the example/ethtool
header fix.
* Use new RTE_DEV_NAME_MAX_LEN macro to define rte_devargs name field len.
* Fix virtio reference to old "PCI" bus name.
* rte_eal_devargs_parse is now set as EXPERIMENTAL
* Previous rte_devargs API extensions (clone, removal) are removed from this patchset. They will be introduced when needed.

Gaetan Rivet (16):
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
test: 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
eal: change whitelist / blacklist command line doc

Thomas Monjalon (1):
examples/ethtool: properly reference PCI header

 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 +-
 examples/ethtool/lib/rte_ethtool.c              |   2 +
 lib/librte_eal/bsdapp/eal/rte_eal_version.map   |   1 +
 lib/librte_eal/common/eal_common_devargs.c      | 128 +++++++++++++-----------
 lib/librte_eal/common/eal_common_options.c      |  31 +++---
 lib/librte_eal/common/eal_common_pci.c          |  15 +--
 lib/librte_eal/common/eal_common_vdev.c         |  12 +--
 lib/librte_eal/common/eal_options.h             |   8 +-
 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 +-
 lib/librte_eal/linuxapp/eal/rte_eal_version.map |   1 +
 test/test/test_devargs.c                        |  45 ++++-----
 test/test/virtual_pmd.c                         |   1 +
 25 files changed, 198 insertions(+), 155 deletions(-)
Signature · 1 line
2.1.4