[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200423114640.GA14399@gondor.apana.org.au>
Date: Thu, 23 Apr 2020 21:46:40 +1000
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Iuliana Prodan <iuliana.prodan@....com>
Cc: Baolin Wang <baolin.wang@...aro.org>,
Ard Biesheuvel <ard.biesheuvel@...aro.org>,
Corentin Labbe <clabbe.montjoie@...il.com>,
Horia Geanta <horia.geanta@....com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...com>,
Maxime Ripard <mripard@...nel.org>,
Aymen Sghaier <aymen.sghaier@....com>,
"David S. Miller" <davem@...emloft.net>,
Silvano Di Ninno <silvano.dininno@....com>,
Franck Lenormand <franck.lenormand@....com>,
linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-imx <linux-imx@....com>
Subject: Re: [PATCH v5 2/3] crypto: engine - support for parallel requests
based on retry mechanism
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@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists