Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754584AbeALHP1 (ORCPT + 1 other); Fri, 12 Jan 2018 02:15:27 -0500 Received: from [128.1.224.119] ([128.1.224.119]:54424 "EHLO ringil.hmeau.com" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754420AbeALHPX (ORCPT ); Fri, 12 Jan 2018 02:15:23 -0500 Date: Fri, 12 Jan 2018 18:14:44 +1100 From: Herbert Xu To: Corentin Labbe Cc: alexandre.torgue@st.com, arei.gonglei@huawei.com, corbet@lwn.net, davem@davemloft.net, jasowang@redhat.com, mcoquelin.stm32@gmail.com, mst@redhat.com, linux-arm-kernel@lists.infradead.org, linux-crypto@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, fabien.dessenne@st.com Subject: Re: [PATCH 2/6] crypto: engine - Permit to enqueue all async requests Message-ID: <20180112071444.GA18698@gondor.apana.org.au> References: <20180103201109.16077-1-clabbe.montjoie@gmail.com> <20180103201109.16077-3-clabbe.montjoie@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180103201109.16077-3-clabbe.montjoie@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Wed, Jan 03, 2018 at 09:11:05PM +0100, Corentin Labbe wrote: > The crypto engine could actually only enqueue hash and ablkcipher request. > This patch permit it to enqueue any type of crypto_async_request. > > Signed-off-by: Corentin Labbe > --- > crypto/crypto_engine.c | 230 ++++++++++++++++++++++++------------------------ > include/crypto/engine.h | 59 +++++++------ > 2 files changed, 148 insertions(+), 141 deletions(-) > > diff --git a/crypto/crypto_engine.c b/crypto/crypto_engine.c > index 61e7c4e02fd2..036270b61648 100644 > --- a/crypto/crypto_engine.c > +++ b/crypto/crypto_engine.c > @@ -15,7 +15,6 @@ > #include > #include > #include > -#include > #include > #include "internal.h" > > @@ -34,11 +33,10 @@ static void crypto_pump_requests(struct crypto_engine *engine, > bool in_kthread) > { > struct crypto_async_request *async_req, *backlog; > - struct ahash_request *hreq; > - struct ablkcipher_request *breq; > unsigned long flags; > bool was_busy = false; > - int ret, rtype; > + int ret; > + struct crypto_engine_reqctx *enginectx; This all looks very good. Just one minor nit, since you're storing this in the tfm ctx as opposed to the request ctx (which is indeed an improvement), you should remove the "req" from its name. Thanks! -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt