summaryrefslogtreecommitdiff
path: root/include/crypto
diff options
context:
space:
mode:
authorIuliana Prodan <iuliana.prodan@nxp.com>2020-04-28 18:49:03 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-05-08 15:30:40 +1000
commitec6e2bf33b54cc3351bd702452e5d016b8f9d2f4 (patch)
tree66e745497119d160bcbcbaadf806f8515e72f223 /include/crypto
parent3e37f04f2bf3dd86432785e15182793a8a8ef00e (diff)
crypto: algapi - create function to add request in front of queue
Add crypto_enqueue_request_head function that enqueues a request in front of queue. This will be used in crypto-engine, on error path. In case a request was not executed by hardware, enqueue it back in front of queue (to keep the order of requests). Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto')
-rw-r--r--include/crypto/algapi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index e115f9215ed5..00a9cf98debe 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -125,6 +125,8 @@ int crypto_inst_setname(struct crypto_instance *inst, const char *name,
void crypto_init_queue(struct crypto_queue *queue, unsigned int max_qlen);
int crypto_enqueue_request(struct crypto_queue *queue,
struct crypto_async_request *request);
+void crypto_enqueue_request_head(struct crypto_queue *queue,
+ struct crypto_async_request *request);
struct crypto_async_request *crypto_dequeue_request(struct crypto_queue *queue);
static inline unsigned int crypto_queue_len(struct crypto_queue *queue)
{