From: Herbert Xu <herbert@gondor.apana.org.au>
To: Iuliana Prodan <iuliana.prodan@nxp.com>
Cc: Baolin Wang <baolin.wang@linaro.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Corentin Labbe <clabbe.montjoie@gmail.com>,
Horia Geanta <horia.geanta@nxp.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@st.com>,
Maxime Ripard <mripard@kernel.org>,
Aymen Sghaier <aymen.sghaier@nxp.com>,
"David S. Miller" <davem@davemloft.net>,
Silvano Di Ninno <silvano.dininno@nxp.com>,
Franck Lenormand <franck.lenormand@nxp.com>,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-imx <linux-imx@nxp.com>
Subject: Re: [PATCH v5 2/3] crypto: engine - support for parallel requests based on retry mechanism
Date: Thu, 23 Apr 2020 21:46:40 +1000 [thread overview]
Message-ID: <20200423114640.GA14399@gondor.apana.org.au> (raw)
In-Reply-To: <1586982375-18710-3-git-send-email-iuliana.prodan@nxp.com>
On Wed, Apr 15, 2020 at 11:26:14PM +0300, Iuliana Prodan wrote:
> Added support for executing multiple requests, in parallel,
> for crypto engine based on a retry mechanism.
> If hardware was unable to execute a backlog request, enqueue it
> back in front of crypto-engine queue, to keep the order
> of requests.
>
> A new variable is added, retry_support (this is to keep the
> backward compatibility of crypto-engine) , which keeps track
> whether the hardware has support for retry mechanism and,
> also, if can run multiple requests.
>
> If do_one_request() returns:
> >= 0: hardware executed the request successfully;
> < 0: this is the old error path. If hardware has support for retry
> mechanism, the request is put back in front of crypto-engine queue.
> For backwards compatibility, if the retry support is not available,
> the crypto-engine will work as before.
> Only MAY_BACKLOG requests are enqueued back into
> crypto-engine's queue, since the others can be dropped.
This looks a lot nicer!
However, I do have one little issue with the error case. I think
we should not lump all errors together. For queueing errors, we
should requeue regardless of MAY_BACKLOG. After all, we don't
want to have random packet loss just becayse the queue was full.
For other errors (e.g., a kmalloc error), we should requeue the
MAY_BACKLOG requests and drop everythin else.
Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
next prev parent reply other threads:[~2020-04-23 11:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-15 20:26 [PATCH v5 0/3] crypto: engine - support for parallel and batch requests Iuliana Prodan
2020-04-15 20:26 ` [PATCH v5 1/3] crypto: algapi - create function to add request in front of queue Iuliana Prodan
2020-04-15 20:26 ` [PATCH v5 2/3] crypto: engine - support for parallel requests based on retry mechanism Iuliana Prodan
2020-04-23 11:46 ` Herbert Xu [this message]
2020-04-24 14:34 ` Iuliana Prodan
2020-04-24 15:10 ` Herbert Xu
2020-04-15 20:26 ` [PATCH v5 3/3] crypto: engine - support for batch requests Iuliana Prodan
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=20200423114640.GA14399@gondor.apana.org.au \
--to=herbert@gondor.apana.org.au \
--cc=alexandre.torgue@st.com \
--cc=ard.biesheuvel@linaro.org \
--cc=aymen.sghaier@nxp.com \
--cc=baolin.wang@linaro.org \
--cc=clabbe.montjoie@gmail.com \
--cc=davem@davemloft.net \
--cc=franck.lenormand@nxp.com \
--cc=horia.geanta@nxp.com \
--cc=iuliana.prodan@nxp.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcoquelin.stm32@gmail.com \
--cc=mripard@kernel.org \
--cc=silvano.dininno@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;
as well as URLs for NNTP newsgroup(s).