summaryrefslogtreecommitdiff
path: root/include/crypto/algapi.h
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2025-04-07 18:02:51 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2025-04-16 15:16:20 +0800
commit1451e3e561be9ff4e86b911b9367a2223275d16f (patch)
tree9cd79d3dad7848ca68dd5ab5867ec48d92ddfcc8 /include/crypto/algapi.h
parentb93336cd767fc266dcccfa034a1fb32ae1a23564 (diff)
crypto: api - Add helpers to manage request flags
Add helpers so that the ON_STACK request flag management is not duplicated all over the place. Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/algapi.h')
-rw-r--r--include/crypto/algapi.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/crypto/algapi.h b/include/crypto/algapi.h
index ede622ecefa8..6999e10ea09e 100644
--- a/include/crypto/algapi.h
+++ b/include/crypto/algapi.h
@@ -272,4 +272,9 @@ static inline bool crypto_tfm_req_chain(struct crypto_tfm *tfm)
return tfm->__crt_alg->cra_flags & CRYPTO_ALG_REQ_CHAIN;
}
+static inline u32 crypto_request_flags(struct crypto_async_request *req)
+{
+ return req->flags & ~CRYPTO_TFM_REQ_ON_STACK;
+}
+
#endif /* _CRYPTO_ALGAPI_H */