[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <C440BA31B54DCD4AAC682D2365C8FEE703CABA2C@ORSMSX111.amr.corp.intel.com>
Date: Mon, 13 Jun 2016 19:10:26 +0000
From: "Dey, Megha" <megha.dey@...el.com>
To: Herbert Xu <herbert@...dor.apana.org.au>
CC: "tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"linux-crypto@...r.kernel.org" <linux-crypto@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"Yu, Fenghua" <fenghua.yu@...el.com>,
"Megha Dey" <megha.dey@...ux.intel.com>
Subject: RE: [PATCH] crypto : async implementation for sha1-mb
-----Original Message-----
From: Herbert Xu [mailto:herbert@...dor.apana.org.au]
Sent: Monday, June 13, 2016 1:22 AM
To: Dey, Megha <megha.dey@...el.com>
Cc: tim.c.chen@...ux.intel.com; davem@...emloft.net; linux-crypto@...r.kernel.org; linux-kernel@...r.kernel.org; Yu, Fenghua <fenghua.yu@...el.com>; Megha Dey <megha.dey@...ux.intel.com>
Subject: Re: [PATCH] crypto : async implementation for sha1-mb
On Tue, Jun 07, 2016 at 11:14:42AM -0700, Megha Dey wrote:
>
> - desc->tfm = child;
> - desc->flags = CRYPTO_TFM_REQ_MAY_SLEEP;
> + ahash_request_set_tfm(desc, child);
> + ahash_request_set_callback(desc, CRYPTO_TFM_REQ_MAY_SLEEP, NULL,
> +NULL);
Why are the callbacks set to NULL/NULL? The child is async so you should have a valid callback function here.
Instead of continuing to do the broken callback handling outside of the API (i.e., rctx->complete) please use the API mechanism that is provided for this purpose.
> In the current implementation, the inner algorithm is called directly, and we use the outer algorithm's callback. We do not use the callback in inner algorithm. We are actually calling the child functions directly and the child is using the parent's call back function. Probably I can add a comment before the set callback function.. will this be ok?
Thanks,
--
Email: Herbert Xu <herbert@...dor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists