[dpdk-dev,v5,08/28] bnx2x: copy pci device info to eth_dev data

Message ID 1445621793-3630-9-git-send-email-bernard.iremonger@intel.com (mailing list archive)
State Superseded, archived
Headers

Commit Message

Iremonger, Bernard Oct. 23, 2015, 5:36 p.m. UTC
  Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
---
 drivers/net/bnx2x/bnx2x_ethdev.c | 3 +++
 1 file changed, 3 insertions(+)
  

Comments

Harish Patil Oct. 23, 2015, 10:37 p.m. UTC | #1
>

>Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>

>---

> drivers/net/bnx2x/bnx2x_ethdev.c | 3 +++

> 1 file changed, 3 insertions(+)

>

>diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c

>b/drivers/net/bnx2x/bnx2x_ethdev.c

>index 09b5920..fbcd5f4 100644

>--- a/drivers/net/bnx2x/bnx2x_ethdev.c

>+++ b/drivers/net/bnx2x/bnx2x_ethdev.c

>@@ -419,6 +419,9 @@ bnx2x_common_dev_init(struct rte_eth_dev *eth_dev,

>int is_vf)

>

>       eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops;

>       pci_dev = eth_dev->pci_dev;

>+

>+      rte_eth_copy_dev_info(eth_dev, pci_dev);

>+

>       sc = eth_dev->data->dev_private;

>       sc->pcie_bus    = pci_dev->addr.bus;

>       sc->pcie_device = pci_dev->addr.devid;

>--

>1.9.1

>

>


Acked-by: Harish Patil <harish.patil@qlogic.com>



Thanks,
Harish


________________________________

This message and any attached documents contain information from the sending company or its parent company(s), subsidiaries, divisions or branch offices that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
  

Patch

diff --git a/drivers/net/bnx2x/bnx2x_ethdev.c b/drivers/net/bnx2x/bnx2x_ethdev.c
index 09b5920..fbcd5f4 100644
--- a/drivers/net/bnx2x/bnx2x_ethdev.c
+++ b/drivers/net/bnx2x/bnx2x_ethdev.c
@@ -419,6 +419,9 @@  bnx2x_common_dev_init(struct rte_eth_dev *eth_dev, int is_vf)
 
 	eth_dev->dev_ops = is_vf ? &bnx2xvf_eth_dev_ops : &bnx2x_eth_dev_ops;
 	pci_dev = eth_dev->pci_dev;
+
+	rte_eth_copy_dev_info(eth_dev, pci_dev);
+
 	sc = eth_dev->data->dev_private;
 	sc->pcie_bus    = pci_dev->addr.bus;
 	sc->pcie_device = pci_dev->addr.devid;