diff mbox

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

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

Commit Message

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

Patch

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 2dd9fdc..bd81d4e 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -408,6 +408,9 @@  eth_i40e_dev_init(struct rte_eth_dev *dev)
 		return 0;
 	}
 	pci_dev = dev->pci_dev;
+
+	rte_eth_copy_dev_info(dev, pci_dev);
+
 	pf->adapter = I40E_DEV_PRIVATE_TO_ADAPTER(dev->data->dev_private);
 	pf->adapter->eth_dev = dev;
 	pf->dev_data = dev->data;
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index b694400..ab718fb 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1187,6 +1187,8 @@  i40evf_dev_init(struct rte_eth_dev *eth_dev)
 		return 0;
 	}
 
+	rte_eth_copy_dev_info(eth_dev, eth_dev->pci_dev);
+
 	hw->vendor_id = eth_dev->pci_dev->id.vendor_id;
 	hw->device_id = eth_dev->pci_dev->id.device_id;
 	hw->subsystem_vendor_id = eth_dev->pci_dev->id.subsystem_vendor_id;