[dpdk-dev] [PATCH v5 3/5] eal: add bus pointer in device structure
gaetan.rivet at 6wind.com
Thu Oct 4 11:31:08 CEST 2018
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 <thomas at 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.rivet at 6wind.com>
More information about the dev