public inbox for linux-crypto@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] crypto: qat - add support for zstd
@ 2026-03-28 22:29 Giovanni Cabiddu
  2026-03-28 22:29 ` [PATCH v2 1/2] crypto: qat - use swab32 macro Giovanni Cabiddu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Giovanni Cabiddu @ 2026-03-28 22:29 UTC (permalink / raw)
  To: herbert; +Cc: linux-crypto, qat-linux, Giovanni Cabiddu

The Intel QuickAssist Technology (QAT) driver currently supports deflate
compression via the acomp API, but lacks support for the ZSTD algorithm.

This series adds ZSTD compression support for QAT GEN4, QAT GEN5 and QAT
GEN6 devices.

On GEN4 and GEN5, hardware compresses data using LZ4s (a QAT-specific
variant of LZ4). The LZ4s output is then parsed and passed to the kernel
zstd library via zstd_compress_sequences_and_literals() to produce a
standard ZSTD stream. The post-processing step uses per-CPU scratch
buffers managed via the acomp stream infrastructure.

On GEN6, both compression and decompression are natively offloaded to
the accelerator. Decompression of frames with a history window exceeding
the 64 KB hardware limit falls back to software.

A filtering mechanism is also introduced to prevent GEN2 plug-in cards,
which do not support ZSTD or LZ4s, from being selected for these
algorithms when a GEN4, GEN5 or GEN6 embedded device is also present on
the system.

In summary:
- Patch #1 fixes a build error on architectures without a native
  byte-swap instruction
- Patch #2 exposes the ZSTD algorithm through the acomp API for QAT
  GEN4, GEN5 and GEN6 accelerators

Changes since v1:
- Add a patch to fix a build error on architectures without a native
  byte-swap instruction

Giovanni Cabiddu (2):
  crypto: qat - use swab32 macro
  crypto: qat - add support for zstd

 drivers/crypto/intel/qat/Kconfig              |   1 +
 .../intel/qat/qat_420xx/adf_420xx_hw_data.c   |   1 +
 .../intel/qat/qat_4xxx/adf_4xxx_hw_data.c     |   1 +
 .../intel/qat/qat_6xxx/adf_6xxx_hw_data.c     |  17 +
 drivers/crypto/intel/qat/qat_common/Makefile  |   1 +
 .../intel/qat/qat_common/adf_accel_devices.h  |   6 +
 .../intel/qat/qat_common/adf_common_drv.h     |   6 +-
 .../intel/qat/qat_common/adf_gen4_hw_data.c   |  18 +-
 .../crypto/intel/qat/qat_common/adf_init.c    |   6 +-
 .../crypto/intel/qat/qat_common/icp_qat_fw.h  |   7 +
 .../intel/qat/qat_common/icp_qat_fw_comp.h    |   2 +
 .../crypto/intel/qat/qat_common/icp_qat_hw.h  |   3 +-
 .../intel/qat/qat_common/icp_qat_hw_20_comp.h |  10 +-
 .../intel/qat/qat_common/qat_comp_algs.c      | 524 +++++++++++++++++-
 .../intel/qat/qat_common/qat_comp_req.h       |   9 +
 .../qat/qat_common/qat_comp_zstd_utils.c      | 165 ++++++
 .../qat/qat_common/qat_comp_zstd_utils.h      |  13 +
 .../intel/qat/qat_common/qat_compression.c    |  23 +-
 18 files changed, 779 insertions(+), 34 deletions(-)
 create mode 100644 drivers/crypto/intel/qat/qat_common/qat_comp_zstd_utils.c
 create mode 100644 drivers/crypto/intel/qat/qat_common/qat_comp_zstd_utils.h


base-commit: 93e03a16c015b8e55e2ec97865f67d9bf1ec1921
-- 
2.53.0


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-04-03  1:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-28 22:29 [PATCH v2 0/2] crypto: qat - add support for zstd Giovanni Cabiddu
2026-03-28 22:29 ` [PATCH v2 1/2] crypto: qat - use swab32 macro Giovanni Cabiddu
2026-03-28 22:29 ` [PATCH v2 2/2] crypto: qat - add support for zstd Giovanni Cabiddu
2026-04-03  1:09 ` [PATCH v2 0/2] " Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox