drivers: fix return of unsupported features on QAT GEN4

Fix return code when asymmetric crypto
or compression service is selected on GEN4 devices.

Fixes: 8f393c4ffd ("common/qat: support GEN4 devices")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
This commit is contained in:
Arek Kusztal 2021-07-28 17:18:30 +01:00 committed by Akhil Goyal
parent dcf384b4ff
commit 3f6c8e77dd
2 changed files with 2 additions and 2 deletions

View File

@ -713,7 +713,7 @@ qat_comp_dev_create(struct qat_pci_device *qat_pci_dev,
if (qat_pci_dev->qat_dev_gen == QAT_GEN4) {
QAT_LOG(ERR, "Compression PMD not supported on QAT 4xxx");
return 0;
return -EFAULT;
}
snprintf(name, RTE_COMPRESSDEV_NAME_MAX_LEN, "%s_%s",
qat_pci_dev->name, "comp");

View File

@ -253,7 +253,7 @@ qat_asym_dev_create(struct qat_pci_device *qat_pci_dev,
if (qat_pci_dev->qat_dev_gen == QAT_GEN4) {
QAT_LOG(ERR, "Asymmetric crypto PMD not supported on QAT 4xxx");
return 0;
return -EFAULT;
}
snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
qat_pci_dev->name, "asym");