From: Arek Kusztal Date: Wed, 8 Jul 2020 09:44:01 +0000 (+0200) Subject: compress/qat: fix lacking memzone lookup X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=dde9cc6f6c63da04407328f24bc7721910504592;p=dpdk.git compress/qat: fix lacking memzone lookup Because capability memzone of compression does not have lookup call, second and subsequent devices cannot be created. Fixes: 7788dceccb80 ("common/qat: add multi-process handling of capabilities") Signed-off-by: Arek Kusztal Acked-by: Adam Dybkowski Tested-by: Yu Jiang --- diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c index ecf972ae0f..034abad583 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",