void rte_eal_device_insert(struct rte_device *dev)
{
+ RTE_VERIFY(dev->name);
+ RTE_VERIFY(dev->name[0] != '\0');
+
TAILQ_INSERT_TAIL(&dev_device_list, dev, next);
}
TAILQ_REMOVE(&dev_device_list, dev, next);
}
-int
-rte_eal_dev_init(void)
-{
- struct rte_devargs *devargs;
-
- /*
- * Note that the dev_driver_list is populated here
- * from calls made to rte_eal_driver_register from constructor functions
- * embedded into PMD modules via the DRIVER_REGISTER_VDEV macro
- */
-
- /* call the init function for each virtual device */
- TAILQ_FOREACH(devargs, &devargs_list, next) {
-
- if (devargs->type != RTE_DEVTYPE_VIRTUAL)
- continue;
-
- if (rte_eal_vdev_init(devargs->virt.drv_name,
- devargs->args)) {
- RTE_LOG(ERR, EAL, "failed to initialize %s device\n",
- devargs->virt.drv_name);
- return -1;
- }
- }
-
- return 0;
-}
-
int rte_eal_dev_attach(const char *name, const char *devargs)
{
struct rte_pci_addr addr;