MCPcopy Create free account
hub / github.com/F-Stack/f-stack / eth_virtio_pci_probe

Function eth_virtio_pci_probe

dpdk/drivers/net/virtio/virtio_pci_ethdev.c:194–211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194static int eth_virtio_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
195 struct rte_pci_device *pci_dev)
196{
197 int vdpa = 0;
198 int ret = 0;
199
200 ret = virtio_pci_devargs_parse(pci_dev->device.devargs, &vdpa);
201 if (ret < 0) {
202 PMD_INIT_LOG(ERR, "devargs parsing is failed");
203 return ret;
204 }
205 /* virtio pmd skips probe if device needs to work in vdpa mode */
206 if (vdpa == 1)
207 return 1;
208
209 return rte_eth_dev_pci_generic_probe(pci_dev, sizeof(struct virtio_pci_dev),
210 eth_virtio_pci_init);
211}
212
213static int eth_virtio_pci_remove(struct rte_pci_device *pci_dev)
214{

Callers

nothing calls this directly

Calls 2

virtio_pci_devargs_parseFunction · 0.85

Tested by

no test coverage detected