Re: [RFC v2 2/3] crypto: Introduce CRYPTO_ALG_BULK flag
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2016-06-02 08:27:03
Also in:
dm-devel, linux-block, linux-raid, lkml
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2016-06-02 08:27:03
Also in:
dm-devel, linux-block, linux-raid, lkml
On Fri, May 27, 2016 at 07:11:23PM +0800, Baolin Wang wrote:
Now some cipher hardware engines prefer to handle bulk block rather than one sector (512 bytes) created by dm-crypt, cause these cipher engines can handle the intermediate values (IV) by themselves in one bulk block. This means we can increase the size of the request by merging request rather than always 512 bytes and thus increase the hardware engine processing speed. So introduce 'CRYPTO_ALG_BULK' flag to indicate this cipher can support bulk mode. Signed-off-by: Baolin Wang <redacted>
I think a better aproach would be to explicitly move the IV generation into the crypto API, similar to how we handle IPsec. Once you do that then every algorithm can be handled through the bulk interface. Cheers, -- Email: Herbert Xu [off-list ref] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt