crypto: inside-secure - retry to proceed the request later on fail

The dequeueing function was putting back a request in the crypto queue
on failure (when not enough resources are available) which is not
perfect as the request will be handled much later. This patch updates
this logic by keeping a reference on the failed request to try
proceeding it later when enough resources are available.

Signed-off-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
Antoine Ténart
2017-12-14 15:26:57 +01:00
committed by Herbert Xu
parent 7f77f5a4fc
commit 8732b298fa
2 changed files with 30 additions and 10 deletions

View File

@@ -499,6 +499,12 @@ struct safexcel_crypto_priv {
/* The ring is currently handling at least one request */
bool busy;
/* Store for current requests when bailing out of the dequeueing
* function when no enough resources are available.
*/
struct crypto_async_request *req;
struct crypto_async_request *backlog;
} ring[EIP197_MAX_RINGS];
};