Lines Matching refs:sg
95 struct scatterlist *sg, int blen, int secs) in test_cipher_jiffies() argument
104 ret = crypto_blkcipher_encrypt(desc, sg, sg, blen); in test_cipher_jiffies()
106 ret = crypto_blkcipher_decrypt(desc, sg, sg, blen); in test_cipher_jiffies()
118 struct scatterlist *sg, int blen) in test_cipher_cycles() argument
129 ret = crypto_blkcipher_encrypt(desc, sg, sg, blen); in test_cipher_cycles()
131 ret = crypto_blkcipher_decrypt(desc, sg, sg, blen); in test_cipher_cycles()
143 ret = crypto_blkcipher_encrypt(desc, sg, sg, blen); in test_cipher_cycles()
145 ret = crypto_blkcipher_decrypt(desc, sg, sg, blen); in test_cipher_cycles()
280 static void sg_init_aead(struct scatterlist *sg, char *xbuf[XBUFSIZE], in sg_init_aead() argument
293 sg_init_table(sg, np + 1); in sg_init_aead()
296 sg_set_buf(&sg[k + 1], xbuf[k], PAGE_SIZE); in sg_init_aead()
298 sg_set_buf(&sg[k + 1], xbuf[k], rem); in sg_init_aead()
311 struct scatterlist *sg; in test_aead_speed() local
344 sg = kmalloc(sizeof(*sg) * 9 * 2, GFP_KERNEL); in test_aead_speed()
345 if (!sg) in test_aead_speed()
347 sgout = &sg[9]; in test_aead_speed()
412 sg_init_aead(sg, xbuf, in test_aead_speed()
418 sg_set_buf(&sg[0], assoc, aad_size); in test_aead_speed()
421 aead_request_set_crypt(req, sg, sgout, *b_size, iv); in test_aead_speed()
445 kfree(sg); in test_aead_speed()
492 struct scatterlist sg[TVMEMSIZE]; in test_cipher_speed() local
522 sg_init_table(sg, TVMEMSIZE); in test_cipher_speed()
523 sg_set_buf(sg, tvmem[0] + *keysize, in test_cipher_speed()
526 sg_set_buf(sg + j, tvmem[j], PAGE_SIZE); in test_cipher_speed()
537 ret = test_cipher_jiffies(&desc, enc, sg, in test_cipher_speed()
540 ret = test_cipher_cycles(&desc, enc, sg, in test_cipher_speed()
558 struct scatterlist *sg, int blen, in test_hash_jiffies_digest() argument
567 ret = crypto_hash_digest(desc, sg, blen, out); in test_hash_jiffies_digest()
578 static int test_hash_jiffies(struct hash_desc *desc, struct scatterlist *sg, in test_hash_jiffies() argument
586 return test_hash_jiffies_digest(desc, sg, blen, out, secs); in test_hash_jiffies()
594 ret = crypto_hash_update(desc, sg, plen); in test_hash_jiffies()
611 struct scatterlist *sg, int blen, char *out) in test_hash_cycles_digest() argument
621 ret = crypto_hash_digest(desc, sg, blen, out); in test_hash_cycles_digest()
632 ret = crypto_hash_digest(desc, sg, blen, out); in test_hash_cycles_digest()
653 static int test_hash_cycles(struct hash_desc *desc, struct scatterlist *sg, in test_hash_cycles() argument
661 return test_hash_cycles_digest(desc, sg, blen, out); in test_hash_cycles()
671 ret = crypto_hash_update(desc, sg, plen); in test_hash_cycles()
690 ret = crypto_hash_update(desc, sg, plen); in test_hash_cycles()
715 static void test_hash_sg_init(struct scatterlist *sg) in test_hash_sg_init() argument
719 sg_init_table(sg, TVMEMSIZE); in test_hash_sg_init()
721 sg_set_buf(sg + i, tvmem[i], PAGE_SIZE); in test_hash_sg_init()
729 struct scatterlist sg[TVMEMSIZE]; in test_hash_speed() local
756 test_hash_sg_init(sg); in test_hash_speed()
773 ret = test_hash_jiffies(&desc, sg, speed[i].blen, in test_hash_speed()
776 ret = test_hash_cycles(&desc, sg, speed[i].blen, in test_hash_speed()
951 struct scatterlist sg[TVMEMSIZE]; in test_ahash_speed() local
974 test_hash_sg_init(sg); in test_ahash_speed()
1000 ahash_request_set_crypt(req, sg, output, speed[i].plen); in test_ahash_speed()
1155 struct scatterlist sg[TVMEMSIZE]; in test_acipher_speed() local
1188 sg_init_table(sg, DIV_ROUND_UP(k, PAGE_SIZE)); in test_acipher_speed()
1191 sg_set_buf(sg, tvmem[0] + *keysize, in test_acipher_speed()
1196 sg_set_buf(sg + j, tvmem[j], PAGE_SIZE); in test_acipher_speed()
1201 sg_set_buf(sg + j, tvmem[j], k); in test_acipher_speed()
1204 sg_set_buf(sg, tvmem[0] + *keysize, *b_size); in test_acipher_speed()
1211 ablkcipher_request_set_crypt(req, sg, sg, *b_size, iv); in test_acipher_speed()