[dpdk-dev] [PATCH] drivers/qat: fix lacking memzone lookup in compression pmd
Arek Kusztal
arkadiuszx.kusztal at intel.com
Wed Jul 8 11:44:01 CEST 2020
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 at 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
More information about the dev
mailing list