Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp5239573ybl; Tue, 14 Jan 2020 05:54:18 -0800 (PST) X-Google-Smtp-Source: APXvYqxDdPpooPvhF93jMMbJG4thIXOpV6dEchmpnMKudx9v/cpNAnrMiz/1NxnhM4VSbuORUDz+ X-Received: by 2002:a05:6830:14d9:: with SMTP id t25mr17510878otq.258.1579010058452; Tue, 14 Jan 2020 05:54:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579010058; cv=none; d=google.com; s=arc-20160816; b=Aqy2LIibABrxWbzAguz7ykLxajv8SRtJ0qQ0LTGOPDrhqhK/QfagRseX2S+VFIScRj cnJ+k4Y8JCvnjWshRpA3UhYcz7Ejo1T/mz/VXnDsvrcMLYdcFsEI8tSM61dMzQVyxBZ4 HP+D3A9ms8QbGnxsjA5MlY+J8ncqqeYov/l0t4okN+KofwVGrfpGjB0Q8GfLHYVFLBAW b6QD4LzRliUREoy3GpCu5M6BVCum9/N+9JtDe3vvXPO4T5ovoNt86Ov3XRTByH8ucc6B Ytg4lM4fckJU6l5Ca6Qwu5XAC8BUKkuR5WoW0gi2cpgj8iyqpJDrHWVwnyr4hGnq1NwI zVoA== 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:dkim-signature; bh=NG+zhbtnS25eEsQP2J1dL+HmOFUEElVQuvgkp4X4amQ=; b=ltsSS1AIVs9vTFTOuIG+07B/QrxRPzMr3T7a5Lc47mNqg1LFzr2DVK23+Xee4ZgxDL 1Rn4HvvovRMDjON1bJD8hpwkibl5o6g9m3+o2yFlyK5faz9FXCE42psowiiYNdI4r2NA LfeXgKUF+rba7Y6CPK8sX1QTDcbyJ7LnSJt+xVQ8+Z/kuRMm6A0any5n4Dk/TEuApBIs ZDf8OE6eajTuvjv4g0WoOb8z6xwgr2j+e/AFKVLrzyTHz1BRNbOMAgKrBSBmREpihP+A sXANvbuI4UDVhKhw9Dr08iLcGX9HnTBXJI9B+xlTHFxHUsox20aqb8J7UdBJyWqNm8LB BSrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=veQmBW9B; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z25si8365750oto.211.2020.01.14.05.54.00; Tue, 14 Jan 2020 05:54:18 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=veQmBW9B; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726106AbgANNx7 (ORCPT + 99 others); Tue, 14 Jan 2020 08:53:59 -0500 Received: from mail-wm1-f66.google.com ([209.85.128.66]:51933 "EHLO mail-wm1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725994AbgANNx7 (ORCPT ); Tue, 14 Jan 2020 08:53:59 -0500 Received: by mail-wm1-f66.google.com with SMTP id d73so13861523wmd.1; Tue, 14 Jan 2020 05:53:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=NG+zhbtnS25eEsQP2J1dL+HmOFUEElVQuvgkp4X4amQ=; b=veQmBW9BNI/uYnVnWk17UlaI7mThr5G1v8/RHR8cRChG9cNml5/AY2gRiy70xmgWWP ref+SQ1wixocTc0F0pIe0wBqJswcI4w13RqumQW59cFgOIMrG9lrXk4+sI5x7HGmG74H lFfM+QUyOzlGEcRsDN8TXNpt3DXrEg1yspZ8lGyomiY1Q11tqt4n7u1sns7A1P2MLlhg MIvVehDYRKfT3vAgG3VI7ZmjOcohxHFqbbmozYl6owCqSbyG3ck4doGgT81Lp+N3rjMT A1QN/4YwDb4ngtP/J7s9SFlREEo9uZA+AZM4dnE9nOQ9RVUxJs9GcI7eocT/cOs/M0yU jzeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=NG+zhbtnS25eEsQP2J1dL+HmOFUEElVQuvgkp4X4amQ=; b=b+BPK6LYv/8ohrC1fE0g8kWUFEnWSUzsQDcbWDsXAZDqhBNNFHwlLV8s2avgbLtZou Tsxe8M9qnhV1PT2UAgAAX//+F3LsXAmCSUBXddLWckslxZhWTsVIErh3wapwN40xYPEY 1esSYyZ/6WP7BBB1zFewwZ6gnvYJmFEmHanye7iD7a3aqf04/4kOIpbPd5qovHnUvabh e4Aj2bDHeNDttRYr8FOFT/H70FwG4EecDFBaOhG5gE8eNYLfXHwlzCXNbyb9af7NOXrd wv4T0WHPEJLEq1YYKE3U+/FziEUfOPeUxTvibJ2bzHGWbB/wH/8mK3dIvtY8sXGOTu1M jWJg== X-Gm-Message-State: APjAAAV4Z0Euq07xb8YAA+7eDAhoDj9ML7iXWcYgL1nI/ezZDFQyG3RC WKlpJ8BZQ3rS4QOOsFfV4znqJQ2t X-Received: by 2002:a1c:7205:: with SMTP id n5mr28002839wmc.9.1579010037888; Tue, 14 Jan 2020 05:53:57 -0800 (PST) Received: from Red ([2a01:cb1d:147:7200:2e56:dcff:fed2:c6d6]) by smtp.googlemail.com with ESMTPSA id o1sm19708771wrn.84.2020.01.14.05.53.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jan 2020 05:53:57 -0800 (PST) Date: Tue, 14 Jan 2020 14:53:54 +0100 From: Corentin Labbe To: Iuliana Prodan Cc: Herbert Xu , "baolin.wang@linaro.org" , Horia Geanta , Aymen Sghaier , "David S. Miller" , "linux-crypto@vger.kernel.org" , "linux-kernel@vger.kernel.org" , dl-linux-imx , Silvano Di Ninno Subject: Re: [PATCH v2 09/10] crypto: caam - add crypto_engine support for RSA algorithms Message-ID: <20200114135354.GA3088@Red> References: <1578013373-1956-1-git-send-email-iuliana.prodan@nxp.com> <1578013373-1956-10-git-send-email-iuliana.prodan@nxp.com> <20200114001440.baeadihvlqiucw63@gondor.apana.org.au> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, Jan 14, 2020 at 10:40:53AM +0000, Iuliana Prodan wrote: > On 1/14/2020 2:14 AM, Herbert Xu wrote: > > On Mon, Jan 13, 2020 at 09:48:11AM +0000, Iuliana Prodan wrote: > >> > >> Regarding the transfer request to crypto-engine: if sending all requests > >> to crypto-engine, multibuffer tests, for non-backlogging requests fail > >> after only 10 requests, since crypto-engine queue has 10 entries. > > > > That isn't right. The crypto engine should never refuse to accept > > a request > Crypto-engine accepts all request that have the backlog flag, the > non-backlog are accepted till the configured limit (of 10). > > > unless the hardware queue is really full. > Crypto-engine doesn't check the status of hardware queue. > The non-backlog requests are dropped after 10 entries. > > > Perhaps the > > crypto engine code needs to be fixed? > To me, crypto-engine seems to be made for backlogged request, that's why > I'm sending the non-backlog directly to CAAM. The implicit serialization > of request in crypto-engine is the bottleneck. > > But, as I said before, I want to update crypto-engine to set queue > length when initialize crypto-engine, and remove serialization of > requests in crypto-engine by adding knowledge about the underlying hw > accelerator (number of request that can be processed in parallel). > I'll send a RFC with my proposal for crypto-engine enhancements. > > But, until then, I would like to have a backlogging solution in CAAM driver. > Hello I have already something for queue length and processing in parallel. I will send it soon. Regards