[dpdk-dev,v6,18/28] xenvirt: copy device info to eth_dev data

Message ID 1446143795-31841-19-git-send-email-bernard.iremonger@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Iremonger, Bernard Oct. 29, 2015, 6:36 p.m. UTC
  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(-)
  

Patch

diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c
index 73e8bce..1895b16 100644
--- a/drivers/net/xenvirt/rte_eth_xenvirt.c
+++ b/drivers/net/xenvirt/rte_eth_xenvirt.c
@@ -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;