From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id B52FCAA3B for ; Mon, 20 Jun 2016 18:10:34 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga101.jf.intel.com with ESMTP; 20 Jun 2016 09:10:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,499,1459839600"; d="scan'208";a="979746238" Received: from sie-lab-214-241.ir.intel.com (HELO silpixa00382162.ir.intel.com) ([10.237.214.241]) by orsmga001.jf.intel.com with ESMTP; 20 Jun 2016 09:10:13 -0700 From: "Jain, Deepak K" To: dev@dpdk.org Cc: pablo.de.lara.guarch@intel.com, jerin.jacob@caviumnetworks.com, "Jain, Deepak K" Date: Mon, 20 Jun 2016 17:10:11 +0100 Message-Id: <1466439011-88009-1-git-send-email-deepak.k.jain@intel.com> X-Mailer: git-send-email 2.5.5 In-Reply-To: <1466087775-235077-1-git-send-email-deepak.k.jain@intel.com> References: <1466087775-235077-1-git-send-email-deepak.k.jain@intel.com> Subject: [dpdk-dev] [PATCH v2] qat: fix for VFs not getting recognized X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Jun 2016 16:10:35 -0000 Updated the code to use RTE_PCI_DEVICE. Fixes: 701c8d80c820 ("pci: support class id probing") Signed-off-by: Jain, Deepak K --- 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(-) diff --git a/drivers/crypto/qat/rte_qat_cryptodev.c b/drivers/crypto/qat/rte_qat_cryptodev.c index a7912f5..31d3c0c 100644 --- a/drivers/crypto/qat/rte_qat_cryptodev.c +++ b/drivers/crypto/qat/rte_qat_cryptodev.c @@ -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 diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h index cf7b548..a4fc430 100644 --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h @@ -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 -- 2.5.5