Lines Matching refs:req
143 static void tcrypt_complete(struct crypto_async_request *req, int err) in tcrypt_complete() argument
145 struct tcrypt_result *res = req->data; in tcrypt_complete()
201 struct ahash_request *req; in __test_hash() local
218 req = ahash_request_alloc(tfm, GFP_KERNEL); in __test_hash()
219 if (!req) { in __test_hash()
224 ahash_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in __test_hash()
263 ahash_request_set_crypt(req, sg, result, template[i].psize); in __test_hash()
265 ret = wait_async_op(&tresult, crypto_ahash_digest(req)); in __test_hash()
272 ret = wait_async_op(&tresult, crypto_ahash_init(req)); in __test_hash()
278 ret = wait_async_op(&tresult, crypto_ahash_update(req)); in __test_hash()
284 ret = wait_async_op(&tresult, crypto_ahash_final(req)); in __test_hash()
349 ahash_request_set_crypt(req, sg, result, template[i].psize); in __test_hash()
350 ret = crypto_ahash_digest(req); in __test_hash()
383 ahash_request_free(req); in __test_hash()
428 struct aead_request *req; in __test_aead() local
475 req = aead_request_alloc(tfm, GFP_KERNEL); in __test_aead()
476 if (!req) { in __test_aead()
482 aead_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in __test_aead()
552 aead_request_set_crypt(req, sg, (diff_dst) ? sgout : sg, in __test_aead()
555 aead_request_set_assoc(req, asg, template[i].alen); in __test_aead()
557 ret = enc ? crypto_aead_encrypt(req) : crypto_aead_decrypt(req); in __test_aead()
702 aead_request_set_crypt(req, sg, (diff_dst) ? sgout : sg, in __test_aead()
706 aead_request_set_assoc(req, asg, template[i].alen); in __test_aead()
708 ret = enc ? crypto_aead_encrypt(req) : crypto_aead_decrypt(req); in __test_aead()
786 aead_request_free(req); in __test_aead()
917 struct ablkcipher_request *req; in __test_skcipher() local
946 req = ablkcipher_request_alloc(tfm, GFP_KERNEL); in __test_skcipher()
947 if (!req) { in __test_skcipher()
953 ablkcipher_request_set_callback(req, CRYPTO_TFM_REQ_MAY_BACKLOG, in __test_skcipher()
995 ablkcipher_request_set_crypt(req, sg, (diff_dst) ? sgout : sg, in __test_skcipher()
997 ret = enc ? crypto_ablkcipher_encrypt(req) : in __test_skcipher()
998 crypto_ablkcipher_decrypt(req); in __test_skcipher()
1089 ablkcipher_request_set_crypt(req, sg, (diff_dst) ? sgout : sg, in __test_skcipher()
1092 ret = enc ? crypto_ablkcipher_encrypt(req) : in __test_skcipher()
1093 crypto_ablkcipher_decrypt(req); in __test_skcipher()
1147 ablkcipher_request_free(req); in __test_skcipher()
1280 struct comp_request req; in test_pcomp() local
1300 req.next_in = ctemplate[i].input; in test_pcomp()
1301 req.avail_in = ctemplate[i].inlen / 2; in test_pcomp()
1302 req.next_out = result; in test_pcomp()
1303 req.avail_out = ctemplate[i].outlen / 2; in test_pcomp()
1305 res = crypto_compress_update(tfm, &req); in test_pcomp()
1306 if (res < 0 && (res != -EAGAIN || req.avail_in)) { in test_pcomp()
1315 req.avail_in += (ctemplate[i].inlen + 1) / 2; in test_pcomp()
1317 res = crypto_compress_update(tfm, &req); in test_pcomp()
1318 if (res < 0 && (res != -EAGAIN || req.avail_in)) { in test_pcomp()
1327 req.avail_out += COMP_BUF_SIZE - ctemplate[i].outlen / 2; in test_pcomp()
1329 res = crypto_compress_final(tfm, &req); in test_pcomp()
1337 if (COMP_BUF_SIZE - req.avail_out != ctemplate[i].outlen) { in test_pcomp()
1340 COMP_BUF_SIZE - req.avail_out, in test_pcomp()
1361 struct comp_request req; in test_pcomp() local
1381 req.next_in = dtemplate[i].input; in test_pcomp()
1382 req.avail_in = dtemplate[i].inlen / 2; in test_pcomp()
1383 req.next_out = result; in test_pcomp()
1384 req.avail_out = dtemplate[i].outlen / 2; in test_pcomp()
1386 res = crypto_decompress_update(tfm, &req); in test_pcomp()
1387 if (res < 0 && (res != -EAGAIN || req.avail_in)) { in test_pcomp()
1396 req.avail_in += (dtemplate[i].inlen + 1) / 2; in test_pcomp()
1398 res = crypto_decompress_update(tfm, &req); in test_pcomp()
1399 if (res < 0 && (res != -EAGAIN || req.avail_in)) { in test_pcomp()
1408 req.avail_out += COMP_BUF_SIZE - dtemplate[i].outlen / 2; in test_pcomp()
1410 res = crypto_decompress_final(tfm, &req); in test_pcomp()
1411 if (res < 0 && (res != -EAGAIN || req.avail_in)) { in test_pcomp()
1419 if (COMP_BUF_SIZE - req.avail_out != dtemplate[i].outlen) { in test_pcomp()
1422 algo, COMP_BUF_SIZE - req.avail_out, in test_pcomp()