DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] drivers/qat: fix failure to create PMD
@ 2018-10-01 15:36 Fiona Trahe
  2018-10-01 21:11 ` [dpdk-dev] [PATCH v2] " Fiona Trahe
  0 siblings, 1 reply; 5+ messages in thread
From: Fiona Trahe @ 2018-10-01 15:36 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, stable, tomaszx.jozwiak, Fiona Trahe

If QAT crypto pmd failed to be created due to reaching max allowed
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.

Fixes: c0c90bc4cade ("compress/qat: add create and destroy functions")
Cc: stable@dpdk.org

Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
---
 drivers/compress/qat/qat_comp_pmd.c | 6 ++++--
 drivers/crypto/qat/qat_sym_pmd.c    | 6 ++++--
 2 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
index 63af23a..6510cca 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 c3f7004..82fde16 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-10-16 14:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-01 15:36 [dpdk-dev] [PATCH] drivers/qat: fix failure to create PMD Fiona Trahe
2018-10-01 21:11 ` [dpdk-dev] [PATCH v2] " Fiona Trahe
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

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).