diff mbox series

[2/2] crypto/qat: fix asymmetric crypto pmd create on gen3

Message ID 20210728161831.6807-3-arkadiuszx.kusztal@intel.com (mailing list archive)
State Accepted, archived
Delegated to: akhil goyal
Headers show
Series drivers/qat: fix handling of unsupported services | expand

Checks

Context Check Description
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/intel-Testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot success github build: passed
ci/checkpatch success coding style OK

Commit Message

Kusztal, ArkadiuszX July 28, 2021, 4:18 p.m. UTC
This patch disables asymmetric crypto pmd on gen3 devices.

Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
---
 drivers/crypto/qat/qat_asym_pmd.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Zhang, Roy Fan July 29, 2021, 8:57 a.m. UTC | #1
> -----Original Message-----
> From: Kusztal, ArkadiuszX <arkadiuszx.kusztal@intel.com>
> Sent: Wednesday, July 28, 2021 5:19 PM
> To: dev@dpdk.org
> Cc: gakhil@marvell.com; Trahe, Fiona <fiona.trahe@intel.com>; Zhang, Roy
> Fan <roy.fan.zhang@intel.com>; Kusztal, ArkadiuszX
> <arkadiuszx.kusztal@intel.com>
> Subject: [PATCH 2/2] crypto/qat: fix asymmetric crypto pmd create on gen3
> 
> This patch disables asymmetric crypto pmd on gen3 devices.
> 
> Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")
> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
>  drivers/crypto/qat/qat_asym_pmd.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/crypto/qat/qat_asym_pmd.c
> b/drivers/crypto/qat/qat_asym_pmd.c
> index d4680c3847..4891766471 100644
> --- a/drivers/crypto/qat/qat_asym_pmd.c
> +++ b/drivers/crypto/qat/qat_asym_pmd.c
> @@ -255,6 +255,10 @@ qat_asym_dev_create(struct qat_pci_device
> *qat_pci_dev,
>  		QAT_LOG(ERR, "Asymmetric crypto PMD not supported on
> QAT 4xxx");
>  		return -(EFAULT);
>  	}
> +	if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
> +		QAT_LOG(ERR, "Asymmetric crypto PMD not supported on
> QAT c4xxx");
> +		return -(EFAULT);
> +	}
>  	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
>  			qat_pci_dev->name, "asym");
>  	QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name);
> --
> 2.30.2

Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Akhil Goyal July 30, 2021, 7:19 p.m. UTC | #2
> This patch disables asymmetric crypto pmd on gen3 devices.
> 
> Fixes: 1f5e4053f9b4 ("common/qat: support GEN3 devices")

Cc: stable@dpdk.org

> 
> Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
> ---
>  drivers/crypto/qat/qat_asym_pmd.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/crypto/qat/qat_asym_pmd.c
> b/drivers/crypto/qat/qat_asym_pmd.c
> index d4680c3847..4891766471 100644
> --- a/drivers/crypto/qat/qat_asym_pmd.c
> +++ b/drivers/crypto/qat/qat_asym_pmd.c
> @@ -255,6 +255,10 @@ qat_asym_dev_create(struct qat_pci_device
> *qat_pci_dev,
>  		QAT_LOG(ERR, "Asymmetric crypto PMD not supported on
> QAT 4xxx");
>  		return -(EFAULT);
>  	}
> +	if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
> +		QAT_LOG(ERR, "Asymmetric crypto PMD not supported on
> QAT c4xxx");
> +		return -(EFAULT);
> +	}
>  	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
>  			qat_pci_dev->name, "asym");
>  	QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name);
> --
> 2.30.2
Applied to dpdk-next-crypto
diff mbox series

Patch

diff --git a/drivers/crypto/qat/qat_asym_pmd.c b/drivers/crypto/qat/qat_asym_pmd.c
index d4680c3847..4891766471 100644
--- a/drivers/crypto/qat/qat_asym_pmd.c
+++ b/drivers/crypto/qat/qat_asym_pmd.c
@@ -255,6 +255,10 @@  qat_asym_dev_create(struct qat_pci_device *qat_pci_dev,
 		QAT_LOG(ERR, "Asymmetric crypto PMD not supported on QAT 4xxx");
 		return -(EFAULT);
 	}
+	if (qat_pci_dev->qat_dev_gen == QAT_GEN3) {
+		QAT_LOG(ERR, "Asymmetric crypto PMD not supported on QAT c4xxx");
+		return -(EFAULT);
+	}
 	snprintf(name, RTE_CRYPTODEV_NAME_MAX_LEN, "%s_%s",
 			qat_pci_dev->name, "asym");
 	QAT_LOG(DEBUG, "Creating QAT ASYM device %s\n", name);