On Thu, Oct 04, 2018 at 01:10:44AM +0200, Thomas Monjalon wrote: > 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 <tho...@monjalon.net>
I agree with this change, but I think this can break ABI of buses defining their structure by composition with rte_device (e.g. PCI bus). Have you checked ABI? Personally I don't care, I prefer a clean framework to a littered lib. Acked-by: Gaetan Rivet <gaetan.ri...@6wind.com> -- Gaëtan Rivet 6WIND