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 <arkadiuszx.kusztal@intel.com>
Acked-by: Adam Dybkowski <adamx.dybkowski@intel.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>
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",