Skip to contentSkip to conversation

qat: fix for VFs not getting recognized

PATCH Superseded Jain, Deepak K 2 participants 4 messages Jun 20, 2016 – Jun 21, 2016 1 message not in the archive Crypto API

lore
Share & tools
lore
#1 lore raw

PATCH v2 1/1 qat: fix for VFs not getting recognized

In reply to a message not in the archive

Updated the code to use RTE_PCI_DEVICE.

Fixes 701c8d80c820 ("pci: support class id probing")
---
 drivers/crypto/qat/rte_qat_cryptodev.c          | 10 +++-------
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 10 ++++++++++
 2 files changed, 13 insertions(+), 7 deletions(-)
drivers/crypto/qat/rte_qat_cryptodev.c +3 -7
index a7912f5..31d3c0c 100644
@@ -68,13 +68,9 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
  */
 
 static struct rte_pci_id pci_id_qat_map[] = {
-		{
-			.vendor_id = 0x8086,
-			.device_id = 0x0443,
-			.subsystem_vendor_id = PCI_ANY_ID,
-			.subsystem_device_id = PCI_ANY_ID
-		},
-		{.device_id = 0},
+#define RTE_PCI_DEV_ID_DECL_QATVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
+#include "rte_pci_dev_ids.h"
+{.device_id = 0},
 };
 
 static int
lib/librte_eal/common/include/rte_pci_dev_ids.h +10 -0
index cf7b548..a4fc430 100644
@@ -152,6 +152,10 @@
 #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev)
 #endif
 
+#ifndef RTE_PCI_DEV_ID_DECL_QATVF
+#define RTE_PCI_DEV_ID_DECL_QATVF(vend, dev)
+#endif
+
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
@@ -615,6 +619,12 @@ RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_A0_VF)
 RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_VF)
 RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_VF_HV)
 
+/****************** Intel QuickAssist(QAT) Device ******************/
+
+#define QAT_DEV_ID_895XCC_VF            0x0443
+
+RTE_PCI_DEV_ID_DECL_QATVF(PCI_VENDOR_ID_INTEL, QAT_DEV_ID_895XCC_VF)
+
 /****************** Virtio devices from virtio.h ******************/
 
 #define QUMRANET_DEV_ID_VIRTIO                  0x1000
Signature · 1 line
2.5.5
#2 lore raw

2016-06-20 17:10, Jain, Deepak K:

Quoted 8 lines

Updated the code to use RTE_PCI_DEVICE.

Fixes 701c8d80c820 ("pci: support class id probing")
---
 drivers/crypto/qat/rte_qat_cryptodev.c          | 10 +++-------
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 10 ++++++++++

Please keep the PCI ids in the driver.

#3 lore raw

PATCH v3 1/1 qat: fix for VFs not getting recognized

In reply to a message not in the archive

From: "Jain, Deepak K" <[email protected]>

Updated the code to use RTE_PCI_DEVICE.

Fixes 701c8d80c820 ("pci: support class id probing")

---
v3: kept PCI id in the driver file

v2: updated code to use RTE_PCI_DEVICE

 drivers/crypto/qat/rte_qat_cryptodev.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/crypto/qat/rte_qat_cryptodev.c +1 -4
index a7912f5..f46ec85 100644
@@ -69,10 +69,7 @@ static struct rte_cryptodev_ops crypto_qat_ops = {
 
 static struct rte_pci_id pci_id_qat_map[] = {
 		{
-			.vendor_id = 0x8086,
-			.device_id = 0x0443,
-			.subsystem_vendor_id = PCI_ANY_ID,
-			.subsystem_device_id = PCI_ANY_ID
+			RTE_PCI_DEVICE(0x8086, 0x0443),
 		},
 		{.device_id = 0},
 };
Signature · 1 line
2.5.5