Skip to content

crypto: acomp - Add compression segmentation support

Herbert Xu linux-crypto 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4crypto: acomp - Clone folios properlycrypto/acompress.c include/crypto/acompress.h+20 -60 replies
2/4crypto: api - Rename CRYPTO_ALG_REQ_CHAIN to CRYPTO_ALG_REQ_VIRTcrypto/acompress.c crypto/ahash.c crypto/deflate.c +5 more+15 -150 replies
3/4crypto: acomp - Add compression segmentation supportcrypto/acompress.c crypto/algapi.c include/crypto/acompress.h +3 more+263 -130 replies
4/4crypto: testmgr - Add multibuffer acomp testingcrypto/testmgr.c+72 -730 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] crypto: acomp - Add compression segmentation support

This patch series is a reboot of the acomp multibuffer patch series. Instead of using request chaining, this time it is done using a plain SG list and a unit size.

Either the Crypto API or optionally the algorithm can dice up the request into unit-sized pieces. The caller provides a single page and a 2-entry SG list for output, and the Crypto API or algorithm will dynamically extend it one page at a time through chaining if necessary. The compressed result will be tightly packed together.

If any unit fails to compress, a zero-length SG entry will be inserted for it.

If at any time memory allocation fails (the first entry cannot fail since it's compressed into memory provided by the caller), then compression will stop and the caller can process what has been compressed so far before resuming by calling with an offset into the original SG list.

Herbert Xu (4):
crypto: acomp - Clone folios properly
crypto: api - Rename CRYPTO_ALG_REQ_CHAIN to CRYPTO_ALG_REQ_VIRT
crypto: acomp - Add compression segmentation support
crypto: testmgr - Add multibuffer acomp testing

 crypto/acompress.c                  | 172 ++++++++++++++++++++++++++--
 crypto/ahash.c                      |   6 +-
 crypto/algapi.c                     |   3 +
 crypto/deflate.c                    |   2 +-
 crypto/scompress.c                  |   2 +-
 crypto/testmgr.c                    | 145 ++++++++++++-----------
 include/crypto/acompress.h          | 107 +++++++++++++++--
 include/crypto/algapi.h             |   9 +-
 include/crypto/internal/acompress.h |  14 ++-
 include/crypto/internal/hash.h      |   4 +-
 include/linux/crypto.h              |   7 +-
 11 files changed, 367 insertions(+), 104 deletions(-)
Signature · 1 line
2.39.5