Skip to content

RFC crypto: qat - fix dm-crypt related issues

Giovanni Cabiddu linux-crypto 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3crypto: qat - use pre-allocated buffers in datapathdrivers/crypto/qat/qat_common/qat_algs.c drivers/crypto/qat/qat_common/qat_crypto.h+59 -270 replies
2/3crypto: qat - add backlog mechanismdrivers/crypto/qat/qat_common/adf_transport.c drivers/crypto/qat/qat_common/adf_transport.h drivers/crypto/qat/qat_common/adf_transport_internal.h +2 more+204 -420 replies
3/3crypto: qat - remove CRYPTO_ALG_ALLOCATES_MEMORY flagdrivers/crypto/qat/qat_common/qat_algs.c+6 -70 replies

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchMarco ChiapperoWojciech Ziemba
1/3R-b R-b
2/3R-b R-b
3/3R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [RFC 0/3] crypto: qat - fix dm-crypt related issues

This set fixes the issues related with the dm-crypt + QAT driver use-case.

The first patch fixes a potential dead-lock that might occur when using dm-crypt + QAT in out of memory conditions. The datapaths of the aead and skcipher implementations have been changed to use pre-allocated buffers that are part of the request contexts.

The second patch addresses a stall in the dm-crypt + QAT usecase by adding support for the CRYPTO_TFM_REQ_MAY_BACKLOG flag. If the HW queue is full, the driver enqueues the request in a list and resubmit it at a later time, avoiding losing it.

The last, removes the CRYPTO_ALG_ALLOCATES_MEMORY flag from the aead and skcipher implementations so that the driver can be used by dm-crypt.

Although the set is functional, I marked it as RFC as I want to do some code improvements on the second patch, crypto: qat - add backlog mechanism, do additional performance profiling and optimizations.

Giovanni Cabiddu (2):
crypto: qat - use pre-allocated buffers in datapath
crypto: qat - remove CRYPTO_ALG_ALLOCATES_MEMORY flag

Vishnu Das Ramachandran (1):
crypto: qat - add backlog mechanism

 drivers/crypto/qat/qat_common/adf_transport.c |  12 +
 drivers/crypto/qat/qat_common/adf_transport.h |   1 +
 .../qat/qat_common/adf_transport_internal.h   |   1 +
 drivers/crypto/qat/qat_common/qat_algs.c      | 305 +++++++++++++-----
 drivers/crypto/qat/qat_common/qat_crypto.h    |  26 ++
 5 files changed, 269 insertions(+), 76 deletions(-)
Signature · 1 line
2.35.1