[dpdk-stable] patch 'common/qat: fix failure to create PMD' has been queued to stable release 18.08.1

Kevin Traynor ktraynor at redhat.com
Thu Nov 22 17:48:58 CET 2018


Hi,

FYI, your patch has been queued to stable release 18.08.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/28/18. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the patch applied
to the branch. If the code is different (ie: not only metadata diffs), due for example to
a change in context or macro names, please double check it.

Thanks.

Kevin Traynor

---
>From 50d52c93de1f173373ce45a946dfcb1fdf0954dd Mon Sep 17 00:00:00 2001
From: Fiona Trahe <fiona.trahe at intel.com>
Date: Thu, 11 Oct 2018 18:14:05 +0100
Subject: [PATCH] common/qat: fix failure to create PMD

[ upstream commit 8451f04d0239002c29901e88c278cd83e06f46b1 ]

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.

Fixes: c0c90bc4cade ("compress/qat: add create and destroy functions")

Signed-off-by: Fiona Trahe <fiona.trahe at intel.com>
Acked-by: Tomasz Cel <tomaszx.cel at intel.com>
---
 drivers/common/qat/qat_device.c | 33 ++++++++++++++++++++++-----------
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c
index f32d72358..f65c2ab28 100644
--- a/drivers/common/qat/qat_device.c
+++ b/drivers/common/qat/qat_device.c
@@ -188,4 +188,5 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 {
 	int ret = 0;
+	int num_pmds_created = 0;
 	struct qat_pci_device *qat_pci_dev;
 
@@ -200,21 +201,31 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 
 	ret = qat_sym_dev_create(qat_pci_dev);
-	if (ret != 0)
-		goto error_out;
+	if (ret == 0)
+		num_pmds_created++;
+	else
+		QAT_LOG(WARNING,
+				"Failed to create QAT SYM PMD on device %s",
+				qat_pci_dev->name);
 
 	ret = qat_comp_dev_create(qat_pci_dev);
-	if (ret != 0)
-		goto error_out;
+	if (ret == 0)
+		num_pmds_created++;
+	else
+		QAT_LOG(WARNING,
+				"Failed to create QAT COMP PMD on device %s",
+				qat_pci_dev->name);
 
 	ret = qat_asym_dev_create(qat_pci_dev);
-	if (ret != 0)
-		goto error_out;
+	if (ret == 0)
+		num_pmds_created++;
+	else
+		QAT_LOG(WARNING,
+				"Failed to create QAT ASYM PMD on device %s",
+				qat_pci_dev->name);
+
+	if (num_pmds_created == 0)
+		qat_pci_dev_destroy(qat_pci_dev, pci_dev);
 
 	return 0;
-
-error_out:
-	qat_pci_dev_destroy(qat_pci_dev, pci_dev);
-	return ret;
-
 }
 
-- 
2.19.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2018-11-22 16:47:32.436622364 +0000
+++ 0006-common-qat-fix-failure-to-create-PMD.patch	2018-11-22 16:47:32.000000000 +0000
@@ -1,14 +1,15 @@
-From 8451f04d0239002c29901e88c278cd83e06f46b1 Mon Sep 17 00:00:00 2001
+From 50d52c93de1f173373ce45a946dfcb1fdf0954dd Mon Sep 17 00:00:00 2001
 From: Fiona Trahe <fiona.trahe at intel.com>
 Date: Thu, 11 Oct 2018 18:14:05 +0100
 Subject: [PATCH] common/qat: fix failure to create PMD
 
+[ upstream commit 8451f04d0239002c29901e88c278cd83e06f46b1 ]
+
 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.
 
 Fixes: c0c90bc4cade ("compress/qat: add create and destroy functions")
-Cc: stable at dpdk.org
 
 Signed-off-by: Fiona Trahe <fiona.trahe at intel.com>
 Acked-by: Tomasz Cel <tomaszx.cel at intel.com>
@@ -17,16 +18,16 @@
  1 file changed, 22 insertions(+), 11 deletions(-)
 
 diff --git a/drivers/common/qat/qat_device.c b/drivers/common/qat/qat_device.c
-index b158fb9ca..8d4df92ac 100644
+index f32d72358..f65c2ab28 100644
 --- a/drivers/common/qat/qat_device.c
 +++ b/drivers/common/qat/qat_device.c
-@@ -197,4 +197,5 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -188,4 +188,5 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
  {
  	int ret = 0;
 +	int num_pmds_created = 0;
  	struct qat_pci_device *qat_pci_dev;
  
-@@ -209,21 +210,31 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
+@@ -200,21 +201,31 @@ static int qat_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
  
  	ret = qat_sym_dev_create(qat_pci_dev);
 -	if (ret != 0)


More information about the stable mailing list