[dpdk-dev,v5,14/28] null: copy device info to eth_dev data

Message ID 1445621793-3630-15-git-send-email-bernard.iremonger@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Iremonger, Bernard Oct. 23, 2015, 5:36 p.m. UTC
  initialise dev_flags, driver, drv_name, kdrv and numa_node fields in eth_dev data

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/null/rte_eth_null.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)
  

Patch

diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c
index e244595..2ca27ba 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -340,13 +340,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)
 {
@@ -443,8 +436,11 @@  eth_dev_null_create(const char *name,
 
 	eth_dev->data = data;
 	eth_dev->dev_ops = &ops;
-	eth_dev->pci_dev = pci_dev;
-	eth_dev->driver = &rte_null_pmd;
+	eth_dev->driver = NULL;
+	eth_dev->data->dev_flags = RTE_ETH_DEV_DETACHABLE;
+	eth_dev->data->kdrv = RTE_KDRV_NONE;
+	eth_dev->data->drv_name = NULL;
+	eth_dev->data->numa_node = numa_node;
 
 	/* finally assign rx and tx ops */
 	if (packet_copy) {