Re: [dm-devel] [RFC v4 2/4] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-07 Thread Baolin Wang
Hi Herbert, On 7 June 2016 at 22:16, Herbert Xu wrote: > On Tue, Jun 07, 2016 at 08:17:05PM +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

Re: [dm-devel] [PATCH] multipathd: update defaults

2016-06-07 Thread Benjamin Marzinski
On Fri, Jun 03, 2016 at 09:14:32AM +0200, Hannes Reinecke wrote: > For years I've been telling our customers to use the 'tur' checker > as the current default 'directio' will cause spurious path failures > under high load. > > And for several versions (years, even) the linux kernel has the

Re: [dm-devel] [RFC v4 2/4] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-07 Thread Herbert Xu
On Tue, Jun 07, 2016 at 08:17:05PM +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

[dm-devel] [RFC v4 2/4] crypto: Introduce CRYPTO_ALG_BULK flag

2016-06-07 Thread Baolin Wang
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

[dm-devel] [RFC v4 3/4] md: dm-crypt: Introduce the bulk mode method when sending request

2016-06-07 Thread Baolin Wang
In now dm-crypt code, it is ineffective to map one segment (always one sector) of one bio with just only one scatterlist at one time for hardware crypto engine. Especially for some encryption mode (like ecb or xts mode) cooperating with the crypto engine, they just need one initial IV or null IV

[dm-devel] [RFC v4 0/4] Introduce the bulk mode method when sending request to crypto layer

2016-06-07 Thread Baolin Wang
This patchset will check if the cipher can support bulk mode, then dm-crypt will handle different ways to send requests to crypto layer according to cipher mode. For bulk mode, we can use sg table to map the whole bio and send all scatterlists of one bio to crypto engine to encrypt or decrypt,

[dm-devel] [RFC v4 4/4] crypto: Add the CRYPTO_ALG_BULK flag for ecb(aes) cipher

2016-06-07 Thread Baolin Wang
Since the ecb(aes) cipher does not need to handle the IV things for encryption or decryption, that means it can support for bulk block when handling data. Thus this patch adds the CRYPTO_ALG_BULK flag for ecb(aes) cipher to improve the hardware aes engine's efficiency. Signed-off-by: Baolin Wang