Lines Matching refs:req
477 static void tcrypt_complete(struct crypto_async_request *req, int err) in tcrypt_complete() argument
479 struct tcrypt_result *res = req->data; in tcrypt_complete()
488 static inline int do_one_ahash_op(struct ahash_request *req, int ret) in do_one_ahash_op() argument
491 struct tcrypt_result *tr = req->base.data; in do_one_ahash_op()
501 static int test_ahash_jiffies_digest(struct ahash_request *req, int blen, in test_ahash_jiffies_digest() argument
510 ret = do_one_ahash_op(req, crypto_ahash_digest(req)); in test_ahash_jiffies_digest()
521 static int test_ahash_jiffies(struct ahash_request *req, int blen, in test_ahash_jiffies() argument
529 return test_ahash_jiffies_digest(req, blen, out, sec); in test_ahash_jiffies()
533 ret = crypto_ahash_init(req); in test_ahash_jiffies()
537 ret = do_one_ahash_op(req, crypto_ahash_update(req)); in test_ahash_jiffies()
542 ret = do_one_ahash_op(req, crypto_ahash_final(req)); in test_ahash_jiffies()
553 static int test_ahash_cycles_digest(struct ahash_request *req, int blen, in test_ahash_cycles_digest() argument
561 ret = do_one_ahash_op(req, crypto_ahash_digest(req)); in test_ahash_cycles_digest()
572 ret = do_one_ahash_op(req, crypto_ahash_digest(req)); in test_ahash_cycles_digest()
591 static int test_ahash_cycles(struct ahash_request *req, int blen, in test_ahash_cycles() argument
598 return test_ahash_cycles_digest(req, blen, out); in test_ahash_cycles()
602 ret = crypto_ahash_init(req); in test_ahash_cycles()
606 ret = do_one_ahash_op(req, crypto_ahash_update(req)); in test_ahash_cycles()
610 ret = do_one_ahash_op(req, crypto_ahash_final(req)); in test_ahash_cycles()
621 ret = crypto_ahash_init(req); in test_ahash_cycles()
625 ret = do_one_ahash_op(req, crypto_ahash_update(req)); in test_ahash_cycles()
629 ret = do_one_ahash_op(req, crypto_ahash_final(req)); in test_ahash_cycles()
653 struct ahash_request *req; in test_ahash_speed() local
674 req = ahash_request_alloc(tfm, GFP_KERNEL); in test_ahash_speed()
675 if (!req) { in test_ahash_speed()
681 ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in test_ahash_speed()
695 ahash_request_set_crypt(req, sg, output, speed[i].plen); in test_ahash_speed()
698 ret = test_ahash_jiffies(req, speed[i].blen, in test_ahash_speed()
701 ret = test_ahash_cycles(req, speed[i].blen, in test_ahash_speed()
710 ahash_request_free(req); in test_ahash_speed()
716 static inline int do_one_acipher_op(struct ablkcipher_request *req, int ret) in do_one_acipher_op() argument
719 struct tcrypt_result *tr = req->base.data; in do_one_acipher_op()
730 static int test_acipher_jiffies(struct ablkcipher_request *req, int enc, in test_acipher_jiffies() argument
740 ret = do_one_acipher_op(req, in test_acipher_jiffies()
741 crypto_ablkcipher_encrypt(req)); in test_acipher_jiffies()
743 ret = do_one_acipher_op(req, in test_acipher_jiffies()
744 crypto_ablkcipher_decrypt(req)); in test_acipher_jiffies()
755 static int test_acipher_cycles(struct ablkcipher_request *req, int enc, in test_acipher_cycles() argument
765 ret = do_one_acipher_op(req, in test_acipher_cycles()
766 crypto_ablkcipher_encrypt(req)); in test_acipher_cycles()
768 ret = do_one_acipher_op(req, in test_acipher_cycles()
769 crypto_ablkcipher_decrypt(req)); in test_acipher_cycles()
781 ret = do_one_acipher_op(req, in test_acipher_cycles()
782 crypto_ablkcipher_encrypt(req)); in test_acipher_cycles()
784 ret = do_one_acipher_op(req, in test_acipher_cycles()
785 crypto_ablkcipher_decrypt(req)); in test_acipher_cycles()
810 struct ablkcipher_request *req; in test_acipher_speed() local
832 req = ablkcipher_request_alloc(tfm, GFP_KERNEL); in test_acipher_speed()
833 if (!req) { in test_acipher_speed()
839 ablkcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in test_acipher_speed()
903 ablkcipher_request_set_crypt(req, sg, sg, *b_size, iv); in test_acipher_speed()
906 ret = test_acipher_jiffies(req, enc, in test_acipher_speed()
909 ret = test_acipher_cycles(req, enc, in test_acipher_speed()
924 ablkcipher_request_free(req); in test_acipher_speed()