diff mbox series

[v3,10/10] crypto: qat - re-enable registration of algorithms

Message ID 20220509133417.56043-11-giovanni.cabiddu@intel.com (mailing list archive)
State Accepted
Delegated to: Herbert Xu
Headers show
Series crypto: qat - re-enable algorithms | expand

Commit Message

Cabiddu, Giovanni May 9, 2022, 1:34 p.m. UTC
Re-enable the registration of algorithms after fixes to (1) use
pre-allocated buffers in the datapath and (2) support the
CRYPTO_TFM_REQ_MAY_BACKLOG flag.

This reverts commit 8893d27ffcaf6ec6267038a177cb87bcde4dd3de.

Cc: stable@vger.kernel.org
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Marco Chiappero <marco.chiappero@intel.com>
Reviewed-by: Adam Guerin <adam.guerin@intel.com>
Reviewed-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
---
 drivers/crypto/qat/qat_4xxx/adf_drv.c      | 7 -------
 drivers/crypto/qat/qat_common/qat_crypto.c | 7 -------
 2 files changed, 14 deletions(-)

Comments

Greg Kroah-Hartman May 9, 2022, 2:11 p.m. UTC | #1
On Mon, May 09, 2022 at 02:34:17PM +0100, Giovanni Cabiddu wrote:
> Re-enable the registration of algorithms after fixes to (1) use
> pre-allocated buffers in the datapath and (2) support the
> CRYPTO_TFM_REQ_MAY_BACKLOG flag.
> 
> This reverts commit 8893d27ffcaf6ec6267038a177cb87bcde4dd3de.

Then why not just have this be a "normal" revert commit?

And why is this ok for stable kernels?  This feels like a new feature
(i.e. the code finally works.)  Why not just have users who want to use
this use a newer kernel?  What bugfix does this resolve in older kernels
(and "the driver did not work" is not really a good reason.)

thanks,

greg k-h
Cabiddu, Giovanni May 9, 2022, 2:47 p.m. UTC | #2
On Mon, May 09, 2022 at 04:11:27PM +0200, Greg KH wrote:
> On Mon, May 09, 2022 at 02:34:17PM +0100, Giovanni Cabiddu wrote:
> > Re-enable the registration of algorithms after fixes to (1) use
> > pre-allocated buffers in the datapath and (2) support the
> > CRYPTO_TFM_REQ_MAY_BACKLOG flag.
> > 
> > This reverts commit 8893d27ffcaf6ec6267038a177cb87bcde4dd3de.
> 
> Then why not just have this be a "normal" revert commit?
It can be a revert commit. I didn't send a revert commit since I never
saw one in the crypto mailing list.

> And why is this ok for stable kernels?  This feels like a new feature
> (i.e. the code finally works.)  Why not just have users who want to use
> this use a newer kernel?  What bugfix does this resolve in older kernels
> (and "the driver did not work" is not really a good reason.)
After the bug report in [1], the final decision was to disable the
algorithms until the issue was fixed.
This set is fixing the issues that cause [1] and a few other minor ones
before re-enabling the algos.

I think there is value in having these fixes in stable as they allow to
re-enable services that were available before the 5.17 time frame.

Regards,
diff mbox series

Patch

diff --git a/drivers/crypto/qat/qat_4xxx/adf_drv.c b/drivers/crypto/qat/qat_4xxx/adf_drv.c
index fa4c350c1bf9..a6c78b9c730b 100644
--- a/drivers/crypto/qat/qat_4xxx/adf_drv.c
+++ b/drivers/crypto/qat/qat_4xxx/adf_drv.c
@@ -75,13 +75,6 @@  static int adf_crypto_dev_config(struct adf_accel_dev *accel_dev)
 	if (ret)
 		goto err;
 
-	/* Temporarily set the number of crypto instances to zero to avoid
-	 * registering the crypto algorithms.
-	 * This will be removed when the algorithms will support the
-	 * CRYPTO_TFM_REQ_MAY_BACKLOG flag
-	 */
-	instances = 0;
-
 	for (i = 0; i < instances; i++) {
 		val = i;
 		bank = i * 2;
diff --git a/drivers/crypto/qat/qat_common/qat_crypto.c b/drivers/crypto/qat/qat_common/qat_crypto.c
index 80d905ed102e..9341d892533a 100644
--- a/drivers/crypto/qat/qat_common/qat_crypto.c
+++ b/drivers/crypto/qat/qat_common/qat_crypto.c
@@ -161,13 +161,6 @@  int qat_crypto_dev_config(struct adf_accel_dev *accel_dev)
 	if (ret)
 		goto err;
 
-	/* Temporarily set the number of crypto instances to zero to avoid
-	 * registering the crypto algorithms.
-	 * This will be removed when the algorithms will support the
-	 * CRYPTO_TFM_REQ_MAY_BACKLOG flag
-	 */
-	instances = 0;
-
 	for (i = 0; i < instances; i++) {
 		val = i;
 		snprintf(key, sizeof(key), ADF_CY "%d" ADF_RING_ASYM_BANK_NUM, i);