Re: [PATCH RESEND 2/2] crypto: algif - change algif_skcipher to be asynchronous

2015-03-09 Thread Tadeusz Struk
On 03/06/2015 04:09 AM, Herbert Xu wrote: It helps to make it faster. This way I can do some of the request setup beforehand and minimize overhead on the data path. Do you have numbers to back this up? Ok, you are right. It was implemented that way when I used the qat type socket, which

Re: [PATCH RESEND 2/2] crypto: algif - change algif_skcipher to be asynchronous

2015-03-06 Thread Herbert Xu
On Fri, Feb 27, 2015 at 11:35:49AM -0800, Tadeusz Struk wrote: +static int skcipher_mempool_create(struct sock *sk) +{ + struct alg_sock *ask = alg_sk(sk); + struct skcipher_ctx *ctx = ask-private; + unsigned int len = sizeof(struct skcipher_async_req) + +

Re: [PATCH RESEND 2/2] crypto: algif - change algif_skcipher to be asynchronous

2015-03-06 Thread Tadeusz Struk
On 03/06/2015 11:44 AM, Herbert Xu wrote: Are these separate caches really necessary? It looks like an overkill. What's wrong with just kmalloc? Hi Herbert, It helps to make it faster. This way I can do some of the request setup beforehand and minimize overhead on the data path. Thanks,

Re: [PATCH RESEND 2/2] crypto: algif - change algif_skcipher to be asynchronous

2015-03-06 Thread Herbert Xu
On Fri, Mar 06, 2015 at 12:04:49PM +, Tadeusz Struk wrote: It helps to make it faster. This way I can do some of the request setup beforehand and minimize overhead on the data path. Do you have numbers to back this up? Cheers, -- Email: Herbert Xu herb...@gondor.apana.org.au Home Page:

[PATCH RESEND 2/2] crypto: algif - change algif_skcipher to be asynchronous

2015-02-27 Thread Tadeusz Struk
The way the algif_skcipher works currently is that on sendmsg/sendpage it builds an sgl for the input data and then on read/recvmsg it sends the job for encryption putting the user to sleep till the data is processed. This way it can only handle one job at a given time. This patch changes it to be