crypto: engine - add acomp support and adapt Hisilicon HPRE and ZIP drivers
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | crypto: engine - clear busy and recheck running in the retry pump loopcrypto/ | +2 | 0 replies | |
| 2/4 | crypto: engine - add acomp supportcrypto/ include/ include/ +1 more | +88 | 0 replies | |
| 3/4 | crypto: hisilicon/hpre - use crypto engine frameworkdrivers/ drivers/ drivers/ | +314 | 0 replies | |
| 4/4 | crypto: hisilicon/zip - adapt to use crypto enginedrivers/ drivers/ drivers/ | +245 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] crypto: engine - add acomp support and adapt Hisilicon HPRE and ZIP drivers
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(-)
Signature · 1 line
2.43.0