OpenCloudOS-Kernel/drivers/crypto/qat
Giovanni Cabiddu 3112d0f1b0 crypto: qat - add resubmit logic for decompression
The acomp API allows to send requests with a NULL destination buffer. In
this case, the algorithm implementation needs to allocate the
destination scatter list, perform the operation and return the buffer to
the user. For decompression, data is likely to expand and be bigger than
the allocated buffer.

This implements a re-submission mechanism for decompression requests
that is triggered if the destination buffer, allocated by the driver,
is not sufficiently big to store the output from decompression.

If an overflow is detected when processing the callback for a
decompression request with a NULL destination buffer, a workqueue is
scheduled. This allocates a new scatter list of size CRYPTO_ACOMP_DST_MAX,
now 128KB, creates a new firmware scatter list and resubmits the job to
the hardware accelerator.

Suggested-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2022-12-09 18:45:00 +08:00
..
qat_4xxx crypto: qat - enable deflate for QAT GEN4 2022-12-09 18:44:59 +08:00
qat_c3xxx crypto: qat - expose deflate through acomp api for QAT GEN2 2022-12-09 18:44:59 +08:00
qat_c3xxxvf crypto: qat - expose deflate through acomp api for QAT GEN2 2022-12-09 18:44:59 +08:00
qat_c62x crypto: qat - expose deflate through acomp api for QAT GEN2 2022-12-09 18:44:59 +08:00
qat_c62xvf crypto: qat - expose deflate through acomp api for QAT GEN2 2022-12-09 18:44:59 +08:00
qat_common crypto: qat - add resubmit logic for decompression 2022-12-09 18:45:00 +08:00
qat_dh895xcc crypto: qat - expose deflate through acomp api for QAT GEN2 2022-12-09 18:44:59 +08:00
qat_dh895xccvf crypto: qat - expose deflate through acomp api for QAT GEN2 2022-12-09 18:44:59 +08:00
Kconfig crypto: qat - Removes the x86 dependency on the QAT drivers 2022-06-24 17:12:29 +08:00
Makefile crypto: qat - add qat_4xxx driver 2020-11-20 14:45:34 +11:00