Lines Matching refs:req
147 typedef void (*crypto_completion_t)(struct crypto_async_request *req, int err);
284 int (*encrypt)(struct ablkcipher_request *req);
285 int (*decrypt)(struct ablkcipher_request *req);
286 int (*givencrypt)(struct skcipher_givcrypt_request *req);
287 int (*givdecrypt)(struct skcipher_givcrypt_request *req);
326 int (*encrypt)(struct aead_request *req);
327 int (*decrypt)(struct aead_request *req);
328 int (*givencrypt)(struct aead_givcrypt_request *req);
329 int (*givdecrypt)(struct aead_givcrypt_request *req);
594 int (*encrypt)(struct ablkcipher_request *req);
595 int (*decrypt)(struct ablkcipher_request *req);
596 int (*givencrypt)(struct skcipher_givcrypt_request *req);
597 int (*givdecrypt)(struct skcipher_givcrypt_request *req);
608 int (*encrypt)(struct aead_request *req);
609 int (*decrypt)(struct aead_request *req);
610 int (*givencrypt)(struct aead_givcrypt_request *req);
611 int (*givdecrypt)(struct aead_givcrypt_request *req);
1016 struct ablkcipher_request *req) in crypto_ablkcipher_reqtfm() argument
1018 return __crypto_ablkcipher_cast(req->base.tfm); in crypto_ablkcipher_reqtfm()
1032 static inline int crypto_ablkcipher_encrypt(struct ablkcipher_request *req) in crypto_ablkcipher_encrypt() argument
1035 crypto_ablkcipher_crt(crypto_ablkcipher_reqtfm(req)); in crypto_ablkcipher_encrypt()
1036 return crt->encrypt(req); in crypto_ablkcipher_encrypt()
1050 static inline int crypto_ablkcipher_decrypt(struct ablkcipher_request *req) in crypto_ablkcipher_decrypt() argument
1053 crypto_ablkcipher_crt(crypto_ablkcipher_reqtfm(req)); in crypto_ablkcipher_decrypt()
1054 return crt->decrypt(req); in crypto_ablkcipher_decrypt()
1089 struct ablkcipher_request *req, struct crypto_ablkcipher *tfm) in ablkcipher_request_set_tfm() argument
1091 req->base.tfm = crypto_ablkcipher_tfm(crypto_ablkcipher_crt(tfm)->base); in ablkcipher_request_set_tfm()
1095 struct crypto_async_request *req) in ablkcipher_request_cast() argument
1097 return container_of(req, struct ablkcipher_request, base); in ablkcipher_request_cast()
1115 struct ablkcipher_request *req; in ablkcipher_request_alloc() local
1117 req = kmalloc(sizeof(struct ablkcipher_request) + in ablkcipher_request_alloc()
1120 if (likely(req)) in ablkcipher_request_alloc()
1121 ablkcipher_request_set_tfm(req, tfm); in ablkcipher_request_alloc()
1123 return req; in ablkcipher_request_alloc()
1130 static inline void ablkcipher_request_free(struct ablkcipher_request *req) in ablkcipher_request_free() argument
1132 kzfree(req); in ablkcipher_request_free()
1161 struct ablkcipher_request *req, in ablkcipher_request_set_callback() argument
1164 req->base.complete = compl; in ablkcipher_request_set_callback()
1165 req->base.data = data; in ablkcipher_request_set_callback()
1166 req->base.flags = flags; in ablkcipher_request_set_callback()
1186 struct ablkcipher_request *req, in ablkcipher_request_set_crypt() argument
1190 req->src = src; in ablkcipher_request_set_crypt()
1191 req->dst = dst; in ablkcipher_request_set_crypt()
1192 req->nbytes = nbytes; in ablkcipher_request_set_crypt()
1193 req->info = iv; in ablkcipher_request_set_crypt()
1368 static inline struct crypto_aead *crypto_aead_reqtfm(struct aead_request *req) in crypto_aead_reqtfm() argument
1370 return __crypto_aead_cast(req->base.tfm); in crypto_aead_reqtfm()
1392 static inline int crypto_aead_encrypt(struct aead_request *req) in crypto_aead_encrypt() argument
1394 return crypto_aead_crt(crypto_aead_reqtfm(req))->encrypt(req); in crypto_aead_encrypt()
1419 static inline int crypto_aead_decrypt(struct aead_request *req) in crypto_aead_decrypt() argument
1421 if (req->cryptlen < crypto_aead_authsize(crypto_aead_reqtfm(req))) in crypto_aead_decrypt()
1424 return crypto_aead_crt(crypto_aead_reqtfm(req))->decrypt(req); in crypto_aead_decrypt()
1457 static inline void aead_request_set_tfm(struct aead_request *req, in aead_request_set_tfm() argument
1460 req->base.tfm = crypto_aead_tfm(crypto_aead_crt(tfm)->base); in aead_request_set_tfm()
1478 struct aead_request *req; in aead_request_alloc() local
1480 req = kmalloc(sizeof(*req) + crypto_aead_reqsize(tfm), gfp); in aead_request_alloc()
1482 if (likely(req)) in aead_request_alloc()
1483 aead_request_set_tfm(req, tfm); in aead_request_alloc()
1485 return req; in aead_request_alloc()
1492 static inline void aead_request_free(struct aead_request *req) in aead_request_free() argument
1494 kzfree(req); in aead_request_free()
1522 static inline void aead_request_set_callback(struct aead_request *req, in aead_request_set_callback() argument
1527 req->base.complete = compl; in aead_request_set_callback()
1528 req->base.data = data; in aead_request_set_callback()
1529 req->base.flags = flags; in aead_request_set_callback()
1562 static inline void aead_request_set_crypt(struct aead_request *req, in aead_request_set_crypt() argument
1567 req->src = src; in aead_request_set_crypt()
1568 req->dst = dst; in aead_request_set_crypt()
1569 req->cryptlen = cryptlen; in aead_request_set_crypt()
1570 req->iv = iv; in aead_request_set_crypt()
1582 static inline void aead_request_set_assoc(struct aead_request *req, in aead_request_set_assoc() argument
1586 req->assoc = assoc; in aead_request_set_assoc()
1587 req->assoclen = assoclen; in aead_request_set_assoc()