Lines Matching refs:data
141 struct crypto_wait *wait = req->base.data; in do_one_aead_op()
156 static int do_mult_aead_op(struct test_mb_aead_data *data, int enc, in do_mult_aead_op() argument
164 rc[i] = crypto_aead_encrypt(data[i].req); in do_mult_aead_op()
166 rc[i] = crypto_aead_decrypt(data[i].req); in do_mult_aead_op()
171 rc[i] = crypto_wait_req(rc[i], &data[i].wait); in do_mult_aead_op()
182 static int test_mb_aead_jiffies(struct test_mb_aead_data *data, int enc, in test_mb_aead_jiffies() argument
196 ret = do_mult_aead_op(data, enc, num_mb, rc); in test_mb_aead_jiffies()
209 static int test_mb_aead_cycles(struct test_mb_aead_data *data, int enc, in test_mb_aead_cycles() argument
223 ret = do_mult_aead_op(data, enc, num_mb, rc); in test_mb_aead_cycles()
233 ret = do_mult_aead_op(data, enc, num_mb, rc); in test_mb_aead_cycles()
255 struct test_mb_aead_data *data; in test_mb_aead_speed() local
280 data = kcalloc(num_mb, sizeof(*data), GFP_KERNEL); in test_mb_aead_speed()
281 if (!data) in test_mb_aead_speed()
294 if (testmgr_alloc_buf(data[i].xbuf)) { in test_mb_aead_speed()
296 testmgr_free_buf(data[i].xbuf); in test_mb_aead_speed()
301 if (testmgr_alloc_buf(data[i].axbuf)) { in test_mb_aead_speed()
303 testmgr_free_buf(data[i].axbuf); in test_mb_aead_speed()
308 if (testmgr_alloc_buf(data[i].xoutbuf)) { in test_mb_aead_speed()
310 testmgr_free_buf(data[i].xoutbuf); in test_mb_aead_speed()
315 data[i].req = aead_request_alloc(tfm, GFP_KERNEL); in test_mb_aead_speed()
316 if (!data[i].req) { in test_mb_aead_speed()
320 aead_request_free(data[i].req); in test_mb_aead_speed()
326 crypto_init_wait(&data[i].wait); in test_mb_aead_speed()
327 aead_request_set_callback(data[i].req, in test_mb_aead_speed()
329 crypto_req_done, &data[i].wait); in test_mb_aead_speed()
376 struct test_mb_aead_data *cur = &data[j]; in test_mb_aead_speed()
415 ret = test_mb_aead_jiffies(data, enc, *b_size, in test_mb_aead_speed()
419 ret = test_mb_aead_cycles(data, enc, *b_size, in test_mb_aead_speed()
435 aead_request_free(data[i].req); in test_mb_aead_speed()
438 testmgr_free_buf(data[i].xoutbuf); in test_mb_aead_speed()
441 testmgr_free_buf(data[i].axbuf); in test_mb_aead_speed()
444 testmgr_free_buf(data[i].xbuf); in test_mb_aead_speed()
448 kfree(data); in test_mb_aead_speed()
708 struct crypto_wait *wait = req->base.data; in do_one_ahash_op()
721 static inline int do_mult_ahash_op(struct test_mb_ahash_data *data, u32 num_mb, in do_mult_ahash_op() argument
728 rc[i] = crypto_ahash_digest(data[i].req); in do_mult_ahash_op()
732 rc[i] = crypto_wait_req(rc[i], &data[i].wait); in do_mult_ahash_op()
743 static int test_mb_ahash_jiffies(struct test_mb_ahash_data *data, int blen, in test_mb_ahash_jiffies() argument
757 ret = do_mult_ahash_op(data, num_mb, rc); in test_mb_ahash_jiffies()
770 static int test_mb_ahash_cycles(struct test_mb_ahash_data *data, int blen, in test_mb_ahash_cycles() argument
784 ret = do_mult_ahash_op(data, num_mb, rc); in test_mb_ahash_cycles()
794 ret = do_mult_ahash_op(data, num_mb, rc); in test_mb_ahash_cycles()
814 struct test_mb_ahash_data *data; in test_mb_ahash_speed() local
819 data = kcalloc(num_mb, sizeof(*data), GFP_KERNEL); in test_mb_ahash_speed()
820 if (!data) in test_mb_ahash_speed()
831 if (testmgr_alloc_buf(data[i].xbuf)) in test_mb_ahash_speed()
834 crypto_init_wait(&data[i].wait); in test_mb_ahash_speed()
836 data[i].req = ahash_request_alloc(tfm, GFP_KERNEL); in test_mb_ahash_speed()
837 if (!data[i].req) { in test_mb_ahash_speed()
843 ahash_request_set_callback(data[i].req, 0, crypto_req_done, in test_mb_ahash_speed()
844 &data[i].wait); in test_mb_ahash_speed()
846 sg_init_table(data[i].sg, XBUFSIZE); in test_mb_ahash_speed()
848 sg_set_buf(data[i].sg + j, data[i].xbuf[j], PAGE_SIZE); in test_mb_ahash_speed()
849 memset(data[i].xbuf[j], 0xff, PAGE_SIZE); in test_mb_ahash_speed()
871 ahash_request_set_crypt(data[k].req, data[k].sg, in test_mb_ahash_speed()
872 data[k].result, speed[i].blen); in test_mb_ahash_speed()
880 ret = test_mb_ahash_jiffies(data, speed[i].blen, secs, in test_mb_ahash_speed()
884 ret = test_mb_ahash_cycles(data, speed[i].blen, num_mb); in test_mb_ahash_speed()
896 ahash_request_free(data[k].req); in test_mb_ahash_speed()
899 testmgr_free_buf(data[k].xbuf); in test_mb_ahash_speed()
904 kfree(data); in test_mb_ahash_speed()
1154 static int do_mult_acipher_op(struct test_mb_skcipher_data *data, int enc, in do_mult_acipher_op() argument
1162 rc[i] = crypto_skcipher_encrypt(data[i].req); in do_mult_acipher_op()
1164 rc[i] = crypto_skcipher_decrypt(data[i].req); in do_mult_acipher_op()
1169 rc[i] = crypto_wait_req(rc[i], &data[i].wait); in do_mult_acipher_op()
1180 static int test_mb_acipher_jiffies(struct test_mb_skcipher_data *data, int enc, in test_mb_acipher_jiffies() argument
1194 ret = do_mult_acipher_op(data, enc, num_mb, rc); in test_mb_acipher_jiffies()
1207 static int test_mb_acipher_cycles(struct test_mb_skcipher_data *data, int enc, in test_mb_acipher_cycles() argument
1221 ret = do_mult_acipher_op(data, enc, num_mb, rc); in test_mb_acipher_cycles()
1231 ret = do_mult_acipher_op(data, enc, num_mb, rc); in test_mb_acipher_cycles()
1252 struct test_mb_skcipher_data *data; in test_mb_skcipher_speed() local
1266 data = kcalloc(num_mb, sizeof(*data), GFP_KERNEL); in test_mb_skcipher_speed()
1267 if (!data) in test_mb_skcipher_speed()
1278 if (testmgr_alloc_buf(data[i].xbuf)) { in test_mb_skcipher_speed()
1280 testmgr_free_buf(data[i].xbuf); in test_mb_skcipher_speed()
1286 if (testmgr_alloc_buf(data[i].xbuf)) { in test_mb_skcipher_speed()
1288 testmgr_free_buf(data[i].xbuf); in test_mb_skcipher_speed()
1294 data[i].req = skcipher_request_alloc(tfm, GFP_KERNEL); in test_mb_skcipher_speed()
1295 if (!data[i].req) { in test_mb_skcipher_speed()
1299 skcipher_request_free(data[i].req); in test_mb_skcipher_speed()
1305 skcipher_request_set_callback(data[i].req, in test_mb_skcipher_speed()
1307 crypto_req_done, &data[i].wait); in test_mb_skcipher_speed()
1308 crypto_init_wait(&data[i].wait); in test_mb_skcipher_speed()
1354 struct test_mb_skcipher_data *cur = &data[j]; in test_mb_skcipher_speed()
1378 ret = test_mb_acipher_jiffies(data, enc, in test_mb_skcipher_speed()
1383 ret = test_mb_acipher_cycles(data, enc, in test_mb_skcipher_speed()
1400 skcipher_request_free(data[i].req); in test_mb_skcipher_speed()
1403 testmgr_free_buf(data[i].xbuf); in test_mb_skcipher_speed()
1407 kfree(data); in test_mb_skcipher_speed()
1412 struct crypto_wait *wait = req->base.data; in do_one_acipher_op()