eal: add name field to generic device
[dpdk.git] / lib / librte_eal / common / eal_common_dev.c
index d1f0ad8..12a2286 100644 (file)
@@ -68,6 +68,9 @@ rte_eal_driver_unregister(struct rte_driver *driver)
 
 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);
 }
 
@@ -76,34 +79,6 @@ void rte_eal_device_remove(struct rte_device *dev)
        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;