• Home
  • Raw
  • Download

Lines Matching refs:req

76 	struct skcipher_request req;  member
165 struct crypto_async_request *req, *backlog; in cryptd_queue_worker() local
173 req = crypto_dequeue_request(&cpu_queue->queue); in cryptd_queue_worker()
176 if (!req) in cryptd_queue_worker()
181 req->complete(req, 0); in cryptd_queue_worker()
240 static void cryptd_skcipher_complete(struct skcipher_request *req, int err) in cryptd_skcipher_complete() argument
242 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_complete()
244 struct cryptd_skcipher_request_ctx *rctx = skcipher_request_ctx(req); in cryptd_skcipher_complete()
248 rctx->complete(&req->base, err); in cryptd_skcipher_complete()
258 struct skcipher_request *req = skcipher_request_cast(base); in cryptd_skcipher_encrypt() local
259 struct cryptd_skcipher_request_ctx *rctx = skcipher_request_ctx(req); in cryptd_skcipher_encrypt()
260 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_encrypt()
262 struct skcipher_request *subreq = &rctx->req; in cryptd_skcipher_encrypt()
271 skcipher_request_set_crypt(subreq, req->src, req->dst, req->cryptlen, in cryptd_skcipher_encrypt()
272 req->iv); in cryptd_skcipher_encrypt()
277 req->base.complete = rctx->complete; in cryptd_skcipher_encrypt()
280 cryptd_skcipher_complete(req, err); in cryptd_skcipher_encrypt()
286 struct skcipher_request *req = skcipher_request_cast(base); in cryptd_skcipher_decrypt() local
287 struct cryptd_skcipher_request_ctx *rctx = skcipher_request_ctx(req); in cryptd_skcipher_decrypt()
288 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_decrypt()
290 struct skcipher_request *subreq = &rctx->req; in cryptd_skcipher_decrypt()
299 skcipher_request_set_crypt(subreq, req->src, req->dst, req->cryptlen, in cryptd_skcipher_decrypt()
300 req->iv); in cryptd_skcipher_decrypt()
305 req->base.complete = rctx->complete; in cryptd_skcipher_decrypt()
308 cryptd_skcipher_complete(req, err); in cryptd_skcipher_decrypt()
311 static int cryptd_skcipher_enqueue(struct skcipher_request *req, in cryptd_skcipher_enqueue() argument
314 struct cryptd_skcipher_request_ctx *rctx = skcipher_request_ctx(req); in cryptd_skcipher_enqueue()
315 struct crypto_skcipher *tfm = crypto_skcipher_reqtfm(req); in cryptd_skcipher_enqueue()
319 rctx->complete = req->base.complete; in cryptd_skcipher_enqueue()
320 req->base.complete = compl; in cryptd_skcipher_enqueue()
322 return cryptd_enqueue_request(queue, &req->base); in cryptd_skcipher_enqueue()
325 static int cryptd_skcipher_encrypt_enqueue(struct skcipher_request *req) in cryptd_skcipher_encrypt_enqueue() argument
327 return cryptd_skcipher_enqueue(req, cryptd_skcipher_encrypt); in cryptd_skcipher_encrypt_enqueue()
330 static int cryptd_skcipher_decrypt_enqueue(struct skcipher_request *req) in cryptd_skcipher_decrypt_enqueue() argument
332 return cryptd_skcipher_enqueue(req, cryptd_skcipher_decrypt); in cryptd_skcipher_decrypt_enqueue()
464 static int cryptd_hash_enqueue(struct ahash_request *req, in cryptd_hash_enqueue() argument
467 struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req); in cryptd_hash_enqueue()
468 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_enqueue()
472 rctx->complete = req->base.complete; in cryptd_hash_enqueue()
473 req->base.complete = compl; in cryptd_hash_enqueue()
475 return cryptd_enqueue_request(queue, &req->base); in cryptd_hash_enqueue()
478 static void cryptd_hash_complete(struct ahash_request *req, int err) in cryptd_hash_complete() argument
480 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_complete()
482 struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req); in cryptd_hash_complete()
486 rctx->complete(&req->base, err); in cryptd_hash_complete()
497 struct ahash_request *req = ahash_request_cast(req_async); in cryptd_hash_init() local
498 struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req); in cryptd_hash_init()
508 req->base.complete = rctx->complete; in cryptd_hash_init()
511 cryptd_hash_complete(req, err); in cryptd_hash_init()
514 static int cryptd_hash_init_enqueue(struct ahash_request *req) in cryptd_hash_init_enqueue() argument
516 return cryptd_hash_enqueue(req, cryptd_hash_init); in cryptd_hash_init_enqueue()
521 struct ahash_request *req = ahash_request_cast(req_async); in cryptd_hash_update() local
524 rctx = ahash_request_ctx(req); in cryptd_hash_update()
529 err = shash_ahash_update(req, &rctx->desc); in cryptd_hash_update()
531 req->base.complete = rctx->complete; in cryptd_hash_update()
534 cryptd_hash_complete(req, err); in cryptd_hash_update()
537 static int cryptd_hash_update_enqueue(struct ahash_request *req) in cryptd_hash_update_enqueue() argument
539 return cryptd_hash_enqueue(req, cryptd_hash_update); in cryptd_hash_update_enqueue()
544 struct ahash_request *req = ahash_request_cast(req_async); in cryptd_hash_final() local
545 struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req); in cryptd_hash_final()
550 err = crypto_shash_final(&rctx->desc, req->result); in cryptd_hash_final()
552 req->base.complete = rctx->complete; in cryptd_hash_final()
555 cryptd_hash_complete(req, err); in cryptd_hash_final()
558 static int cryptd_hash_final_enqueue(struct ahash_request *req) in cryptd_hash_final_enqueue() argument
560 return cryptd_hash_enqueue(req, cryptd_hash_final); in cryptd_hash_final_enqueue()
565 struct ahash_request *req = ahash_request_cast(req_async); in cryptd_hash_finup() local
566 struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req); in cryptd_hash_finup()
571 err = shash_ahash_finup(req, &rctx->desc); in cryptd_hash_finup()
573 req->base.complete = rctx->complete; in cryptd_hash_finup()
576 cryptd_hash_complete(req, err); in cryptd_hash_finup()
579 static int cryptd_hash_finup_enqueue(struct ahash_request *req) in cryptd_hash_finup_enqueue() argument
581 return cryptd_hash_enqueue(req, cryptd_hash_finup); in cryptd_hash_finup_enqueue()
588 struct ahash_request *req = ahash_request_cast(req_async); in cryptd_hash_digest() local
589 struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req); in cryptd_hash_digest()
597 err = shash_ahash_digest(req, desc); in cryptd_hash_digest()
599 req->base.complete = rctx->complete; in cryptd_hash_digest()
602 cryptd_hash_complete(req, err); in cryptd_hash_digest()
605 static int cryptd_hash_digest_enqueue(struct ahash_request *req) in cryptd_hash_digest_enqueue() argument
607 return cryptd_hash_enqueue(req, cryptd_hash_digest); in cryptd_hash_digest_enqueue()
610 static int cryptd_hash_export(struct ahash_request *req, void *out) in cryptd_hash_export() argument
612 struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req); in cryptd_hash_export()
617 static int cryptd_hash_import(struct ahash_request *req, const void *in) in cryptd_hash_import() argument
619 struct crypto_ahash *tfm = crypto_ahash_reqtfm(req); in cryptd_hash_import()
621 struct shash_desc *desc = cryptd_shash_desc(req); in cryptd_hash_import()
714 static void cryptd_aead_crypt(struct aead_request *req, in cryptd_aead_crypt() argument
717 int (*crypt)(struct aead_request *req)) in cryptd_aead_crypt() argument
725 rctx = aead_request_ctx(req); in cryptd_aead_crypt()
728 tfm = crypto_aead_reqtfm(req); in cryptd_aead_crypt()
732 aead_request_set_tfm(req, child); in cryptd_aead_crypt()
733 err = crypt( req ); in cryptd_aead_crypt()
740 compl(&req->base, err); in cryptd_aead_crypt()
751 struct aead_request *req; in cryptd_aead_encrypt() local
753 req = container_of(areq, struct aead_request, base); in cryptd_aead_encrypt()
754 cryptd_aead_crypt(req, child, err, crypto_aead_alg(child)->encrypt); in cryptd_aead_encrypt()
761 struct aead_request *req; in cryptd_aead_decrypt() local
763 req = container_of(areq, struct aead_request, base); in cryptd_aead_decrypt()
764 cryptd_aead_crypt(req, child, err, crypto_aead_alg(child)->decrypt); in cryptd_aead_decrypt()
767 static int cryptd_aead_enqueue(struct aead_request *req, in cryptd_aead_enqueue() argument
770 struct cryptd_aead_request_ctx *rctx = aead_request_ctx(req); in cryptd_aead_enqueue()
771 struct crypto_aead *tfm = crypto_aead_reqtfm(req); in cryptd_aead_enqueue()
774 rctx->complete = req->base.complete; in cryptd_aead_enqueue()
775 req->base.complete = compl; in cryptd_aead_enqueue()
776 return cryptd_enqueue_request(queue, &req->base); in cryptd_aead_enqueue()
779 static int cryptd_aead_encrypt_enqueue(struct aead_request *req) in cryptd_aead_encrypt_enqueue() argument
781 return cryptd_aead_enqueue(req, cryptd_aead_encrypt ); in cryptd_aead_encrypt_enqueue()
784 static int cryptd_aead_decrypt_enqueue(struct aead_request *req) in cryptd_aead_decrypt_enqueue() argument
786 return cryptd_aead_enqueue(req, cryptd_aead_decrypt ); in cryptd_aead_decrypt_enqueue()
990 struct shash_desc *cryptd_shash_desc(struct ahash_request *req) in cryptd_shash_desc() argument
992 struct cryptd_hash_request_ctx *rctx = ahash_request_ctx(req); in cryptd_shash_desc()