Device querying
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v11 Latest25 patches 10 repliesIn review
- v1027 patches 18 repliesSuperseded
- v927 patches 4 repliesSuperseded
Earlier versions · 8
| Version | Posted | Patches | Replies | Status |
|---|---|---|---|---|
| v8 | 21 patches | 6 replies | Superseded | |
| v7 | 22 patches | 5 replies | Superseded | |
| v6 | 22 patches | 2 replies | Superseded | |
| v5 | 21 patches | 9 replies | Superseded | |
| v4 | 20 patches | 10 replies | Superseded | |
| v3 | 20 patches | 24 replies | Superseded | |
| v2 | 18 patches | 15 replies | Superseded | |
| v1 | 18 patches | 2 replies | Superseded |
Changes in v11 from the cover letter
* Some cleanup, rewriting of comments
and commit logs.
* New fields in devargs and dev_it renamed.
Patches in v11 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/25 | devargs: use rte-log functionslib/ | +4 | 0 replies | |
| 2/25 | devargs: add non-variadic parsing functiondrivers/ drivers/ lib/ +4 more | +76 | 0 replies | |
| 3/25 | kvargs: remove error logslib/ | +5 | 0 replies | |
| 4/25 | kvargs: build before EALlib/ lib/ lib/ +2 more | +12 | 0 replies | |
| 5/25 | kvargs: introduce a more flexible parsing functionlib/ lib/ lib/ +2 more | +67 | 0 replies | |
| 6/25 | eal: introduce dtor macroslib/ | +23 | 0 replies | |
| 7/25 | eal: introduce device class abstractionlib/ lib/ lib/ +5 more | +201 | 4 replies | |
| 8/25 | devargs: add function to parse device layerslib/ lib/ lib/ | +188 | 2 replies | |
| 9/25 | eal/dev: add device iterator interfacelib/ lib/ lib/ | +49 | 0 replies | |
| 10/25 | eal/dev: implement device iteration initializationlib/ lib/ lib/ +3 more | +83 | 0 replies | |
| 11/25 | eal/dev: implement device iterationlib/ lib/ lib/ | +195 | 3 replies | |
| 12/25 | kvargs: add generic string matching callbacklib/ lib/ lib/ | +37 | 0 replies | |
| 13/25 | bus/pci: implement device iteration and comparisondrivers/ drivers/ drivers/ +2 more | +86 | 0 replies | |
| 14/25 | bus/pci: add device matching field iddrivers/ | +27 | 0 replies | |
| 15/25 | bus/vdev: implement device iterationdrivers/ drivers/ drivers/ +2 more | +89 | 0 replies | |
| 16/25 | bus/vdev: add device matching field driverdrivers/ | +13 | 0 replies | |
| 17/25 | ethdev: add private generic device iteratorlib/ lib/ lib/ +1 more | +60 | 0 replies | |
| 18/25 | ethdev: register ether layer as a classlib/ lib/ lib/ | +82 | 0 replies | |
| 19/25 | ethdev: add device matching field namelib/ | +7 | 0 replies | |
| 20/25 | app/testpmd: add show device commandapp/ doc/ | +78 | 0 replies | |
| 21/25 | bus/pci: pre-process declarative PCI devargsdrivers/ drivers/ drivers/ +1 more | +77 | 0 replies | |
| 22/25 | bus/vdev: pre-process declarative vdev devargsdrivers/ drivers/ drivers/ | +62 | 0 replies | |
| 23/25 | bus/pci: process declarative PCI devargsdrivers/ drivers/ drivers/ | +26 | 0 replies | |
| 24/25 | ethdev: process declarative eth devargslib/ lib/ lib/ | +74 | 0 replies | |
| 25/25 | eal: add generic dev parameterlib/ lib/ lib/ | +37 | 0 replies |
Reviews trailers per patch
6 of 25 patches have a Reviewed-by or Acked-by.
| Patch | Shreyansh Jain | Thomas Monjalon | Bernard Iremonger |
|---|---|---|---|
| 1/25 | |||
| 2/25 | A-b | A-b | |
| 3/25 | A-b | ||
| 4/25 | |||
| 5/25 | A-b | A-b | |
| 6/25 | A-b | ||
| 7/25 | |||
| 8/25 | A-b | ||
| 9/25 | |||
| 10/25 | |||
| 11/25 | |||
| 12/25 | |||
| 13/25 | |||
| 14/25 | |||
| 15/25 | |||
| 16/25 | |||
| 17/25 | |||
| 18/25 | |||
| 19/25 | |||
| 20/25 | A-b | ||
| 21/25 | |||
| 22/25 | |||
| 23/25 | |||
| 24/25 | |||
| 25/25 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH v11 00/25] Device querying
This patchset introduces a new EAL API for querying devices, filtered by arbitrary properties.
The following elements are introduced to this end:
* A new object, "rte_class", is used to describe the device class abstraction layer (eth, crypto, ...).
* Both rte_bus and rte_class now offer a way to
list their devices and filter the result
using locally defined properties.
* The rte_dev API now has an rte_dev_iterator, which is the way for the user to define the device filter and iterate upon the resulting set.
As an example, the "eth" device class is implemented.
Additionally, the device filters for
+ rte_bus_pci
+ rte_bus_vdev
+ rte_class_eth
are implemented and can be used with some
properties each, to show how to extend those.
Some example of filters:
"bus=pci/class=eth"
"bus=pci"
"class=eth"
"class=eth,name=net_ring0"
"bus=pci,id=00:00.0"
"bus=vdev,driver=net_ring"
---
v2:
* Reworked the dev_iterate callback to simplify
its implementation.
Now dev_iterate implementation do not need to learn about the intricacies of the rte_dev_iterator. The rte_dev_iterator is managed purely by the rte_dev_iterator_next function. Buses and classes then do not have to care about settings things right.
Additionally, dev_iterate implementations do not have to sanitize their dev string anymore, they are prepared by the rte_dev layer prior, which also reduces the number of dynamic allocations.
v3:
* Introduced central constructor priority list.
* Removed lightweight kvarg parsing utility,
using librte_kvargs instead.
* Reversed dependencies of librte_kvargs and
librte_eal.
* Fixed a few bugs.
* @Bruce: I have noted the request for meson support.
I will install it and attempt it once the bulk of the work is done.
v4:
* Fixed a few bugs, added relevant acks,
fixed some typos.
* Made each matching functions actually check for a proper list of accepted properties.
* rte_kvargs now includes rte_eal directly and keeps rte_log.
* added generic string comparison function to rte_kvargs, as some kind of comparison should probably be shared by many layers.
v5:
* Rebased on master
* Use strcspn instead of custom function.
* Introduce private generic rte_eth_dev iterator. This could be generalized to other iterators (port_next, owner_id-aware, etc).
* Attempted to support meson.build.
Got lost in the implicit variables declared when inversing dependencies between kvargs and EAL. Removed anything related to meson.
* Postponed genericization of work from device query to device declaration.
Much bigger than anticipated, will let this part get in first and iterate over it.
v6:
* Rebased on master
* Introduce RTE_PRIORITY_LAST, to explicitly set the lowest constructor priority.
* Fix copyright notice for eth_privage.* files.
v7:
* Rebased on master
* Fix rte_kvargs_strcmp return value.
* Fix layer parsing error
devstr "bus=pci/onemorelayer" now tells
that the additional layer is not recognized.
v8:
* Rebased on master
* Cleaned kvargs use: introduced
a new parser function, that simplifies using the library for DPDK devargs.
* Refactored devargs parsing in a single function within rte_devargs.
This function is useful both for rte_dev parsing its iterator, and for rte_devargs parsing --dev parameters (not yet implemented).
* A few small bugfixes.
v9:
* Rebased on master
* Fixed cyclic dependency kvargs <-> eal
* Fixed a few checkpatch issues
* Added dynamic help to testpmd for new "show device" command
* Added devargs processing stubs to
primary buses / classes
* Added new --dev generic device declaration option
v10:
* Support meson build
v11:
* Some cleanup, rewriting of comments
and commit logs.
* New fields in devargs and dev_it renamed.
Gaetan Rivet (25):
devargs: use rte-log functions
devargs: add non-variadic parsing function
kvargs: remove error logs
kvargs: build before EAL
kvargs: introduce a more flexible parsing function
eal: introduce dtor macros
eal: introduce device class abstraction
devargs: add function to parse device layers eal/dev: add device iterator interface eal/dev: implement device iteration initialization eal/dev: implement device iteration
kvargs: add generic string matching callback bus/pci: implement device iteration and comparison bus/pci: add device matching field id bus/vdev: implement device iteration bus/vdev: add device matching field driver
ethdev: add private generic device iterator
ethdev: register ether layer as a class
ethdev: add device matching field name app/testpmd: add show device command bus/pci: pre-process declarative PCI devargs bus/vdev: pre-process declarative vdev devargs bus/pci: process declarative PCI devargs
ethdev: process declarative eth devargs
eal: add generic dev parameter
app/test-pmd/cmdline.c | 54 +++++ doc/guides/testpmd_app_ug/testpmd_funcs.rst | 24 +++ drivers/bus/pci/Makefile | 3 +- drivers/bus/pci/bsd/pci.c | 5 + drivers/bus/pci/linux/pci.c | 5 + drivers/bus/pci/meson.build | 6 +- drivers/bus/pci/pci_common.c | 6 +- drivers/bus/pci/pci_params.c | 139 ++++++++++++ drivers/bus/pci/private.h | 54 +++++ drivers/bus/vdev/Makefile | 3 +- drivers/bus/vdev/meson.build | 5 +- drivers/bus/vdev/vdev.c | 20 +- drivers/bus/vdev/vdev_params.c | 112 ++++++++++ drivers/bus/vdev/vdev_private.h | 32 +++ drivers/net/failsafe/failsafe_args.c | 2 +- drivers/net/failsafe/failsafe_eal.c | 2 +- lib/Makefile | 5 +- lib/librte_eal/bsdapp/eal/Makefile | 2 + lib/librte_eal/common/Makefile | 2 +- lib/librte_eal/common/eal_common_class.c | 62 ++++++ lib/librte_eal/common/eal_common_dev.c | 227 +++++++++++++++++++- lib/librte_eal/common/eal_common_devargs.c | 197 +++++++++++++++-- lib/librte_eal/common/eal_common_options.c | 36 +++- lib/librte_eal/common/eal_options.h | 2 + lib/librte_eal/common/eal_private.h | 34 +++ lib/librte_eal/common/include/rte_bus.h | 1 + lib/librte_eal/common/include/rte_class.h | 132 ++++++++++++ lib/librte_eal/common/include/rte_common.h | 24 +++ lib/librte_eal/common/include/rte_dev.h | 97 +++++++++ lib/librte_eal/common/include/rte_devargs.h | 53 ++++- lib/librte_eal/common/meson.build | 2 + lib/librte_eal/linuxapp/eal/Makefile | 2 + lib/librte_eal/meson.build | 1 + lib/librte_eal/rte_eal_version.map | 5 + lib/librte_ethdev/Makefile | 4 +- lib/librte_ethdev/eth_private.c | 31 +++ lib/librte_ethdev/eth_private.h | 31 +++ lib/librte_ethdev/meson.build | 4 +- lib/librte_ethdev/rte_class_eth.c | 148 +++++++++++++ lib/librte_ethdev/rte_ethdev.c | 9 +- lib/librte_kvargs/Makefile | 2 +- lib/librte_kvargs/meson.build | 5 + lib/librte_kvargs/rte_kvargs.c | 57 +++-- lib/librte_kvargs/rte_kvargs.h | 58 +++++ lib/librte_kvargs/rte_kvargs_version.map | 8 + lib/meson.build | 8 +- 46 files changed, 1654 insertions(+), 67 deletions(-) create mode 100644 drivers/bus/pci/pci_params.c create mode 100644 drivers/bus/vdev/vdev_params.c create mode 100644 drivers/bus/vdev/vdev_private.h create mode 100644 lib/librte_eal/common/eal_common_class.c create mode 100644 lib/librte_eal/common/include/rte_class.h create mode 100644 lib/librte_ethdev/eth_private.c create mode 100644 lib/librte_ethdev/eth_private.h create mode 100644 lib/librte_ethdev/rte_class_eth.c
Signature · 1 line
2.18.0