From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id E9D351B488 for ; Thu, 22 Nov 2018 17:51:26 +0100 (CET) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54868307D840; Thu, 22 Nov 2018 16:51:26 +0000 (UTC) Received: from ktraynor.remote.csb (unknown [10.36.118.7]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38D3066D44; Thu, 22 Nov 2018 16:51:25 +0000 (UTC) From: Kevin Traynor To: Fiona Trahe Cc: Tomasz Cel , dpdk stable Date: Thu, 22 Nov 2018 16:48:58 +0000 Message-Id: <20181122164957.13003-6-ktraynor@redhat.com> In-Reply-To: <20181122164957.13003-1-ktraynor@redhat.com> References: <20181122164957.13003-1-ktraynor@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.48]); Thu, 22 Nov 2018 16:51:26 +0000 (UTC) Subject: [dpdk-stable] patch 'common/qat: fix failure to create PMD' has been queued to stable release 18.08.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Nov 2018 16:51:27 -0000 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 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 Acked-by: Tomasz Cel --- 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 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@dpdk.org Signed-off-by: Fiona Trahe Acked-by: Tomasz Cel @@ -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)