[dpdk-dev] [PATCH v7 16/28] pcap: copy device info to eth_dev data
Bernard Iremonger
bernard.iremonger at intel.com
Fri Oct 30 16:08:41 CET 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>
Acked-by: Bruce Richardson <bruce.richardson at intel.com>
---
drivers/net/pcap/rte_eth_pcap.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c
index f2e4634..850274c 100644
--- a/drivers/net/pcap/rte_eth_pcap.c
+++ b/drivers/net/pcap/rte_eth_pcap.c
@@ -1,7 +1,7 @@
/*-
* BSD LICENSE
*
- * Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
+ * Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
* Copyright(c) 2014 6WIND S.A.
* All rights reserved.
*
@@ -845,8 +845,8 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues,
/* now put it all together
* - store queue data in internals,
- * - store numa_node info in pci_driver
- * - point eth_dev_data to internals and pci_driver
+ * - store numa_node info in eth_dev
+ * - point eth_dev_data to internals
* - and point eth_dev structure to new eth_dev_data structure
*/
/* NOTE: we'll replace the data element, of originally allocated eth_dev
@@ -874,8 +874,11 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues,
(*eth_dev)->data = data;
(*eth_dev)->dev_ops = &ops;
- (*eth_dev)->pci_dev = pci_dev;
- (*eth_dev)->driver = &rte_pcap_pmd;
+ (*eth_dev)->data->dev_flags = RTE_ETH_DEV_DETACHABLE;
+ (*eth_dev)->driver = NULL;
+ (*eth_dev)->data->kdrv = RTE_KDRV_NONE;
+ (*eth_dev)->data->drv_name = drivername;
+ (*eth_dev)->data->numa_node = numa_node;
return 0;
--
1.9.1
More information about the dev
mailing list