From: Arek Kusztal Date: Wed, 28 Jul 2021 16:18:30 +0000 (+0100) Subject: drivers: fix return of unsupported features on QAT GEN4 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3f6c8e77dd792d580712794658e1f2065290c8d0;p=dpdk.git drivers: fix return of unsupported features on QAT GEN4 Fix return code when asymmetric crypto or compression service is selected on GEN4 devices. Fixes: 8f393c4ffdc1 ("common/qat: support GEN4 devices") Signed-off-by: Arek Kusztal Acked-by: Fan Zhang --- diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c index cfdcb6b3d1..caac7839e9 100644 --- a/drivers/compress/qat/qat_comp_pmd.c +++ b/drivers/compress/qat/qat_comp_pmd.c @@ -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"); diff --git a/drivers/crypto/qat/qat_asym_pmd.c b/drivers/crypto/qat/qat_asym_pmd.c index 56ccca36d1..d844dd85bf 100644 --- a/drivers/crypto/qat/qat_asym_pmd.c +++ b/drivers/crypto/qat/qat_asym_pmd.c @@ -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");