Lines Matching refs:req
140 static inline int do_one_aead_op(struct aead_request *req, int ret) in do_one_aead_op() argument
142 struct crypto_wait *wait = req->base.data; in do_one_aead_op()
150 struct aead_request *req; member
165 rc[i] = crypto_aead_encrypt(data[i].req); in do_mult_aead_op()
167 rc[i] = crypto_aead_decrypt(data[i].req); in do_mult_aead_op()
316 data[i].req = aead_request_alloc(tfm, GFP_KERNEL); in test_mb_aead_speed()
317 if (!data[i].req) { in test_mb_aead_speed()
321 aead_request_free(data[i].req); in test_mb_aead_speed()
328 aead_request_set_callback(data[i].req, in test_mb_aead_speed()
390 aead_request_set_ad(cur->req, aad_size); in test_mb_aead_speed()
394 aead_request_set_crypt(cur->req, in test_mb_aead_speed()
398 ret = crypto_aead_encrypt(cur->req); in test_mb_aead_speed()
399 ret = do_one_aead_op(cur->req, ret); in test_mb_aead_speed()
408 aead_request_set_crypt(cur->req, cur->sg, in test_mb_aead_speed()
436 aead_request_free(data[i].req); in test_mb_aead_speed()
454 static int test_aead_jiffies(struct aead_request *req, int enc, in test_aead_jiffies() argument
464 ret = do_one_aead_op(req, crypto_aead_encrypt(req)); in test_aead_jiffies()
466 ret = do_one_aead_op(req, crypto_aead_decrypt(req)); in test_aead_jiffies()
477 static int test_aead_cycles(struct aead_request *req, int enc, int blen) in test_aead_cycles() argument
486 ret = do_one_aead_op(req, crypto_aead_encrypt(req)); in test_aead_cycles()
488 ret = do_one_aead_op(req, crypto_aead_decrypt(req)); in test_aead_cycles()
500 ret = do_one_aead_op(req, crypto_aead_encrypt(req)); in test_aead_cycles()
502 ret = do_one_aead_op(req, crypto_aead_decrypt(req)); in test_aead_cycles()
528 struct aead_request *req; in test_aead_speed() local
579 req = aead_request_alloc(tfm, GFP_KERNEL); in test_aead_speed()
580 if (!req) { in test_aead_speed()
586 aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in test_aead_speed()
637 aead_request_set_ad(req, aad_size); in test_aead_speed()
646 aead_request_set_crypt(req, sgout, sg, in test_aead_speed()
648 ret = do_one_aead_op(req, in test_aead_speed()
649 crypto_aead_encrypt(req)); in test_aead_speed()
658 aead_request_set_crypt(req, sg, sgout, in test_aead_speed()
663 ret = test_aead_jiffies(req, enc, *b_size, in test_aead_speed()
667 ret = test_aead_cycles(req, enc, *b_size); in test_aead_speed()
681 aead_request_free(req); in test_aead_speed()
707 static inline int do_one_ahash_op(struct ahash_request *req, int ret) in do_one_ahash_op() argument
709 struct crypto_wait *wait = req->base.data; in do_one_ahash_op()
717 struct ahash_request *req; member
729 rc[i] = crypto_ahash_digest(data[i].req); in do_mult_ahash_op()
837 data[i].req = ahash_request_alloc(tfm, GFP_KERNEL); in test_mb_ahash_speed()
838 if (!data[i].req) { in test_mb_ahash_speed()
844 ahash_request_set_callback(data[i].req, 0, crypto_req_done, in test_mb_ahash_speed()
872 ahash_request_set_crypt(data[k].req, data[k].sg, in test_mb_ahash_speed()
897 ahash_request_free(data[k].req); in test_mb_ahash_speed()
908 static int test_ahash_jiffies_digest(struct ahash_request *req, int blen, in test_ahash_jiffies_digest() argument
917 ret = do_one_ahash_op(req, crypto_ahash_digest(req)); in test_ahash_jiffies_digest()
928 static int test_ahash_jiffies(struct ahash_request *req, int blen, in test_ahash_jiffies() argument
936 return test_ahash_jiffies_digest(req, blen, out, secs); in test_ahash_jiffies()
940 ret = do_one_ahash_op(req, crypto_ahash_init(req)); in test_ahash_jiffies()
944 ret = do_one_ahash_op(req, crypto_ahash_update(req)); in test_ahash_jiffies()
949 ret = do_one_ahash_op(req, crypto_ahash_final(req)); in test_ahash_jiffies()
960 static int test_ahash_cycles_digest(struct ahash_request *req, int blen, in test_ahash_cycles_digest() argument
968 ret = do_one_ahash_op(req, crypto_ahash_digest(req)); in test_ahash_cycles_digest()
979 ret = do_one_ahash_op(req, crypto_ahash_digest(req)); in test_ahash_cycles_digest()
998 static int test_ahash_cycles(struct ahash_request *req, int blen, in test_ahash_cycles() argument
1005 return test_ahash_cycles_digest(req, blen, out); in test_ahash_cycles()
1009 ret = do_one_ahash_op(req, crypto_ahash_init(req)); in test_ahash_cycles()
1013 ret = do_one_ahash_op(req, crypto_ahash_update(req)); in test_ahash_cycles()
1017 ret = do_one_ahash_op(req, crypto_ahash_final(req)); in test_ahash_cycles()
1028 ret = do_one_ahash_op(req, crypto_ahash_init(req)); in test_ahash_cycles()
1032 ret = do_one_ahash_op(req, crypto_ahash_update(req)); in test_ahash_cycles()
1036 ret = do_one_ahash_op(req, crypto_ahash_final(req)); in test_ahash_cycles()
1060 struct ahash_request *req; in test_ahash_speed_common() local
1082 req = ahash_request_alloc(tfm, GFP_KERNEL); in test_ahash_speed_common()
1083 if (!req) { in test_ahash_speed_common()
1089 ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in test_ahash_speed_common()
1110 ahash_request_set_crypt(req, sg, output, speed[i].plen); in test_ahash_speed_common()
1113 ret = test_ahash_jiffies(req, speed[i].blen, in test_ahash_speed_common()
1117 ret = test_ahash_cycles(req, speed[i].blen, in test_ahash_speed_common()
1130 ahash_request_free(req); in test_ahash_speed_common()
1150 struct skcipher_request *req; member
1163 rc[i] = crypto_skcipher_encrypt(data[i].req); in do_mult_acipher_op()
1165 rc[i] = crypto_skcipher_decrypt(data[i].req); in do_mult_acipher_op()
1286 data[i].req = skcipher_request_alloc(tfm, GFP_KERNEL); in test_mb_skcipher_speed()
1287 if (!data[i].req) { in test_mb_skcipher_speed()
1291 skcipher_request_free(data[i].req); in test_mb_skcipher_speed()
1297 skcipher_request_set_callback(data[i].req, in test_mb_skcipher_speed()
1364 skcipher_request_set_crypt(cur->req, cur->sg, in test_mb_skcipher_speed()
1392 skcipher_request_free(data[i].req); in test_mb_skcipher_speed()
1402 static inline int do_one_acipher_op(struct skcipher_request *req, int ret) in do_one_acipher_op() argument
1404 struct crypto_wait *wait = req->base.data; in do_one_acipher_op()
1409 static int test_acipher_jiffies(struct skcipher_request *req, int enc, in test_acipher_jiffies() argument
1419 ret = do_one_acipher_op(req, in test_acipher_jiffies()
1420 crypto_skcipher_encrypt(req)); in test_acipher_jiffies()
1422 ret = do_one_acipher_op(req, in test_acipher_jiffies()
1423 crypto_skcipher_decrypt(req)); in test_acipher_jiffies()
1434 static int test_acipher_cycles(struct skcipher_request *req, int enc, in test_acipher_cycles() argument
1444 ret = do_one_acipher_op(req, in test_acipher_cycles()
1445 crypto_skcipher_encrypt(req)); in test_acipher_cycles()
1447 ret = do_one_acipher_op(req, in test_acipher_cycles()
1448 crypto_skcipher_decrypt(req)); in test_acipher_cycles()
1460 ret = do_one_acipher_op(req, in test_acipher_cycles()
1461 crypto_skcipher_encrypt(req)); in test_acipher_cycles()
1463 ret = do_one_acipher_op(req, in test_acipher_cycles()
1464 crypto_skcipher_decrypt(req)); in test_acipher_cycles()
1489 struct skcipher_request *req; in test_skcipher_speed() local
1512 req = skcipher_request_alloc(tfm, GFP_KERNEL); in test_skcipher_speed()
1513 if (!req) { in test_skcipher_speed()
1519 skcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in test_skcipher_speed()
1583 skcipher_request_set_crypt(req, sg, sg, *b_size, iv); in test_skcipher_speed()
1586 ret = test_acipher_jiffies(req, enc, in test_skcipher_speed()
1590 ret = test_acipher_cycles(req, enc, in test_skcipher_speed()
1606 skcipher_request_free(req); in test_skcipher_speed()