diff options
| author | Herbert Xu <herbert@gondor.apana.org.au> | 2025-02-16 06:07:17 +0300 |
|---|---|---|
| committer | Herbert Xu <herbert@gondor.apana.org.au> | 2025-02-22 11:01:53 +0300 |
| commit | f2ffe5a9183d22eec718edac03e8bfcedf4dee70 (patch) | |
| tree | d95008613680404dacc0384499b58dc6a224c8fd /include/crypto/internal | |
| parent | f407764621220ffad3df6c589efc4b4ac010d3d5 (diff) | |
| download | linux-f2ffe5a9183d22eec718edac03e8bfcedf4dee70.tar.xz | |
crypto: hash - Add request chaining API
This adds request chaining to the ahash interface. Request chaining
allows multiple requests to be submitted in one shot. An algorithm
can elect to receive chained requests by setting the flag
CRYPTO_ALG_REQ_CHAIN. If this bit is not set, the API will break
up chained requests and submit them one-by-one.
A new err field is added to struct crypto_async_request to record
the return value for each individual request.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'include/crypto/internal')
| -rw-r--r-- | include/crypto/internal/hash.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/crypto/internal/hash.h b/include/crypto/internal/hash.h index 84da3424decc..36425ecd2c37 100644 --- a/include/crypto/internal/hash.h +++ b/include/crypto/internal/hash.h @@ -247,5 +247,15 @@ static inline struct crypto_shash *__crypto_shash_cast(struct crypto_tfm *tfm) return container_of(tfm, struct crypto_shash, base); } +static inline bool ahash_request_chained(struct ahash_request *req) +{ + return crypto_request_chained(&req->base); +} + +static inline bool crypto_ahash_req_chain(struct crypto_ahash *tfm) +{ + return crypto_tfm_req_chain(&tfm->base); +} + #endif /* _CRYPTO_INTERNAL_HASH_H */ |
