From: "Horia Geantă" <horia.geanta@nxp.com>
To: Gaurav Jain <gaurav.jain@nxp.com>,
Pankaj Gupta <pankaj.gupta@nxp.com>,
Varun Sethi <V.Sethi@nxp.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S . Miller" <davem@davemloft.net>,
Iuliana Prodan <iuliana.prodan@nxp.com>
Cc: "linux-crypto@vger.kernel.org" <linux-crypto@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
dl-linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH] crypto: caam: fix descriptor error when create ext4 fs on the device-mapper device
Date: Thu, 18 Nov 2021 09:57:46 +0200 [thread overview]
Message-ID: <78f35c6d-c7b5-f5c7-b658-00aac28674a5@nxp.com> (raw)
In-Reply-To: <20211109095105.203960-1-gaurav.jain@nxp.com>
On 11/9/2021 11:51 AM, Gaurav Jain wrote:
> Root cause:
> When caam queue is full (-ENOSPC), caam frees descriptor memory.
> crypto-engine checks if retry support is true and h/w queue
> is full(-ENOSPC), then requeue the crypto request.
> During processing the requested descriptor again, caam gives below error.
> (caam_jr 30902000.jr: 40000006: DECO: desc idx 0: Invalid KEY Command).
>
> This patch adds a check to return when caam input ring is full
> and retry support is true. so descriptor memory is not freed
> and requeued request can be processed again.
>
This approach is fine for a fix, to keep it small.
IMO it would be better to modify caam driver to use the crypto_engine callbacks
(prepare_request, unprepare_request).
> Fixes: 2d653936eb2cf ("crypto: caam - enable crypto-engine retry mechanism")
> Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
> Reviewed-by: Horia Geantă <horia.geanta@nxp.com>
Initial upstream patch submission should not carry the R-b tags gathered
during internal reviews.
Patch looks good, thanks.
However the subject should change to something more generic,
given the root cause.
Horia
prev parent reply other threads:[~2021-11-18 7:57 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-09 9:51 Gaurav Jain
2021-11-18 7:57 ` Horia Geantă [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=78f35c6d-c7b5-f5c7-b658-00aac28674a5@nxp.com \
--to=horia.geanta@nxp.com \
--cc=V.Sethi@nxp.com \
--cc=davem@davemloft.net \
--cc=gaurav.jain@nxp.com \
--cc=herbert@gondor.apana.org.au \
--cc=iuliana.prodan@nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pankaj.gupta@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®