* [dpdk-dev] [PATCH 0/2] drivers/qat: fix handling of unsupported services @ 2021-07-28 16:18 Arek Kusztal 2021-07-28 16:18 ` [dpdk-dev] [PATCH 1/2] drivers/qat: fix wrong return value for invalid service Arek Kusztal 2021-07-28 16:18 ` [dpdk-dev] [PATCH 2/2] crypto/qat: fix asymmetric crypto pmd create on gen3 Arek Kusztal 0 siblings, 2 replies; 8+ messages in thread From: Arek Kusztal @ 2021-07-28 16:18 UTC (permalink / raw) To: dev; +Cc: gakhil, fiona.trahe, roy.fan.zhang, Arek Kusztal This patchset fixes wrong behaviour when service not currently supported is selected for GEN3 and GEN4 devices in Intel QuickAssist Technology PMD. There is dependency between these patches hence the patchset. This patcheset superseeds following patch: drivers/qat: fix unused asymmetric crypto pmd on gen3 (https://patchwork.dpdk.org/project/dpdk/patch/20210712081633.3156-1-arkadiuszx.kusztal@intel.com/) Arek Kusztal (2): drivers/qat: fix wrong return value for invalid service crypto/qat: fix asymmetric crypto pmd create on gen3 drivers/compress/qat/qat_comp_pmd.c | 2 +- drivers/crypto/qat/qat_asym_pmd.c | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) -- 2.30.2 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH 1/2] drivers/qat: fix wrong return value for invalid service 2021-07-28 16:18 [dpdk-dev] [PATCH 0/2] drivers/qat: fix handling of unsupported services Arek Kusztal @ 2021-07-28 16:18 ` Arek Kusztal 2021-07-29 8:58 ` Zhang, Roy Fan 2021-07-30 19:18 ` [dpdk-dev] [EXT] " Akhil Goyal 2021-07-28 16:18 ` [dpdk-dev] [PATCH 2/2] crypto/qat: fix asymmetric crypto pmd create on gen3 Arek Kusztal 1 sibling, 2 replies; 8+ messages in thread From: Arek Kusztal @ 2021-07-28 16:18 UTC (permalink / raw) To: dev; +Cc: gakhil, fiona.trahe, roy.fan.zhang, Arek Kusztal Fix invalid value that is returned when asymmetric crypto or compression service is selected. Fixes: 8f393c4ffdc1 ("common/qat: support GEN4 devices") Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> --- drivers/compress/qat/qat_comp_pmd.c | 2 +- drivers/crypto/qat/qat_asym_pmd.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/compress/qat/qat_comp_pmd.c b/drivers/compress/qat/qat_comp_pmd.c index cfdcb6b3d1..92a2285b53 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..d4680c3847 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"); -- 2.30.2 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] drivers/qat: fix wrong return value for invalid service 2021-07-28 16:18 ` [dpdk-dev] [PATCH 1/2] drivers/qat: fix wrong return value for invalid service Arek Kusztal @ 2021-07-29 8:58 ` Zhang, Roy Fan 2021-07-30 19:18 ` [dpdk-dev] [EXT] " Akhil Goyal 1 sibling, 0 replies; 8+ messages in thread From: Zhang, Roy Fan @ 2021-07-29 8:58 UTC (permalink / raw) To: Kusztal, ArkadiuszX, dev; +Cc: gakhil, Trahe, Fiona > -----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 1/2] drivers/qat: fix wrong return value for invalid service > > Fix invalid value that is returned when asymmetric crypto > or compression service is selected. > > Fixes: 8f393c4ffdc1 ("common/qat: support GEN4 devices") > > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> > --- > drivers/compress/qat/qat_comp_pmd.c | 2 +- > drivers/crypto/qat/qat_asym_pmd.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/compress/qat/qat_comp_pmd.c > b/drivers/compress/qat/qat_comp_pmd.c > index cfdcb6b3d1..92a2285b53 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..d4680c3847 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"); > -- > 2.30.2 Acked-by: Fan Zhang <roy.fan.zhang@intel.com> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [EXT] [PATCH 1/2] drivers/qat: fix wrong return value for invalid service 2021-07-28 16:18 ` [dpdk-dev] [PATCH 1/2] drivers/qat: fix wrong return value for invalid service Arek Kusztal 2021-07-29 8:58 ` Zhang, Roy Fan @ 2021-07-30 19:18 ` Akhil Goyal 2021-07-31 9:29 ` Thomas Monjalon 1 sibling, 1 reply; 8+ messages in thread From: Akhil Goyal @ 2021-07-30 19:18 UTC (permalink / raw) To: Arek Kusztal, dev; +Cc: fiona.trahe, roy.fan.zhang > Subject: [EXT] [PATCH 1/2] drivers/qat: fix wrong return value for invalid > service > Title changed as " drivers: fix return value for QAT PMDs " Please check ./devtools/check-git-log.sh before sending patch. > Fix invalid value that is returned when asymmetric crypto > or compression service is selected. Description is also updated. Please check. > > Fixes: 8f393c4ffdc1 ("common/qat: support GEN4 devices") > > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> > --- Applied to dpdk-next-crypto Braces across 'EFAULT' are not needed. I tried fixing it, but it is being Used at many places. Please fix that in a separate patch. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [EXT] [PATCH 1/2] drivers/qat: fix wrong return value for invalid service 2021-07-30 19:18 ` [dpdk-dev] [EXT] " Akhil Goyal @ 2021-07-31 9:29 ` Thomas Monjalon 0 siblings, 0 replies; 8+ messages in thread From: Thomas Monjalon @ 2021-07-31 9:29 UTC (permalink / raw) To: Arek Kusztal, Akhil Goyal; +Cc: fiona.trahe, roy.fan.zhang 30/07/2021 21:18, Akhil Goyal: > > Subject: [EXT] [PATCH 1/2] drivers/qat: fix wrong return value for invalid > > service > > > Title changed as " drivers: fix return value for QAT PMDs " > Please check ./devtools/check-git-log.sh before sending patch. > > > Fix invalid value that is returned when asymmetric crypto > > or compression service is selected. > > Description is also updated. Please check. > > > > Fixes: 8f393c4ffdc1 ("common/qat: support GEN4 devices") > > > > Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com> > > --- > > Applied to dpdk-next-crypto > > Braces across 'EFAULT' are not needed. I tried fixing it, but it is being > Used at many places. Please fix that in a separate patch. There are not parenthesis for every returns, so I will remove those introduced by this patch. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [dpdk-dev] [PATCH 2/2] crypto/qat: fix asymmetric crypto pmd create on gen3 2021-07-28 16:18 [dpdk-dev] [PATCH 0/2] drivers/qat: fix handling of unsupported services Arek Kusztal 2021-07-28 16:18 ` [dpdk-dev] [PATCH 1/2] drivers/qat: fix wrong return value for invalid service Arek Kusztal @ 2021-07-28 16:18 ` Arek Kusztal 2021-07-29 8:57 ` Zhang, Roy Fan 2021-07-30 19:19 ` [dpdk-dev] [EXT] " Akhil Goyal 1 sibling, 2 replies; 8+ messages in thread From: Arek Kusztal @ 2021-07-28 16:18 UTC (permalink / raw) To: dev; +Cc: gakhil, fiona.trahe, roy.fan.zhang, Arek Kusztal 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] crypto/qat: fix asymmetric crypto pmd create on gen3 2021-07-28 16:18 ` [dpdk-dev] [PATCH 2/2] crypto/qat: fix asymmetric crypto pmd create on gen3 Arek Kusztal @ 2021-07-29 8:57 ` Zhang, Roy Fan 2021-07-30 19:19 ` [dpdk-dev] [EXT] " Akhil Goyal 1 sibling, 0 replies; 8+ messages in thread From: Zhang, Roy Fan @ 2021-07-29 8:57 UTC (permalink / raw) To: Kusztal, ArkadiuszX, dev; +Cc: gakhil, Trahe, Fiona > -----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> ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [dpdk-dev] [EXT] [PATCH 2/2] crypto/qat: fix asymmetric crypto pmd create on gen3 2021-07-28 16:18 ` [dpdk-dev] [PATCH 2/2] crypto/qat: fix asymmetric crypto pmd create on gen3 Arek Kusztal 2021-07-29 8:57 ` Zhang, Roy Fan @ 2021-07-30 19:19 ` Akhil Goyal 1 sibling, 0 replies; 8+ messages in thread From: Akhil Goyal @ 2021-07-30 19:19 UTC (permalink / raw) To: Arek Kusztal, dev; +Cc: fiona.trahe, roy.fan.zhang, stable > 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 ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2021-07-31 9:38 UTC | newest] Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-07-28 16:18 [dpdk-dev] [PATCH 0/2] drivers/qat: fix handling of unsupported services Arek Kusztal 2021-07-28 16:18 ` [dpdk-dev] [PATCH 1/2] drivers/qat: fix wrong return value for invalid service Arek Kusztal 2021-07-29 8:58 ` Zhang, Roy Fan 2021-07-30 19:18 ` [dpdk-dev] [EXT] " Akhil Goyal 2021-07-31 9:29 ` Thomas Monjalon 2021-07-28 16:18 ` [dpdk-dev] [PATCH 2/2] crypto/qat: fix asymmetric crypto pmd create on gen3 Arek Kusztal 2021-07-29 8:57 ` Zhang, Roy Fan 2021-07-30 19:19 ` [dpdk-dev] [EXT] " Akhil Goyal
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).