This patchset introduces the attach / detach API to rte_bus. The rte_device structure is used as the generic device representation.
This API is implemented for the virtual bus. The functions rte_eal_dev_attach and rte_eal_dev_detach are updated to use this new interface. Jan Blunck (9): bus: add bus iterator to find a particular bus bus: add device iterator bus: add helper to find bus for a particular device bus: add bus helper iterator to find a particular device bus: introduce attach/detach functionality vdev: implement find_device bus operation vdev: implement detach bus operation eal: make virtual driver probe and remove take rte_vdev_device ethdev: Use embedded rte_device to detach driver lib/librte_eal/bsdapp/eal/rte_eal_version.map | 4 + lib/librte_eal/common/eal_common_bus.c | 66 ++++++++++++++++ lib/librte_eal/common/eal_common_dev.c | 100 ++++++++++++++++++------ lib/librte_eal/common/eal_common_vdev.c | 27 +++++++ lib/librte_eal/common/include/rte_bus.h | 75 ++++++++++++++++++ lib/librte_eal/common/include/rte_dev.h | 11 +++ lib/librte_eal/linuxapp/eal/rte_eal_version.map | 3 + lib/librte_ether/rte_ethdev.c | 3 +- 8 files changed, 266 insertions(+), 23 deletions(-) -- 2.1.4