[dpdk-dev,v7,14/28] null: copy device info to eth_dev data
Commit Message
initialise dev_flags, driver, drv_name, kdrv and numa_node fields in eth_dev data
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/null/rte_eth_null.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
@@ -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 = drivername;
+ eth_dev->data->numa_node = numa_node;
/* finally assign rx and tx ops */
if (packet_copy) {