diff mbox

[dpdk-dev,12/20] e1000: copy pci device info to eth_dev data

Message ID 1443445418-18498-13-git-send-email-bernard.iremonger@intel.com (mailing list archive)
State Superseded, archived
Headers show

Commit Message

Bernard Iremonger Sept. 28, 2015, 1:03 p.m. UTC
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/e1000/em_ethdev.c  | 3 +++
 drivers/net/e1000/igb_ethdev.c | 5 +++++
 2 files changed, 8 insertions(+)
diff mbox

Patch

diff --git a/drivers/net/e1000/em_ethdev.c b/drivers/net/e1000/em_ethdev.c
index 912f5dd..aa1bf48 100644
--- a/drivers/net/e1000/em_ethdev.c
+++ b/drivers/net/e1000/em_ethdev.c
@@ -232,6 +232,9 @@  eth_em_dev_init(struct rte_eth_dev *eth_dev)
 		E1000_DEV_PRIVATE_TO_VFTA(eth_dev->data->dev_private);
 
 	pci_dev = eth_dev->pci_dev;
+
+	rte_eth_copy_dev_info(eth_dev, pci_dev);
+
 	eth_dev->dev_ops = &eth_em_ops;
 	eth_dev->rx_pkt_burst = (eth_rx_burst_t)&eth_em_recv_pkts;
 	eth_dev->tx_pkt_burst = (eth_tx_burst_t)&eth_em_xmit_pkts;
diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index 848ef6e..2a7aa31 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -531,6 +531,9 @@  eth_igb_dev_init(struct rte_eth_dev *eth_dev)
 	uint32_t ctrl_ext;
 
 	pci_dev = eth_dev->pci_dev;
+
+	rte_eth_copy_dev_info(eth_dev, pci_dev);
+
 	eth_dev->dev_ops = &eth_igb_ops;
 	eth_dev->rx_pkt_burst = &eth_igb_recv_pkts;
 	eth_dev->tx_pkt_burst = &eth_igb_xmit_pkts;
@@ -739,6 +742,8 @@  eth_igbvf_dev_init(struct rte_eth_dev *eth_dev)
 
 	pci_dev = eth_dev->pci_dev;
 
+	rte_eth_copy_dev_info(eth_dev, pci_dev);
+
 	hw->device_id = pci_dev->id.device_id;
 	hw->vendor_id = pci_dev->id.vendor_id;
 	hw->hw_addr = (void *)pci_dev->mem_resource[0].addr;