Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3472606ybl; Tue, 21 Jan 2020 01:11:44 -0800 (PST) X-Google-Smtp-Source: APXvYqwNx3fObVpsiAC4vnE0N1O/GXeeQl5tjtgu39Dt6ZG67gRvhzr5iUCxcDXYeDv7bv9GqBJZ X-Received: by 2002:a9d:7592:: with SMTP id s18mr2936364otk.130.1579597904045; Tue, 21 Jan 2020 01:11:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579597904; cv=none; d=google.com; s=arc-20160816; b=ycUJkbTCQQUf3Exw/JCO9hepD94zqkkLaQn8C/rZmX8McXtJ5DN6bLtyt43xCTUCH6 RMQXDzG2kM8AQE1wcRVs/Tcy9CnF68A4I2TXqKtRlags+ho80Chw9B4J5et6JR8DjLi6 GnItXTFfQByBmQ1qPlN2NXrn37DDSBP8gj7EUwMsjY4ctc0Ag4wLctb+7xTw5C5oxBRw NhWJxuE9eeUVYlJMM1ohBGUOZDZPpFsr6NoyoHUDtnr9UwhD0xOZaF37A8MeAVs8pJPv Ov129+AxYZsmlAUWyh6Ef/IOk/TyVRykVnuKZbQpUZLpyd5kqX2Lw/Ewt5VVCNd0UQ6G gCuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Z/WCE+/NFnojxk9xllFGPvFVYM4B9h+MOBq7hc3/KKw=; b=GoiBdbGI9A/DsLDHsWL1xcm32Q9nu0heNUmRGk6Bdp7XKdqMKOXbU/RhD5cIAgAQZs Py/1L9Pa9zopPYXq8fMZZjZ3TxzSl95Xz7ATE2ZxiETHuCywOa0o2mTfNmnwkS5ki47t K1Pq9c5vfZS+TCWXZXVyhmPWBcxDuRq+yNPHId1//b/wVehPSSFwyMma8ELLFnUpah5t QAUjAyH0PbRx+V5Rt1TSY7f0HO6MO0Hn1DygbKTfwEq/5kMY+JFsaNiM4gj19FnfB/uS EH1PIrpvIkmbi1JUzLu0jRCCv1DWLBJ+DAhTW+494k6idBnSf1YmowO3oDDIaWLiNPlK zxJw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si21659392otq.217.2020.01.21.01.11.20; Tue, 21 Jan 2020 01:11:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-crypto-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728890AbgAUJLT (ORCPT + 99 others); Tue, 21 Jan 2020 04:11:19 -0500 Received: from helcar.hmeau.com ([216.24.177.18]:37564 "EHLO deadmen.hmeau.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728456AbgAUJLT (ORCPT ); Tue, 21 Jan 2020 04:11:19 -0500 Received: from gondobar.mordor.me.apana.org.au ([192.168.128.4] helo=gondobar) by deadmen.hmeau.com with esmtps (Exim 4.89 #2 (Debian)) id 1itpYy-0006iC-Rf; Tue, 21 Jan 2020 17:11:08 +0800 Received: from herbert by gondobar with local (Exim 4.89) (envelope-from ) id 1itpYt-0001Tc-1v; Tue, 21 Jan 2020 17:11:03 +0800 Date: Tue, 21 Jan 2020 17:11:03 +0800 From: Herbert Xu To: Iuliana Prodan Cc: Baolin Wang , Ard Biesheuvel , Corentin Labbe , Horia Geanta , Maxime Coquelin , Alexandre Torgue , Maxime Ripard , Aymen Sghaier , "David S. Miller" , Silvano Di Ninno , Franck Lenormand , linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org, linux-imx Subject: Re: [RFC PATCH] Crypto-engine support for parallel requests Message-ID: <20200121091102.magzogr7tnj6joqm@gondor.apana.org.au> References: <1579563149-3678-1-git-send-email-iuliana.prodan@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1579563149-3678-1-git-send-email-iuliana.prodan@nxp.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Jan 21, 2020 at 01:32:29AM +0200, Iuliana Prodan wrote: > > + if (engine->no_reqs < engine->max_no_reqs) > + goto retry; We should not hard-code this number into the engine. Instead, we should just let the driver tell us when it is ready to accept more requests. Perhaps we should add a new function for drivers that wish to support this that would accept a list of requests instead of a single one. It would then process as many requests as it can from that list and only return either when the list is exhausted or when it can't process any more requests. Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt