From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 7ABD28F9C for ; Tue, 3 Nov 2015 14:02:27 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 03 Nov 2015 05:02:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,238,1444719600"; d="scan'208";a="810610915" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by orsmga001.jf.intel.com with ESMTP; 03 Nov 2015 05:02:15 -0800 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id tA3D2D6F011927; Tue, 3 Nov 2015 13:02:13 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id tA3D2D6B019633; Tue, 3 Nov 2015 13:02:13 GMT Received: (from bairemon@localhost) by sivswdev01.ir.intel.com with id tA3D2DER019629; Tue, 3 Nov 2015 13:02:13 GMT From: Bernard Iremonger To: dev@dpdk.org Date: Tue, 3 Nov 2015 13:01:59 +0000 Message-Id: <1446555725-19540-6-git-send-email-bernard.iremonger@intel.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1446555725-19540-1-git-send-email-bernard.iremonger@intel.com> References: <1446555725-19540-1-git-send-email-bernard.iremonger@intel.com> Subject: [dpdk-dev] [PATCH v8 05/11] null: remove pci device 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: Tue, 03 Nov 2015 13:02:27 -0000 remove rte_null_pmd and pci_dev. Signed-off-by: Bernard Iremonger Acked-by: Bruce Richardson --- drivers/net/null/rte_eth_null.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 11d6037..77fc988 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -366,13 +366,6 @@ eth_stats_reset(struct rte_eth_dev *dev) } } -static struct eth_driver rte_null_pmd = { - .pci_drv = { - .name = "rte_null_pmd", - .drv_flags = RTE_PCI_DRV_DETACHABLE, - }, -}; - static void eth_queue_release(void *q) { @@ -501,7 +494,6 @@ eth_dev_null_create(const char *name, const unsigned nb_rx_queues = 1; const unsigned nb_tx_queues = 1; struct rte_eth_dev_data *data = NULL; - struct rte_pci_device *pci_dev = NULL; struct pmd_internals *internals = NULL; struct rte_eth_dev *eth_dev = NULL; @@ -525,10 +517,6 @@ eth_dev_null_create(const char *name, if (data == NULL) goto error; - pci_dev = rte_zmalloc_socket(name, sizeof(*pci_dev), 0, numa_node); - if (pci_dev == NULL) - goto error; - internals = rte_zmalloc_socket(name, sizeof(*internals), 0, numa_node); if (internals == NULL) goto error; @@ -558,9 +546,6 @@ eth_dev_null_create(const char *name, rte_memcpy(internals->rss_key, default_rss_key, 40); - pci_dev->numa_node = numa_node; - pci_dev->driver = &rte_null_pmd.pci_drv; - data->dev_private = internals; data->port_id = eth_dev->data->port_id; data->nb_rx_queues = (uint16_t)nb_rx_queues; @@ -593,7 +578,6 @@ eth_dev_null_create(const char *name, error: rte_free(data); - rte_free(pci_dev); rte_free(internals); return -1; @@ -696,14 +680,13 @@ rte_pmd_null_devuninit(const char *name) RTE_LOG(INFO, PMD, "Closing null ethdev on numa socket %u\n", rte_socket_id()); - /* reserve an ethdev entry */ + /* find the ethdev entry */ eth_dev = rte_eth_dev_allocated(name); if (eth_dev == NULL) return -1; rte_free(eth_dev->data->dev_private); rte_free(eth_dev->data); - rte_free(eth_dev->pci_dev); rte_eth_dev_release_port(eth_dev); -- 1.9.1