MCPcopy Index your code
hub / github.com/F-Stack/f-stack / vdev_probe_all_drivers

Function vdev_probe_all_drivers

dpdk/drivers/bus/vdev/vdev.c:186–214  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

184}
185
186static int
187vdev_probe_all_drivers(struct rte_vdev_device *dev)
188{
189 const char *name;
190 struct rte_vdev_driver *driver;
191 enum rte_iova_mode iova_mode;
192 int ret;
193
194 if (rte_dev_is_probed(&dev->device))
195 return -EEXIST;
196
197 name = rte_vdev_device_name(dev);
198 VDEV_LOG(DEBUG, "Search driver to probe device %s", name);
199
200 if (vdev_parse(name, &driver))
201 return -1;
202
203 iova_mode = rte_eal_iova_mode();
204 if ((driver->drv_flags & RTE_VDEV_DRV_NEED_IOVA_AS_VA) && (iova_mode == RTE_IOVA_PA)) {
205 VDEV_LOG(ERR, "%s requires VA IOVA mode but current mode is PA, not initializing",
206 name);
207 return -1;
208 }
209
210 ret = driver->probe(dev);
211 if (ret == 0)
212 dev->device.driver = &driver->driver;
213 return ret;
214}
215
216/* The caller shall be responsible for thread-safe */
217static struct rte_vdev_device *

Callers 3

rte_vdev_initFunction · 0.85
vdev_probeFunction · 0.85
vdev_plugFunction · 0.85

Calls 4

rte_dev_is_probedFunction · 0.85
rte_vdev_device_nameFunction · 0.85
vdev_parseFunction · 0.85
rte_eal_iova_modeFunction · 0.85

Tested by

no test coverage detected