From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com,
Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Subject: [PATCH v2 0/2] crypto: qat - add support for zstd
Date: Sat, 28 Mar 2026 22:29:45 +0000 [thread overview]
Message-ID: <20260328223445.39445-1-giovanni.cabiddu@intel.com> (raw)
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
next reply other threads:[~2026-03-28 22:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-28 22:29 Giovanni Cabiddu [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260328223445.39445-1-giovanni.cabiddu@intel.com \
--to=giovanni.cabiddu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=qat-linux@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox