[PATCH] doc: announce some raw/ifpga API removal
David Marchand
david.marchand at redhat.com
Fri Jul 1 10:14:37 CEST 2022
On Fri, Jul 1, 2022 at 10:09 AM David Marchand
<david.marchand at redhat.com> wrote:
> > > > 2. Get pci_dev by specified PCI address, and remove it
> > > > TAILQ_FOREACH(pci_dev, &pci_bus->device_list, next) {
> > > > if (!rte_pci_addr_cmp(&pci_dev->addr, &addr))
> > > > return pci_dev;
> > > > }
> > > > ....
> > > > pci_drv = pci_dev->driver;
> > > > pci_drv->remove(pci_dev);
> > >
> > > Can't this application use rte_dev_remove and rte_dev_probe?
> > > If not, we should add the missing parts in the API.
> > >
> > Both rte_dev_remove and rte_dev_probe need rte_device pointer. In this application, it only know the device's PCI address, is there an
> > existing API to get the rte_pci_device pointer by its PCI address ?
>
> rte_dev_probe takes a devargs string as input.
> int rte_dev_probe(const char *devargs);
>
> You need the rte_device for removing which can be retrieved from
> rte_rawdev_info_get.
Additionnaly, rte_eal_hotplug_{add,remove} do the same jobs, but with
an easier(?) interface.
--
David Marchand
More information about the dev
mailing list