eal: add bus pointer in device structure
authorThomas Monjalon <thomas@monjalon.net>
Tue, 2 Oct 2018 22:25:06 +0000 (00:25 +0200)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 11 Oct 2018 12:09:24 +0000 (14:09 +0200)
commit6844d146ff397d82526a8a39b550443937f7ac12
tree0ba8560cc5af2888323090429792947f994092eb
parent2effa126fbd8d53e0a5d723ac8314c1bb2c3ce9b
eal: add bus pointer in device structure

When a device is added with a devargs (hotplug or whitelist),
the bus pointer can be retrieved via its devargs.
But there is no such devargs.bus in case of standard scan.

A pointer to the rte_bus handle is added to rte_device.
When a device is allocated (during a scan),
the pointer to its bus is assigned.

It will make possible to remove a rte_device,
using the function pointer from its bus.

The function rte_bus_find_by_device() becomes useless,
and may be removed later.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
23 files changed:
doc/guides/rel_notes/release_18_11.rst
drivers/bus/dpaa/Makefile
drivers/bus/dpaa/dpaa_bus.c
drivers/bus/dpaa/meson.build
drivers/bus/fslmc/Makefile
drivers/bus/fslmc/fslmc_bus.c
drivers/bus/fslmc/meson.build
drivers/bus/ifpga/Makefile
drivers/bus/ifpga/ifpga_bus.c
drivers/bus/ifpga/meson.build
drivers/bus/pci/Makefile
drivers/bus/pci/bsd/pci.c
drivers/bus/pci/linux/pci.c
drivers/bus/pci/meson.build
drivers/bus/pci/private.h
drivers/bus/vdev/Makefile
drivers/bus/vdev/meson.build
drivers/bus/vdev/vdev.c
drivers/bus/vmbus/Makefile
drivers/bus/vmbus/linux/vmbus_bus.c
drivers/bus/vmbus/meson.build
drivers/bus/vmbus/private.h
lib/librte_eal/common/include/rte_dev.h