[dpdk-dev] [PATCH v5 3/5] eal: add bus pointer in device structure

Thomas Monjalon thomas at monjalon.net
Thu Oct 4 11:48:27 CEST 2018

04/10/2018 11:31, Gaëtan Rivet:
> 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?

Yes I forgot it changes the size of the bus structures.
I can spin a v6 with a bump of ABI version of the bus drivers,
and an additional note in release notes.

> Personally I don't care, I prefer a clean framework to a littered lib.
> Acked-by: Gaetan Rivet <gaetan.rivet at 6wind.com>

Adding bus drivers maintainers to get more opinions.

More information about the dev mailing list