DPDK patches and discussions
 help / color / mirror / Atom feed
From: Fiona Trahe <fiona.trahe@intel.com>
To: dev@dpdk.org
Cc: akhil.goyal@nxp.com, stable@dpdk.org, tomaszx.jozwiak@intel.com,
	Fiona Trahe <fiona.trahe@intel.com>
Subject: [dpdk-dev] [PATCH v2] drivers/qat: fix failure to create PMD
Date: Mon,  1 Oct 2018 22:11:25 +0100	[thread overview]
Message-ID: <1538428285-14899-1-git-send-email-fiona.trahe@intel.com> (raw)
In-Reply-To: <1538408212-31349-1-git-send-email-fiona.trahe@intel.com>

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 <fiona.trahe@intel.com>
---
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

  reply	other threads:[~2018-10-01 21:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-01 15:36 [dpdk-dev] [PATCH] " Fiona Trahe
2018-10-01 21:11 ` Fiona Trahe [this message]
2018-10-11 17:14   ` [dpdk-dev] [PATCH v3] " Fiona Trahe
2018-10-11 17:27     ` Cel, TomaszX
2018-10-16 14:37       ` Akhil Goyal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1538428285-14899-1-git-send-email-fiona.trahe@intel.com \
    --to=fiona.trahe@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=stable@dpdk.org \
    --cc=tomaszx.jozwiak@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).