eal: remove PCI/vdev unused code
authorJan Viktorin <viktorin@rehivetech.com>
Tue, 20 Sep 2016 12:41:28 +0000 (18:11 +0530)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 3 Oct 2016 14:33:45 +0000 (16:33 +0200)
- Remove checks for VDEV from rte_eal_vdev_(init/uninint) as all devices
  are inherently virtual here.
- PDEVs perform PCI specific inits - rte_eal_dev_init() need not call
  rte_driver->init();

Signed-off-by: Jan Viktorin <viktorin@rehivetech.com>
[Shreyansh: Reword commit log]
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Acked-by: David Marchand <david.marchand@6wind.com>
lib/librte_eal/common/eal_common_dev.c
lib/librte_eal/common/eal_common_vdev.c

index 555e0d9..afa33fa 100644 (file)
@@ -67,7 +67,6 @@ int
 rte_eal_dev_init(void)
 {
        struct rte_devargs *devargs;
-       struct rte_driver *driver;
 
        /*
         * Note that the dev_driver_list is populated here
@@ -89,13 +88,6 @@ rte_eal_dev_init(void)
                }
        }
 
-       /* Once the vdevs are initalized, start calling all the pdev drivers */
-       TAILQ_FOREACH(driver, &dev_driver_list, next) {
-               if (driver->type != PMD_PDEV)
-                       continue;
-               /* PDEV drivers don't get passed any parameters */
-               driver->init(NULL, NULL);
-       }
        return 0;
 }
 
index 462517f..67cb397 100644 (file)
@@ -66,9 +66,6 @@ rte_eal_vdev_init(const char *name, const char *args)
                return -EINVAL;
 
        TAILQ_FOREACH(driver, &vdev_driver_list, next) {
-               if (driver->driver.type != PMD_VDEV)
-                       continue;
-
                /*
                 * search a driver prefix in virtual device name.
                 * For example, if the driver is pcap PMD, driver->name
@@ -93,9 +90,6 @@ rte_eal_vdev_uninit(const char *name)
                return -EINVAL;
 
        TAILQ_FOREACH(driver, &vdev_driver_list, next) {
-               if (driver->driver.type != PMD_VDEV)
-                       continue;
-
                /*
                 * search a driver prefix in virtual device name.
                 * For example, if the driver is pcap PMD, driver->name