[dpdk-dev,v7,18/28] xenvirt: copy device info to eth_dev data
Commit Message
Initialise dev_flags, driver, kdrv, drv_name and numa_node in eth_dev data.
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/xenvirt/rte_eth_xenvirt.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
@@ -67,7 +67,7 @@
/* virtio_idx is increased after new device is created.*/
static int virtio_idx = 0;
-static const char *drivername = "xen dummy virtio PMD";
+static const char *drivername = "xen virtio PMD";
static struct rte_eth_link pmd_link = {
.link_speed = 10000,
@@ -668,7 +668,11 @@ eth_dev_xenvirt_create(const char *name, const char *params,
eth_dev->data = data;
eth_dev->dev_ops = &ops;
- eth_dev->pci_dev = pci_dev;
+ eth_dev->data->dev_flags = 0;
+ eth_dev->data->kdrv = RTE_KDRV_NONE;
+ eth_dev->data->drv_name = drivername;
+ eth_dev->driver = NULL;
+ eth_dev->data->numa_node = numa_node;
eth_dev->rx_pkt_burst = eth_xenvirt_rx;
eth_dev->tx_pkt_burst = eth_xenvirt_tx;