From: Chenghai Huang <huangchenghai2@huawei.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <linux-crypto@vger.kernel.org>,
<liulongfang@huawei.com>, <qianweili@huawei.com>,
<wangzhou1@hisilicon.com>, <linwenkai6@hisilicon.com>
Subject: [PATCH 0/4] crypto: engine - add acomp support and adapt Hisilicon HPRE and ZIP drivers
Date: Mon, 9 Nov 2026 15:35:52 +0800 [thread overview]
Message-ID: <20261109073556.2517351-1-huangchenghai2@huawei.com> (raw)
This series adds asynchronous compression (acomp) support to the crypto
engine framework, then converts the Hisilicon HPRE and ZIP drivers to
use it instead of their hand-rolled backlog / queue-retry mechanisms.
Patch 1 fixes the retry pump loop in the engine core: it skips the
idle check that clears engine->busy and rechecks engine->running, so
after the queue drains a later request can be enqueued without a pump
and stall the engine, and crypto_engine_stop() can spin on the stale
busy flag up to -EBUSY.
Patch 2 adds struct acomp_engine_alg with transfer/finalize helpers and
a register/unregister interface, mirroring the existing akcipher and
kpp support. struct acomp_alg moves to <crypto/acompress.h> so that
engine.h can embed it.
Patch 3 gives each HPRE QP (DH/RSA/ECDH) its own crypto engine.
MAY_BACKLOG requests are routed through the engine, which provides the
backlog queue and retries on -ENOSPC; other requests are sent directly
with bounded retries, and in-flight requests are cleaned up by the
completion callback.
Patch 4 gives ZIP a per-device engine pool, with each QP context
borrowing an engine by its QP id so compression and decompression
queue independently. Requests are sent to the hardware when it has
room; on a full queue they are parked in the engine queue and retried,
with the DMA mappings kept across retries.
Chenghai Huang (3):
crypto: engine - clear busy and recheck running in the retry pump loop
crypto: engine - add acomp support
crypto: hisilicon/zip - adapt to use crypto engine
Weili Qian (1):
crypto: hisilicon/hpre - use crypto engine framework
crypto/crypto_engine.c | 46 ++-
drivers/crypto/hisilicon/Kconfig | 2 +
drivers/crypto/hisilicon/hpre/hpre.h | 4 +
drivers/crypto/hisilicon/hpre/hpre_crypto.c | 414 +++++++++++++++-----
drivers/crypto/hisilicon/zip/zip.h | 5 +
drivers/crypto/hisilicon/zip/zip_crypto.c | 358 +++++++++++------
include/crypto/acompress.h | 33 ++
include/crypto/engine.h | 13 +
include/crypto/internal/acompress.h | 33 --
9 files changed, 649 insertions(+), 259 deletions(-)
--
2.43.0
next reply other threads:[~2026-11-09 7:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 7:35 Chenghai Huang [this message]
2026-11-09 7:35 ` [PATCH 1/4] crypto: engine - clear busy and recheck running in the retry pump loop Chenghai Huang
2026-11-09 7:35 ` [PATCH 2/4] crypto: engine - add acomp support Chenghai Huang
2026-11-09 7:35 ` [PATCH 3/4] crypto: hisilicon/hpre - use crypto engine framework Chenghai Huang
2026-11-09 7:35 ` [PATCH 4/4] crypto: hisilicon/zip - adapt to use crypto engine Chenghai Huang
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=20261109073556.2517351-1-huangchenghai2@huawei.com \
--to=huangchenghai2@huawei.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linwenkai6@hisilicon.com \
--cc=liulongfang@huawei.com \
--cc=qianweili@huawei.com \
--cc=wangzhou1@hisilicon.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
all inboxes | Powered by JetHome®