Re: [PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-15 Thread Baolin Wang
On 15 December 2015 at 16:20, Milan Broz wrote: > On 12/15/2015 03:56 AM, Baolin Wang wrote: + /* + * Here we need to check if it can be encrypted or decrypted with + * bulk block, which means these encryption modes don't need IV or + * just need one initial

Re: [PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-15 Thread Milan Broz
On 12/15/2015 03:56 AM, Baolin Wang wrote: >>> + /* >>> + * Here we need to check if it can be encrypted or decrypted with >>> + * bulk block, which means these encryption modes don't need IV or >>> + * just need one initial IV. For bulk mode, we can expand the >>> + *

Re: [PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-15 Thread Milan Broz
On 12/15/2015 03:56 AM, Baolin Wang wrote: >>> + /* >>> + * Here we need to check if it can be encrypted or decrypted with >>> + * bulk block, which means these encryption modes don't need IV or >>> + * just need one initial IV. For bulk mode, we can expand the >>> + *

Re: [PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-15 Thread Baolin Wang
On 15 December 2015 at 16:20, Milan Broz wrote: > On 12/15/2015 03:56 AM, Baolin Wang wrote: + /* + * Here we need to check if it can be encrypted or decrypted with + * bulk block, which means these encryption modes don't need IV or + *

Re: [PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-14 Thread Baolin Wang
>> + /* >> + * Here we need to check if it can be encrypted or decrypted with >> + * bulk block, which means these encryption modes don't need IV or >> + * just need one initial IV. For bulk mode, we can expand the >> + * scatterlist entries to map the bio, then send all

Re: [PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-14 Thread Milan Broz
On 12/14/2015 09:23 AM, Baolin Wang wrote: > In now dm-crypt code, it is ineffective to map one bio with just only > one scatterlist at one time for XTS mode. We can use multiple scatterlists > to map the whole bio and send all scatterlists of one bio to crypto engine > to encrypt or decrypt,

[PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-14 Thread Baolin Wang
In now dm-crypt code, it is ineffective to map one bio with just only one scatterlist at one time for XTS mode. We can use multiple scatterlists to map the whole bio and send all scatterlists of one bio to crypto engine to encrypt or decrypt, which can improve the hardware engine's efficiency.

Re: [PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-14 Thread Milan Broz
On 12/14/2015 09:23 AM, Baolin Wang wrote: > In now dm-crypt code, it is ineffective to map one bio with just only > one scatterlist at one time for XTS mode. We can use multiple scatterlists > to map the whole bio and send all scatterlists of one bio to crypto engine > to encrypt or decrypt,

Re: [PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-14 Thread Baolin Wang
>> + /* >> + * Here we need to check if it can be encrypted or decrypted with >> + * bulk block, which means these encryption modes don't need IV or >> + * just need one initial IV. For bulk mode, we can expand the >> + * scatterlist entries to map the bio, then send all

[PATCH 2/2] md: dm-crypt: Optimize the dm-crypt for XTS mode

2015-12-14 Thread Baolin Wang
In now dm-crypt code, it is ineffective to map one bio with just only one scatterlist at one time for XTS mode. We can use multiple scatterlists to map the whole bio and send all scatterlists of one bio to crypto engine to encrypt or decrypt, which can improve the hardware engine's efficiency.