Re: [dm-devel] [PATCH v2 0/4] Introduce bulk mode for crypto engine framework

2016-04-18 Thread Baolin Wang
On 18 April 2016 at 16:41, Herbert Xu wrote: > On Mon, Apr 18, 2016 at 04:40:36PM +0800, Baolin Wang wrote: >> >> Simply to say, now there are many different hardware engines for >> different vendors, some engines can support bulk block but some can >> not (or no

Re: [dm-devel] [PATCH v2 0/4] Introduce bulk mode for crypto engine framework

2016-04-18 Thread Herbert Xu
On Mon, Apr 18, 2016 at 04:40:36PM +0800, Baolin Wang wrote: > > Simply to say, now there are many different hardware engines for > different vendors, some engines can support bulk block but some can > not (or no cipher hardware engine), then the dm-crypt can not know > your hardware engine

Re: [dm-devel] [PATCH v2 0/4] Introduce bulk mode for crypto engine framework

2016-04-18 Thread Baolin Wang
On 18 April 2016 at 16:17, Herbert Xu wrote: > On Mon, Apr 18, 2016 at 04:14:48PM +0800, Baolin Wang wrote: >> On 18 April 2016 at 16:04, Herbert Xu wrote: >> > On Mon, Apr 18, 2016 at 03:58:59PM +0800, Baolin Wang wrote: >> >> >> >> That

Re: [dm-devel] [PATCH v2 0/4] Introduce bulk mode for crypto engine framework

2016-04-18 Thread Herbert Xu
On Mon, Apr 18, 2016 at 04:14:48PM +0800, Baolin Wang wrote: > On 18 April 2016 at 16:04, Herbert Xu wrote: > > On Mon, Apr 18, 2016 at 03:58:59PM +0800, Baolin Wang wrote: > >> > >> That depends on the hardware engine. Some cipher hardware engines > >> (like xts(aes)

Re: [dm-devel] [PATCH v2 0/4] Introduce bulk mode for crypto engine framework

2016-04-18 Thread Herbert Xu
On Mon, Apr 18, 2016 at 03:58:59PM +0800, Baolin Wang wrote: > > That depends on the hardware engine. Some cipher hardware engines > (like xts(aes) engine) can handle the intermediate values (IV) by > themselves in one bulk block, which means we can increase the size of > the request by merging

Re: [dm-devel] [PATCH v2 0/4] Introduce bulk mode for crypto engine framework

2016-04-18 Thread Baolin Wang
On 18 April 2016 at 15:24, Herbert Xu wrote: > On Mon, Apr 18, 2016 at 03:21:16PM +0800, Baolin Wang wrote: >> >> I don't think so, the dm-crypt can not send maximal requests at some >> situations. For example, the 'cbc(aes)' cipher, it must be handled >> sector by

Re: [dm-devel] [PATCH v2 0/4] Introduce bulk mode for crypto engine framework

2016-04-18 Thread Herbert Xu
On Mon, Apr 18, 2016 at 02:02:51PM +0800, Baolin Wang wrote: > > If the crypto hardware engine can support bulk data > encryption/decryption, so the engine driver can select bulk mode to > handle the requests. I think it is a totally driver things, not in > dmcrypt. The dmcrypt can not get the

Re: [dm-devel] [PATCH v2 0/4] Introduce bulk mode for crypto engine framework

2016-04-17 Thread Herbert Xu
On Mon, Apr 18, 2016 at 01:31:09PM +0800, Baolin Wang wrote: > > We've tried to do this in dm-crypt, but it failed. > The dm-crypt maintainer explained to me that I should optimize the > driver, not add strange hw-dependent crypto modes to dm-crypt, this is > not the first crypto accelerator that

Re: [dm-devel] [PATCH v2 0/4] Introduce bulk mode for crypto engine framework

2016-04-15 Thread Herbert Xu
On Tue, Mar 15, 2016 at 03:47:58PM +0800, Baolin Wang wrote: > Now some cipher hardware engines prefer to handle bulk block by merging > requests > to increase the block size and thus increase the hardware engine processing > speed. > > This patchset introduces request bulk mode to help the