crypto: qat - extend buffer list logic interface
authorLucas Segarra Fernandez <lucas.segarra.fernandez@intel.com>
Mon, 23 Jan 2023 10:42:21 +0000 (11:42 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 3 Feb 2023 04:54:54 +0000 (12:54 +0800)
commitc1e98807b7049dfc04a971b937ca127faa5514f4
tree4f226acc7f8f6768a042323466523862f80c78ee
parentd52b0c780c1f8cdd0cef9c6e683ab568d04bb19d
crypto: qat - extend buffer list logic interface

Extend qat_bl_sgl_to_bufl() to allow skipping the mapping of a region
of the source and the destination scatter lists starting from byte
zero.

This is to support the ZLIB format (RFC 1950) in the qat driver.
The ZLIB format is made of deflate compressed data surrounded by a
header and a footer. The QAT accelerators support only the deflate
algorithm, therefore the header should not be mapped since it is
inserted in software.

Signed-off-by: Lucas Segarra Fernandez <lucas.segarra.fernandez@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/qat/qat_common/qat_bl.c
drivers/crypto/qat/qat_common/qat_bl.h
drivers/crypto/qat/qat_common/qat_comp_algs.c