linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
To: herbert@gondor.apana.org.au
Cc: linux-crypto@vger.kernel.org,
	Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Subject: [PATCH v7 0/9] crypto: asynchronous compression api
Date: Tue, 13 Sep 2016 13:49:32 +0100	[thread overview]
Message-ID: <1473770981-9869-1-git-send-email-giovanni.cabiddu@intel.com> (raw)

The following patch set introduces acomp, a generic asynchronous
(de)compression api with support for SG lists.
We propose a new crypto type called crypto_acomp_type, a new struct acomp_alg
and struct crypto_acomp, together with number of helper functions to register
acomp type algorithms and allocate tfm instances.
This interface will allow the following operations:

    int (*compress)(struct acomp_req *req);
    int (*decompress)(struct acomp_req *req);

Together with acomp we propose a new driver-side interface, scomp, which
targets legacy synchronous implementation. We converted all compression
algorithms available in LKCF to use this interface so that those algos will be 
accessible through the acomp api.

Changes in v7:
    - removed linearization of SG lists and per-request vmalloc allocations in
      scomp layer
    - modified scomp internal API to use SG lists
    - introduced per-cpu cache of 128K scratch buffers allocated using vmalloc 
      in legacy scomp algorithms

Changes in v6:
    - changed acomp_request_alloc prototype by removing gfp parameter. 
      acomp_request_alloc will always use GFP_KERNEL

Changes in v5:
    - removed qdecompress api, no longer needed
    - removed produced and consumed counters in acomp_req
    - added crypto_has_acomp function 

Changes in v4:
    - added qdecompress api, a front-end for decompression algorithms which
      do not need additional vmalloc work space

Changes in v3:
    - added driver-side scomp interface
    - provided support for lzo, lz4, lz4hc, 842, deflate compression algorithms
      via the acomp api (through scomp)
    - extended testmgr to support acomp
    - removed extended acomp api for supporting deflate algorithm parameters
      (will be enhanced and re-proposed in future)
Note that (2) to (7) are a rework of Joonsoo Kim's scomp patches.

Changes in v2:
    - added compression and decompression request sizes in acomp_alg
      in order to enable noctx support
    - extended api with helpers to allocate compression and
      decompression requests

Changes from initial submit:
    - added consumed and produced fields to acomp_req
    - extended api to support configuration of deflate compressors

--- 
Giovanni Cabiddu (9):
  crypto: add asynchronous compression api
  crypto: add driver-side scomp interface
  crypto: scomp - add scratch buffers allocator and deallocator
  crypto: acomp - add support for lzo via scomp
  crypto: acomp - add support for lz4 via scomp
  crypto: acomp - add support for lz4hc via scomp
  crypto: acomp - add support for 842 via scomp
  crypto: acomp - add support for deflate via scomp
  crypto: acomp - update testmgr with support for acomp

 crypto/842.c                        |  135 ++++++++++++++++++-
 crypto/Kconfig                      |   15 ++
 crypto/Makefile                     |    3 +
 crypto/acompress.c                  |  163 ++++++++++++++++++++++
 crypto/crypto_user.c                |   19 +++
 crypto/deflate.c                    |  166 +++++++++++++++++++++--
 crypto/lz4.c                        |  147 +++++++++++++++++++--
 crypto/lz4hc.c                      |  147 +++++++++++++++++++--
 crypto/lzo.c                        |  146 ++++++++++++++++++--
 crypto/scompress.c                  |  225 +++++++++++++++++++++++++++++++
 crypto/testmgr.c                    |  158 ++++++++++++++++++++--
 include/crypto/acompress.h          |  253 +++++++++++++++++++++++++++++++++++
 include/crypto/internal/acompress.h |   81 +++++++++++
 include/crypto/internal/scompress.h |  139 +++++++++++++++++++
 include/linux/crypto.h              |    3 +
 15 files changed, 1742 insertions(+), 58 deletions(-)
 create mode 100644 crypto/acompress.c
 create mode 100644 crypto/scompress.c
 create mode 100644 include/crypto/acompress.h
 create mode 100644 include/crypto/internal/acompress.h
 create mode 100644 include/crypto/internal/scompress.h

-- 
1.7.4.1

             reply	other threads:[~2016-09-13 12:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-13 12:49 Giovanni Cabiddu [this message]
2016-09-13 12:49 ` [PATCH v7 1/9] crypto: add asynchronous compression api Giovanni Cabiddu
2016-09-13 12:49 ` [PATCH v7 2/9] crypto: add driver-side scomp interface Giovanni Cabiddu
2016-09-13 12:49 ` [PATCH v7 3/9] crypto: scomp - add scratch buffers allocator and deallocator Giovanni Cabiddu
2016-09-13 12:49 ` [PATCH v7 4/9] crypto: acomp - add support for lzo via scomp Giovanni Cabiddu
2016-09-20  9:26   ` Herbert Xu
2016-09-20 12:23     ` Giovanni Cabiddu
     [not found]     ` <20160920115140.GA12332@sivswdev01.ir.intel.com>
2016-09-22  9:22       ` Herbert Xu
2016-09-22 22:54         ` Giovanni Cabiddu
2016-09-23 15:05           ` Herbert Xu
2016-09-26 17:27             ` Giovanni Cabiddu
2016-09-27  3:07               ` Herbert Xu
2016-09-13 12:49 ` [PATCH v7 5/9] crypto: acomp - add support for lz4 " Giovanni Cabiddu
2016-09-13 12:49 ` [PATCH v7 6/9] crypto: acomp - add support for lz4hc " Giovanni Cabiddu
2016-09-13 12:49 ` [PATCH v7 7/9] crypto: acomp - add support for 842 " Giovanni Cabiddu
2016-09-13 12:49 ` [PATCH v7 8/9] crypto: acomp - add support for deflate " Giovanni Cabiddu
2016-09-13 12:49 ` [PATCH v7 9/9] crypto: acomp - update testmgr with support for acomp Giovanni Cabiddu

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=1473770981-9869-1-git-send-email-giovanni.cabiddu@intel.com \
    --to=giovanni.cabiddu@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /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;
as well as URLs for NNTP newsgroup(s).