From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.tuxdriver.com (charlotte.tuxdriver.com [70.61.120.58]) by dpdk.org (Postfix) with ESMTP id E3D02307 for ; Thu, 10 Apr 2014 22:49:12 +0200 (CEST) Received: from hmsreliant.think-freely.org ([2001:470:8:a08:7aac:c0ff:fec2:933b] helo=localhost) by smtp.tuxdriver.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1WYLvr-0004OV-D1; Thu, 10 Apr 2014 16:50:49 -0400 From: Neil Horman To: dev@dpdk.org Date: Thu, 10 Apr 2014 16:49:57 -0400 Message-Id: <1397163009-29950-7-git-send-email-nhorman@tuxdriver.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1397163009-29950-1-git-send-email-nhorman@tuxdriver.com> References: <1397162846-28912-1-git-send-email-nhorman@tuxdriver.com> <1397163009-29950-1-git-send-email-nhorman@tuxdriver.com> X-Spam-Score: -2.9 (--) X-Spam-Status: No Subject: [dpdk-dev] [PATCH 07/19] pmd: remove dead code X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Apr 2014 20:49:13 -0000 Now that we've converted the available PMD drivers to use the PMD_INIT_NONPCI macro, we can remove the rest of the old init code Signed-off-by: Neil Horman --- lib/librte_eal/common/eal_common_nonpci_devs.c | 34 +------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/lib/librte_eal/common/eal_common_nonpci_devs.c b/lib/librte_eal/common/eal_common_nonpci_devs.c index c65621e..78bedf3 100644 --- a/lib/librte_eal/common/eal_common_nonpci_devs.c +++ b/lib/librte_eal/common/eal_common_nonpci_devs.c @@ -44,19 +44,6 @@ #include #include "eal_private.h" -struct device_init { - const char *dev_prefix; - int (*init_fn)(const char*, const char *); -}; - -#define NUM_DEV_TYPES (sizeof(dev_types)/sizeof(dev_types[0])) -struct device_init dev_types[] = { - { - .dev_prefix = "-nodev-", - .init_fn = NULL - } -}; - TAILQ_HEAD(pmd_nonpci_list, pmd_nonpci_entry); /* Definition for shared object drivers. */ @@ -96,31 +83,12 @@ rte_eal_non_pci_ethdev_init(void) { struct rte_devargs *devargs; struct pmd_nonpci_entry *entry; - uint8_t i; - int found = 0; + int found; - /* call the init function for each virtual device */ TAILQ_FOREACH(devargs, &devargs_list, next) { - if (devargs->type != RTE_DEVTYPE_VIRTUAL) continue; found = 0; - - for (i = 0; i < NUM_DEV_TYPES; i++) { - /* search a driver prefix in virtual device name */ - if (!strncmp(dev_types[i].dev_prefix, - devargs->virtual.drv_name, - sizeof(dev_types[i].dev_prefix) - 1)) { - dev_types[i].init_fn(devargs->virtual.drv_name, - devargs->args); - found = 1; - break; - } - } - - if (found) - continue; - TAILQ_FOREACH(entry, &pmd_nonpci_init_list, next) { if (!entry->name) continue; -- 1.8.3.1