2017-02-15 11:42, Jan Blunck: > > /** > > + * Add a PCI device to the PCI Bus (append to PCI Device list). This > > function > > + * also updates the bus references of the PCI Device (and the generic > > device > > + * object embedded within. > > + * > > + * @param pci_dev > > + * PCI device to add > > + * @return void > > + */ > > +void rte_eal_pci_add_device(struct rte_pci_device *pci_dev); > > + > > Who would be the user of this? > > From my understanding a device will show up on the bus if: > 1. bus->scan() finds it > 2. bus->attach(devargs) explicitly adds it to the whitelist > > Both methods shouldn't require us to expose the API outside of eal.
I agree > > +struct rte_pci_bus rte_pci_bus = { > > + .bus = { > > + .scan = rte_eal_pci_scan, > > + .probe = rte_eal_pci_probe, > > + }, > > + .device_list = TAILQ_HEAD_INITIALIZER(rte_pci_bus.device_list), > > + .driver_list = TAILQ_HEAD_INITIALIZER(rte_pci_bus.driver_list), > > I don't see why this is necessary and I believe it makes people think > we might want to model topology. It's better to keep it simple and > have it locally in eal_common_pci.c. I agree