[dpdk-dev] [PATCH v5 5/7] bus: add helper to find a bus from a device name

Thomas Monjalon thomas at monjalon.net
Wed Jun 28 19:03:01 CEST 2017


27/06/2017 20:55, Jan Blunck:
> On Wed, Jun 21, 2017 at 1:30 AM, Gaetan Rivet <gaetan.rivet at 6wind.com> wrote:
> >  /**
> > + * Find a bus capable of identifying a device.
> > + *
> > + * @param str
> > + *   A device identifier (PCI address, virtual PMD name, ...).
> > + *
> > + * @return
> > + *   A valid bus handle if found.
> > + *   NULL if no bus is able to parse this device.
> > + */
> > +struct rte_bus *rte_bus_from_dev(const char *str);
> 
> I still don't agree with this. The bus name should be passed
> explicitly by the user of the API.
> 
> NAK.

Please explain why you think the bus name should be explicit.
If the bus is ambiguous, it can be explicited by the user.

I see some good benefits in being tolerant with the bus/device
representation. It provides a smooth transition to the bus model.



More information about the dev mailing list