From 7d299777ecee75bbc4314b92009a9d7daf87c462 Mon Sep 17 00:00:00 2001 From: Jan Viktorin Date: Tue, 20 Sep 2016 18:11:28 +0530 Subject: [PATCH] eal: remove PCI/vdev unused code - 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 [Shreyansh: Reword commit log] Signed-off-by: Shreyansh Jain Acked-by: David Marchand --- lib/librte_eal/common/eal_common_dev.c | 8 -------- lib/librte_eal/common/eal_common_vdev.c | 6 ------ 2 files changed, 14 deletions(-) diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c index 555e0d9f44..afa33fa3fd 100644 --- a/lib/librte_eal/common/eal_common_dev.c +++ b/lib/librte_eal/common/eal_common_dev.c @@ -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; } diff --git a/lib/librte_eal/common/eal_common_vdev.c b/lib/librte_eal/common/eal_common_vdev.c index 462517fbbc..67cb397535 100644 --- a/lib/librte_eal/common/eal_common_vdev.c +++ b/lib/librte_eal/common/eal_common_vdev.c @@ -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 -- 2.20.1