[dpdk-dev] [PATCH v2 1/8] net/qede: fix to get vendor/device id info

Rasesh Mody Rasesh.Mody at cavium.com
Fri Dec 23 01:49:57 CET 2016


The vendor_id and device_id are used to determine device type. If you
don't have them, then check for determining device type fails and is
always set to default device type.

Fixes: ec94dbc57362 ("qede: add base driver")

Signed-off-by: Rasesh Mody <Rasesh.Mody at cavium.com>
---
 drivers/net/qede/qede_ethdev.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/qede/qede_ethdev.c b/drivers/net/qede/qede_ethdev.c
index 2c600c1..4943358 100644
--- a/drivers/net/qede/qede_ethdev.c
+++ b/drivers/net/qede/qede_ethdev.c
@@ -1422,6 +1422,10 @@ static int qede_common_dev_init(struct rte_eth_dev *eth_dev, bool is_vf)
 
 	rte_eth_copy_pci_info(eth_dev, pci_dev);
 
+	/* @DPDK */
+	edev->vendor_id = pci_dev->id.vendor_id;
+	edev->device_id = pci_dev->id.device_id;
+
 	qed_ops = qed_get_eth_ops();
 	if (!qed_ops) {
 		DP_ERR(edev, "Failed to get qed_eth_ops_pass\n");
-- 
1.7.10.3



More information about the dev mailing list