]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: skcipher - introduce walksize attribute for SIMD algos
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 29 Dec 2016 14:09:08 +0000 (14:09 +0000)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 30 Dec 2016 11:52:47 +0000 (19:52 +0800)
commitff820a3c5239178d9183c6294097b7d29b7b5aca
treeb46ed60d6257d3302fb6fb15ce4d3d86f1e136fb
parentd33717d4d7c7f6d2a6d43653c3dd136855087608
crypto: skcipher - introduce walksize attribute for SIMD algos

In some cases, SIMD algorithms can only perform optimally when
allowed to operate on multiple input blocks in parallel. This is
especially true for bit slicing algorithms, which typically take
the same amount of time processing a single block or 8 blocks in
parallel. However, other SIMD algorithms may benefit as well from
bigger strides.

So add a walksize attribute to the skcipher algorithm definition, and
wire it up to the skcipher walk API. To avoid confusion between the
skcipher and AEAD attributes, rename the skcipher_walk chunksize
attribute to 'stride', and set it from the walksize (in the skcipher
case) or from the chunksize (in the AEAD case).

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
crypto/skcipher.c
include/crypto/internal/skcipher.h
include/crypto/skcipher.h