mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
Add support for the ZSTD algorithm for QAT GEN4, GEN5 and GEN6 via the acomp API. For GEN4 and GEN5, compression is performed in hardware using LZ4s, a QAT-specific variant of LZ4. The compressed output is post-processed to generate ZSTD sequences, and the ZSTD library is then used to produce the final ZSTD stream via zstd_compress_sequences_and_literals(). Only inputs between 8 KB and 512 KB are offloaded to the device. The minimum size restriction will be relaxed once polling support is added. The maximum size is limited by the use of pre-allocated per-CPU scratch buffers. On these generations, only compression is offloaded to hardware; decompression always falls back to software. For GEN6, both compression and decompression are offloaded to the accelerator, which natively supports the ZSTD algorithm. There is no limit on the input buffer size supported. However, since GEN6 is limited to a history size of 64 KB, decompression of frames compressed with a larger history falls back to software. Since GEN2 devices do not support ZSTD or LZ4s, add a mechanism that prevents selecting GEN2 compression instances for ZSTD or LZ4s when a GEN2 plug-in card is present on a system with an embedded GEN4, GEN5 or GEN6 device. In addition, modify the algorithm registration logic to allow registering the correct implementation, i.e. LZ4s based for GEN4 and GEN5 or native ZSTD for GEN6. Co-developed-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com> Signed-off-by: Suman Kumar Chakraborty <suman.kumar.chakraborty@intel.com> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Laurent M Coquerel <laurent.m.coquerel@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
136 lines
4.1 KiB
Plaintext
136 lines
4.1 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
config CRYPTO_DEV_QAT
|
|
tristate
|
|
select CRYPTO_ACOMP
|
|
select CRYPTO_AEAD
|
|
select CRYPTO_AUTHENC
|
|
select CRYPTO_SKCIPHER
|
|
select CRYPTO_AKCIPHER
|
|
select CRYPTO_DH
|
|
select CRYPTO_RSA
|
|
select CRYPTO_LIB_AES
|
|
select CRYPTO_LIB_SHA1
|
|
select CRYPTO_LIB_SHA256
|
|
select CRYPTO_LIB_SHA512
|
|
select CRYPTO_ZSTD
|
|
select FW_LOADER
|
|
select CRC8
|
|
|
|
config CRYPTO_DEV_QAT_DH895xCC
|
|
tristate "Support for Intel(R) DH895xCC"
|
|
depends on PCI && (!CPU_BIG_ENDIAN || COMPILE_TEST)
|
|
select CRYPTO_DEV_QAT
|
|
help
|
|
Support for Intel(R) DH895xcc with Intel(R) QuickAssist Technology
|
|
for accelerating crypto and compression workloads.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called qat_dh895xcc.
|
|
|
|
config CRYPTO_DEV_QAT_C3XXX
|
|
tristate "Support for Intel(R) C3XXX"
|
|
depends on PCI && (!CPU_BIG_ENDIAN || COMPILE_TEST)
|
|
select CRYPTO_DEV_QAT
|
|
help
|
|
Support for Intel(R) C3xxx with Intel(R) QuickAssist Technology
|
|
for accelerating crypto and compression workloads.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called qat_c3xxx.
|
|
|
|
config CRYPTO_DEV_QAT_C62X
|
|
tristate "Support for Intel(R) C62X"
|
|
depends on PCI && (!CPU_BIG_ENDIAN || COMPILE_TEST)
|
|
select CRYPTO_DEV_QAT
|
|
help
|
|
Support for Intel(R) C62x with Intel(R) QuickAssist Technology
|
|
for accelerating crypto and compression workloads.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called qat_c62x.
|
|
|
|
config CRYPTO_DEV_QAT_4XXX
|
|
tristate "Support for Intel(R) QAT_4XXX"
|
|
depends on PCI && (!CPU_BIG_ENDIAN || COMPILE_TEST)
|
|
select CRYPTO_DEV_QAT
|
|
help
|
|
Support for Intel(R) QuickAssist Technology QAT_4xxx
|
|
for accelerating crypto and compression workloads.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called qat_4xxx.
|
|
|
|
config CRYPTO_DEV_QAT_420XX
|
|
tristate "Support for Intel(R) QAT_420XX"
|
|
depends on PCI && (!CPU_BIG_ENDIAN || COMPILE_TEST)
|
|
select CRYPTO_DEV_QAT
|
|
help
|
|
Support for Intel(R) QuickAssist Technology QAT_420xx
|
|
for accelerating crypto and compression workloads.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called qat_420xx.
|
|
|
|
config CRYPTO_DEV_QAT_6XXX
|
|
tristate "Support for Intel(R) QuickAssist Technology QAT_6XXX"
|
|
depends on (X86 || COMPILE_TEST)
|
|
depends on PCI
|
|
select CRYPTO_DEV_QAT
|
|
help
|
|
Support for Intel(R) QuickAssist Technology QAT_6xxx
|
|
for accelerating crypto and compression workloads.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called qat_6xxx.
|
|
|
|
config CRYPTO_DEV_QAT_DH895xCCVF
|
|
tristate "Support for Intel(R) DH895xCC Virtual Function"
|
|
depends on PCI && (!CPU_BIG_ENDIAN || COMPILE_TEST)
|
|
select PCI_IOV
|
|
select CRYPTO_DEV_QAT
|
|
|
|
help
|
|
Support for Intel(R) DH895xcc with Intel(R) QuickAssist Technology
|
|
Virtual Function for accelerating crypto and compression workloads.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called qat_dh895xccvf.
|
|
|
|
config CRYPTO_DEV_QAT_C3XXXVF
|
|
tristate "Support for Intel(R) C3XXX Virtual Function"
|
|
depends on PCI && (!CPU_BIG_ENDIAN || COMPILE_TEST)
|
|
select PCI_IOV
|
|
select CRYPTO_DEV_QAT
|
|
help
|
|
Support for Intel(R) C3xxx with Intel(R) QuickAssist Technology
|
|
Virtual Function for accelerating crypto and compression workloads.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called qat_c3xxxvf.
|
|
|
|
config CRYPTO_DEV_QAT_C62XVF
|
|
tristate "Support for Intel(R) C62X Virtual Function"
|
|
depends on PCI && (!CPU_BIG_ENDIAN || COMPILE_TEST)
|
|
select PCI_IOV
|
|
select CRYPTO_DEV_QAT
|
|
help
|
|
Support for Intel(R) C62x with Intel(R) QuickAssist Technology
|
|
Virtual Function for accelerating crypto and compression workloads.
|
|
|
|
To compile this as a module, choose M here: the module
|
|
will be called qat_c62xvf.
|
|
|
|
config CRYPTO_DEV_QAT_ERROR_INJECTION
|
|
bool "Support for Intel(R) QAT Devices Heartbeat Error Injection"
|
|
depends on CRYPTO_DEV_QAT
|
|
depends on DEBUG_FS
|
|
help
|
|
Enables a mechanism that allows to inject a heartbeat error on
|
|
Intel(R) QuickAssist devices for testing purposes.
|
|
|
|
This is intended for developer use only.
|
|
If unsure, say N.
|
|
|
|
This functionality is available via debugfs entry of the Intel(R)
|
|
QuickAssist device
|