From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 5B6924C90; Mon, 1 Oct 2018 23:11:31 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Oct 2018 14:11:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,328,1534834800"; d="scan'208";a="268564446" Received: from sivswdev01.ir.intel.com (HELO localhost.localdomain) ([10.237.217.45]) by fmsmga006.fm.intel.com with ESMTP; 01 Oct 2018 14:11:29 -0700 From: Fiona Trahe To: dev@dpdk.org Cc: akhil.goyal@nxp.com, stable@dpdk.org, tomaszx.jozwiak@intel.com, Fiona Trahe Date: Mon, 1 Oct 2018 22:11:25 +0100 Message-Id: <1538428285-14899-1-git-send-email-fiona.trahe@intel.com> X-Mailer: git-send-email 1.7.0.7 In-Reply-To: <1538408212-31349-1-git-send-email-fiona.trahe@intel.com> References: <1538408212-31349-1-git-send-email-fiona.trahe@intel.com> Subject: [dpdk-dev] [PATCH v2] drivers/qat: fix failure to create PMD X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2018 21:11:32 -0000 If QAT crypto pmd failed to be created due to reaching MAX cryptodevs it prevented QAT comp PMD being created. And vice versa. Change to warning in these cases and allow the other PMD to be created. Clarify in documentation. Fixes: c0c90bc4cade ("compress/qat: add create and destroy functions") Cc: stable@dpdk.org Signed-off-by: Fiona Trahe --- v2 changes: - clarified documentation doc/guides/cryptodevs/qat.rst | 6 +++--- drivers/compress/qat/qat_comp_pmd.c | 6 ++++-- drivers/crypto/qat/qat_sym_pmd.c | 6 ++++-- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/doc/guides/cryptodevs/qat.rst b/doc/guides/cryptodevs/qat.rst index b09624f..5793e36 100644 --- a/doc/guides/cryptodevs/qat.rst +++ b/doc/guides/cryptodevs/qat.rst @@ -166,9 +166,9 @@ options and is built by default. The number of VFs per PF varies - see table below. If multiple QAT packages are installed on a platform then CONFIG_RTE_PMD_QAT_MAX_PCI_DEVICES should be adjusted to the number of VFs which the QAT common code will need to handle. -Note, there is a separate config item for max cryptodevs CONFIG_RTE_CRYPTO_MAX_DEVS, -if necessary this should be adjusted to handle the total of QAT and other devices -which the process will use. +Note, there are separate config items for max cryptodevs CONFIG_RTE_CRYPTO_MAX_DEVS +and max compressdevs CONFIG_RTE_COMPRESS_MAX_DEVS, if necessary these should +be adjusted to handle the total of QAT and other devices which the process will use. QAT allocates internal structures to handle SGLs. For the compression service CONFIG_RTE_PMD_QAT_COMP_SGL_MAX_SEGMENTS can be changed if more segments are needed. diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c index e34c07b..1b29540 100644 --- a/drivers/compress/qat/qat_comp_pmd.c +++ b/drivers/compress/qat/qat_comp_pmd.c @@ -389,8 +389,10 @@ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev) sizeof(struct qat_comp_dev_private), &init_params); - if (compressdev == NULL) - return -ENODEV; + if (compressdev == NULL) { + QAT_LOG(WARNING, "Failed to create QAT COMP device %s", name); + return 0; + } compressdev->dev_ops = &compress_qat_ops; diff --git a/drivers/crypto/qat/qat_sym_pmd.c b/drivers/crypto/qat/qat_sym_pmd.c index 96f442e..fb93030 100644 --- a/drivers/crypto/qat/qat_sym_pmd.c +++ b/drivers/crypto/qat/qat_sym_pmd.c @@ -261,8 +261,10 @@ qat_sym_dev_create(struct qat_pci_device *qat_pci_dev) cryptodev = rte_cryptodev_pmd_create(name, &(qat_pci_dev->sym_rte_dev), &init_params); - if (cryptodev == NULL) - return -ENODEV; + if (cryptodev == NULL) { + QAT_LOG(WARNING, "Failed to create QAT SYM device %s", name); + return 0; + } qat_pci_dev->sym_rte_dev.name = cryptodev->data->name; cryptodev->driver_id = cryptodev_qat_driver_id; -- 2.7.4