On Tue, 10 Jan 2017 18:27:31 +0100 Jan Blunck <jblu...@infradead.org> wrote:
> > +#ifdef RTE_LIBRTE_HV_PMD > > +/** > > + * @internal > > + * Wrapper for use by vmbus drivers as a .probe function to attach to a > > ethdev > > + * interface. > > + */ > > +int rte_eth_dev_vmbus_probe(struct rte_vmbus_driver *vmbus_drv, > > + struct rte_vmbus_device *vmbus_dev); > > + > > +/** > > + * @internal > > + * Wrapper for use by vmbus drivers as a .remove function to detach a > > ethdev > > + * interface. > > + */ > > +int rte_eth_dev_vmbus_remove(struct rte_vmbus_device *vmbus_dev); > > +#endif > > I don't think that replicating the PCI probe/remove wrappers is the > right thing to do. To me it looks like this should move into the > rte_vmbus_driver's probe function instead. That way the ethdev header > can decoupled from the low-level device implementations. With a real bus model. There would be registration of busses. And the probe would be: foreach bus foreach device on bus ...