Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-19 Thread Herbert Xu
On Wed, Nov 18, 2015 at 06:39:30PM -0800, Tim Chen wrote: > > The __cbc-aes-aesni-mb algorithm is marked as internal algorithm > with flag CRYPTO_ALG_INTERNAL, so it should not be picked up by other > algorithms and should only be invoked from mcryptd. OK I guess that's fine then. > Anyway,

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-19 Thread Herbert Xu
On Wed, Nov 18, 2015 at 06:39:30PM -0800, Tim Chen wrote: > > The __cbc-aes-aesni-mb algorithm is marked as internal algorithm > with flag CRYPTO_ALG_INTERNAL, so it should not be picked up by other > algorithms and should only be invoked from mcryptd. OK I guess that's fine then. > Anyway,

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-18 Thread Tim Chen
On Thu, 2015-11-19 at 08:12 +0800, Herbert Xu wrote: > On Wed, Nov 18, 2015 at 07:58:56AM -0800, Tim Chen wrote: > > > > IPSec will invoke this multi-buffer encrypt with async request. > > The work is done in crypto daemon, so it wouldn't be in atomic > > context. But anyway, I'm okay with

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-18 Thread Herbert Xu
On Wed, Nov 18, 2015 at 07:58:56AM -0800, Tim Chen wrote: > > IPSec will invoke this multi-buffer encrypt with async request. > The work is done in crypto daemon, so it wouldn't be in atomic > context. But anyway, I'm okay with switching to ablkcipher walk, > as long as it doesn't incur too much

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-18 Thread Tim Chen
On Wed, 2015-11-18 at 13:06 +0800, Herbert Xu wrote: > On Tue, Nov 17, 2015 at 04:30:14PM -0800, Tim Chen wrote: > > On Wed, 2015-11-18 at 08:07 +0800, Herbert Xu wrote: > > > On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > > > > > > > Herbert, would you prefer me to use ablkcipher

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-18 Thread Tim Chen
On Wed, 2015-11-18 at 13:06 +0800, Herbert Xu wrote: > On Tue, Nov 17, 2015 at 04:30:14PM -0800, Tim Chen wrote: > > On Wed, 2015-11-18 at 08:07 +0800, Herbert Xu wrote: > > > On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > > > > > > > Herbert, would you prefer me to use ablkcipher

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-18 Thread Tim Chen
On Thu, 2015-11-19 at 08:12 +0800, Herbert Xu wrote: > On Wed, Nov 18, 2015 at 07:58:56AM -0800, Tim Chen wrote: > > > > IPSec will invoke this multi-buffer encrypt with async request. > > The work is done in crypto daemon, so it wouldn't be in atomic > > context. But anyway, I'm okay with

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-18 Thread Herbert Xu
On Wed, Nov 18, 2015 at 07:58:56AM -0800, Tim Chen wrote: > > IPSec will invoke this multi-buffer encrypt with async request. > The work is done in crypto daemon, so it wouldn't be in atomic > context. But anyway, I'm okay with switching to ablkcipher walk, > as long as it doesn't incur too much

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Herbert Xu
On Tue, Nov 17, 2015 at 04:30:14PM -0800, Tim Chen wrote: > On Wed, 2015-11-18 at 08:07 +0800, Herbert Xu wrote: > > On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > > > > > Herbert, would you prefer me to use ablkcipher scatter walk instead, > > > assuming the overhead of both walk

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Tim Chen
On Wed, 2015-11-18 at 08:07 +0800, Herbert Xu wrote: > On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > > > Herbert, would you prefer me to use ablkcipher scatter walk instead, > > assuming the overhead of both walk are about the same? > > Well since you are going to potentially

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Herbert Xu
On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > Herbert, would you prefer me to use ablkcipher scatter walk instead, > assuming the overhead of both walk are about the same? Well since you are going to potentially sleep in the middle of an operation I'd think ablkcipher is required,

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Tim Chen
On Tue, 2015-11-17 at 21:06 +0800, Herbert Xu wrote: > On Thu, Oct 29, 2015 at 03:21:03PM -0700, Tim Chen wrote: > > > > c) Add support to crypto scatterwalk support that can sleep during > > encryption operation, as we may have buffers for jobs in data lanes > > that are half-finished, waiting

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Herbert Xu
On Thu, Oct 29, 2015 at 03:21:03PM -0700, Tim Chen wrote: > > c) Add support to crypto scatterwalk support that can sleep during > encryption operation, as we may have buffers for jobs in data lanes > that are half-finished, waiting for additional jobs to come to fill > empty lanes before we

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Herbert Xu
On Thu, Oct 29, 2015 at 03:21:03PM -0700, Tim Chen wrote: > > c) Add support to crypto scatterwalk support that can sleep during > encryption operation, as we may have buffers for jobs in data lanes > that are half-finished, waiting for additional jobs to come to fill > empty lanes before we

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Tim Chen
On Tue, 2015-11-17 at 21:06 +0800, Herbert Xu wrote: > On Thu, Oct 29, 2015 at 03:21:03PM -0700, Tim Chen wrote: > > > > c) Add support to crypto scatterwalk support that can sleep during > > encryption operation, as we may have buffers for jobs in data lanes > > that are half-finished, waiting

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Herbert Xu
On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > Herbert, would you prefer me to use ablkcipher scatter walk instead, > assuming the overhead of both walk are about the same? Well since you are going to potentially sleep in the middle of an operation I'd think ablkcipher is required,

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Tim Chen
On Wed, 2015-11-18 at 08:07 +0800, Herbert Xu wrote: > On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > > > Herbert, would you prefer me to use ablkcipher scatter walk instead, > > assuming the overhead of both walk are about the same? > > Well since you are going to potentially

Re: [PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-11-17 Thread Herbert Xu
On Tue, Nov 17, 2015 at 04:30:14PM -0800, Tim Chen wrote: > On Wed, 2015-11-18 at 08:07 +0800, Herbert Xu wrote: > > On Tue, Nov 17, 2015 at 02:59:29PM -0800, Tim Chen wrote: > > > > > > Herbert, would you prefer me to use ablkcipher scatter walk instead, > > > assuming the overhead of both walk

[PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-10-29 Thread Tim Chen
In this patch, the infrastructure needed to support multibuffer encryption implementation is added: a) Enhace mcryptd daemon to support blkcipher requests. b) Update configuration to include multi-buffer encryption build support. c) Add support to crypto scatterwalk support that can sleep

[PATCH v2 1/5] crypto: Multi-buffer encryptioin infrastructure support

2015-10-29 Thread Tim Chen
In this patch, the infrastructure needed to support multibuffer encryption implementation is added: a) Enhace mcryptd daemon to support blkcipher requests. b) Update configuration to include multi-buffer encryption build support. c) Add support to crypto scatterwalk support that can sleep