All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arek Kusztal <arkadiuszx.kusztal@intel.com>
To: dev@dpdk.org
Cc: akhil.goyal@nxp.com, fiona.trahe@intel.com,
	Arek Kusztal <arkadiuszx.kusztal@intel.com>
Subject: [dpdk-dev] [PATCH] drivers/qat: fix lacking memzone lookup in compression pmd
Date: Wed,  8 Jul 2020 11:44:01 +0200	[thread overview]
Message-ID: <20200708094401.16564-1-arkadiuszx.kusztal@intel.com> (raw)

Because capability memzone of compression does not have lookup
call, second and subsequent devices cannot be created.

Fixes: 0e6fff16a7a2 ("drivers: add multi process handling of capabilities in QAT")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/compress/qat/qat_comp_pmd.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c
index ecf972a..034abad 100644
--- a/drivers/compress/qat/qat_comp_pmd.c
+++ b/drivers/compress/qat/qat_comp_pmd.c
@@ -726,9 +726,12 @@ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev,
 		break;
 	}
 
-	comp_dev->capa_mz = rte_memzone_reserve(capa_memz_name,
-		capa_size,
-		rte_socket_id(), 0);
+	comp_dev->capa_mz = rte_memzone_lookup(capa_memz_name);
+	if (comp_dev->capa_mz == NULL) {
+		comp_dev->capa_mz = rte_memzone_reserve(capa_memz_name,
+			capa_size,
+			rte_socket_id(), 0);
+	}
 	if (comp_dev->capa_mz == NULL) {
 		QAT_LOG(DEBUG,
 			"Error allocating memzone for capabilities, destroying PMD for %s",
-- 
2.1.0


             reply	other threads:[~2020-07-08  9:46 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-08  9:44 Arek Kusztal [this message]
2020-07-13 12:31 ` [dpdk-dev] [PATCH] drivers/qat: fix lacking memzone lookup in compression pmd Dybkowski, AdamX
2020-07-15  1:53   ` Jiang, YuX
2020-07-15 19:48     ` 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=20200708094401.16564-1-arkadiuszx.kusztal@intel.com \
    --to=arkadiuszx.kusztal@intel.com \
    --cc=akhil.goyal@nxp.com \
    --cc=dev@dpdk.org \
    --cc=fiona.trahe@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.