Lines Matching refs:req
145 static int test_aead_jiffies(struct aead_request *req, int enc, in test_aead_jiffies() argument
155 ret = crypto_aead_encrypt(req); in test_aead_jiffies()
157 ret = crypto_aead_decrypt(req); in test_aead_jiffies()
168 static int test_aead_cycles(struct aead_request *req, int enc, int blen) in test_aead_cycles() argument
179 ret = crypto_aead_encrypt(req); in test_aead_cycles()
181 ret = crypto_aead_decrypt(req); in test_aead_cycles()
193 ret = crypto_aead_encrypt(req); in test_aead_cycles()
195 ret = crypto_aead_decrypt(req); in test_aead_cycles()
277 struct aead_request *req; in test_aead_speed() local
324 req = aead_request_alloc(tfm, GFP_KERNEL); in test_aead_speed()
325 if (!req) { in test_aead_speed()
379 aead_request_set_crypt(req, sg, sgout, *b_size, iv); in test_aead_speed()
380 aead_request_set_assoc(req, asg, aad_size); in test_aead_speed()
383 ret = test_aead_jiffies(req, enc, *b_size, in test_aead_speed()
386 ret = test_aead_cycles(req, enc, *b_size); in test_aead_speed()
399 aead_request_free(req); in test_aead_speed()
751 static void tcrypt_complete(struct crypto_async_request *req, int err) in tcrypt_complete() argument
753 struct tcrypt_result *res = req->data; in tcrypt_complete()
762 static inline int do_one_ahash_op(struct ahash_request *req, int ret) in do_one_ahash_op() argument
765 struct tcrypt_result *tr = req->base.data; in do_one_ahash_op()
775 static int test_ahash_jiffies_digest(struct ahash_request *req, int blen, in test_ahash_jiffies_digest() argument
784 ret = do_one_ahash_op(req, crypto_ahash_digest(req)); in test_ahash_jiffies_digest()
795 static int test_ahash_jiffies(struct ahash_request *req, int blen, in test_ahash_jiffies() argument
803 return test_ahash_jiffies_digest(req, blen, out, secs); in test_ahash_jiffies()
807 ret = crypto_ahash_init(req); in test_ahash_jiffies()
811 ret = do_one_ahash_op(req, crypto_ahash_update(req)); in test_ahash_jiffies()
816 ret = do_one_ahash_op(req, crypto_ahash_final(req)); in test_ahash_jiffies()
827 static int test_ahash_cycles_digest(struct ahash_request *req, int blen, in test_ahash_cycles_digest() argument
835 ret = do_one_ahash_op(req, crypto_ahash_digest(req)); in test_ahash_cycles_digest()
846 ret = do_one_ahash_op(req, crypto_ahash_digest(req)); in test_ahash_cycles_digest()
865 static int test_ahash_cycles(struct ahash_request *req, int blen, in test_ahash_cycles() argument
872 return test_ahash_cycles_digest(req, blen, out); in test_ahash_cycles()
876 ret = crypto_ahash_init(req); in test_ahash_cycles()
880 ret = do_one_ahash_op(req, crypto_ahash_update(req)); in test_ahash_cycles()
884 ret = do_one_ahash_op(req, crypto_ahash_final(req)); in test_ahash_cycles()
895 ret = crypto_ahash_init(req); in test_ahash_cycles()
899 ret = do_one_ahash_op(req, crypto_ahash_update(req)); in test_ahash_cycles()
903 ret = do_one_ahash_op(req, crypto_ahash_final(req)); in test_ahash_cycles()
927 struct ahash_request *req; in test_ahash_speed() local
949 req = ahash_request_alloc(tfm, GFP_KERNEL); in test_ahash_speed()
950 if (!req) { in test_ahash_speed()
956 ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in test_ahash_speed()
970 ahash_request_set_crypt(req, sg, output, speed[i].plen); in test_ahash_speed()
973 ret = test_ahash_jiffies(req, speed[i].blen, in test_ahash_speed()
976 ret = test_ahash_cycles(req, speed[i].blen, in test_ahash_speed()
985 ahash_request_free(req); in test_ahash_speed()
991 static inline int do_one_acipher_op(struct ablkcipher_request *req, int ret) in do_one_acipher_op() argument
994 struct tcrypt_result *tr = req->base.data; in do_one_acipher_op()
1005 static int test_acipher_jiffies(struct ablkcipher_request *req, int enc, in test_acipher_jiffies() argument
1015 ret = do_one_acipher_op(req, in test_acipher_jiffies()
1016 crypto_ablkcipher_encrypt(req)); in test_acipher_jiffies()
1018 ret = do_one_acipher_op(req, in test_acipher_jiffies()
1019 crypto_ablkcipher_decrypt(req)); in test_acipher_jiffies()
1030 static int test_acipher_cycles(struct ablkcipher_request *req, int enc, in test_acipher_cycles() argument
1040 ret = do_one_acipher_op(req, in test_acipher_cycles()
1041 crypto_ablkcipher_encrypt(req)); in test_acipher_cycles()
1043 ret = do_one_acipher_op(req, in test_acipher_cycles()
1044 crypto_ablkcipher_decrypt(req)); in test_acipher_cycles()
1056 ret = do_one_acipher_op(req, in test_acipher_cycles()
1057 crypto_ablkcipher_encrypt(req)); in test_acipher_cycles()
1059 ret = do_one_acipher_op(req, in test_acipher_cycles()
1060 crypto_ablkcipher_decrypt(req)); in test_acipher_cycles()
1085 struct ablkcipher_request *req; in test_acipher_speed() local
1108 req = ablkcipher_request_alloc(tfm, GFP_KERNEL); in test_acipher_speed()
1109 if (!req) { in test_acipher_speed()
1115 ablkcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in test_acipher_speed()
1179 ablkcipher_request_set_crypt(req, sg, sg, *b_size, iv); in test_acipher_speed()
1182 ret = test_acipher_jiffies(req, enc, in test_acipher_speed()
1185 ret = test_acipher_cycles(req, enc, in test_acipher_speed()
1200 ablkcipher_request_free(req); in test_acipher_speed()