DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] drivers/qat: fix lacking memzone lookup in compression pmd
@ 2020-07-08  9:44 Arek Kusztal
  2020-07-13 12:31 ` Dybkowski, AdamX
  0 siblings, 1 reply; 4+ messages in thread
From: Arek Kusztal @ 2020-07-08  9:44 UTC (permalink / raw)
  To: dev; +Cc: akhil.goyal, fiona.trahe, Arek Kusztal

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


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

end of thread, other threads:[~2020-07-15 19:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-08  9:44 [dpdk-dev] [PATCH] drivers/qat: fix lacking memzone lookup in compression pmd Arek Kusztal
2020-07-13 12:31 ` Dybkowski, AdamX
2020-07-15  1:53   ` Jiang, YuX
2020-07-15 19:48     ` 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).