crypto: qat - extend buffer list interface
authorGiovanni Cabiddu <giovanni.cabiddu@intel.com>
Mon, 28 Nov 2022 12:21:16 +0000 (12:21 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 9 Dec 2022 10:44:59 +0000 (18:44 +0800)
commitcf692906bd61af2eec06a32a83d2a8ec3acf3548
treee2375d6358d180ec0e17ff2c66ed90222baa7e96
parent36ebc7472afeb58f1eb1d4c1f0546b9e98acea46
crypto: qat - extend buffer list interface

The compression service requires an additional pre-allocated buffer for
each destination scatter list.
Extend the function qat_alg_sgl_to_bufl() to take an additional
structure that contains the dma address and the size of the extra
buffer which will be appended in the destination FW SGL.

The logic that unmaps buffers in qat_alg_free_bufl() has been changed to
start unmapping from buffer 0 instead of skipping the initial buffers
num_buff - num_mapped_bufs as that functionality was not used in the
code.

Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Wojciech Ziemba <wojciech.ziemba@intel.com>
Reviewed-by: Adam Guerin <adam.guerin@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/qat_algs.c
drivers/crypto/qat/qat_common/qat_bl.c
drivers/crypto/qat/qat_common/qat_bl.h