[dpdk-dev] [PATCH v5 14/28] null: copy device info to eth_dev data
Bernard Iremonger
bernard.iremonger at intel.com
Fri Oct 23 19:36:19 CEST 2015
initialise dev_flags, driver, drv_name, kdrv and numa_node fields in eth_dev data
Signed-off-by: Bernard Iremonger <bernard.iremonger at intel.com>
---
drivers/net/null/rte_eth_null.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
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) {
--
1.9.1
More information about the dev
mailing list