Lines Matching refs:sg
76 struct scatterlist *sg, int blen, int secs) in test_cipher_jiffies() argument
85 ret = crypto_blkcipher_encrypt(desc, sg, sg, blen); in test_cipher_jiffies()
87 ret = crypto_blkcipher_decrypt(desc, sg, sg, blen); in test_cipher_jiffies()
99 struct scatterlist *sg, int blen) in test_cipher_cycles() argument
110 ret = crypto_blkcipher_encrypt(desc, sg, sg, blen); in test_cipher_cycles()
112 ret = crypto_blkcipher_decrypt(desc, sg, sg, blen); in test_cipher_cycles()
124 ret = crypto_blkcipher_encrypt(desc, sg, sg, blen); in test_cipher_cycles()
126 ret = crypto_blkcipher_decrypt(desc, sg, sg, blen); in test_cipher_cycles()
247 static void sg_init_aead(struct scatterlist *sg, char *xbuf[XBUFSIZE], in sg_init_aead() argument
260 sg_init_table(sg, np); in sg_init_aead()
263 sg_set_buf(&sg[k], xbuf[k], PAGE_SIZE); in sg_init_aead()
265 sg_set_buf(&sg[k], xbuf[k], rem); in sg_init_aead()
278 struct scatterlist *sg; in test_aead_speed() local
311 sg = kmalloc(sizeof(*sg) * 8 * 3, GFP_KERNEL); in test_aead_speed()
312 if (!sg) in test_aead_speed()
314 asg = &sg[8]; in test_aead_speed()
377 sg_init_aead(&sg[0], xbuf, in test_aead_speed()
383 aead_request_set_crypt(req, sg, sgout, *b_size, iv); in test_aead_speed()
407 kfree(sg); in test_aead_speed()
454 struct scatterlist sg[TVMEMSIZE]; in test_cipher_speed() local
484 sg_init_table(sg, TVMEMSIZE); in test_cipher_speed()
485 sg_set_buf(sg, tvmem[0] + *keysize, in test_cipher_speed()
488 sg_set_buf(sg + j, tvmem[j], PAGE_SIZE); in test_cipher_speed()
499 ret = test_cipher_jiffies(&desc, enc, sg, in test_cipher_speed()
502 ret = test_cipher_cycles(&desc, enc, sg, in test_cipher_speed()
520 struct scatterlist *sg, int blen, in test_hash_jiffies_digest() argument
529 ret = crypto_hash_digest(desc, sg, blen, out); in test_hash_jiffies_digest()
540 static int test_hash_jiffies(struct hash_desc *desc, struct scatterlist *sg, in test_hash_jiffies() argument
548 return test_hash_jiffies_digest(desc, sg, blen, out, secs); in test_hash_jiffies()
556 ret = crypto_hash_update(desc, sg, plen); in test_hash_jiffies()
573 struct scatterlist *sg, int blen, char *out) in test_hash_cycles_digest() argument
583 ret = crypto_hash_digest(desc, sg, blen, out); in test_hash_cycles_digest()
594 ret = crypto_hash_digest(desc, sg, blen, out); in test_hash_cycles_digest()
615 static int test_hash_cycles(struct hash_desc *desc, struct scatterlist *sg, in test_hash_cycles() argument
623 return test_hash_cycles_digest(desc, sg, blen, out); in test_hash_cycles()
633 ret = crypto_hash_update(desc, sg, plen); in test_hash_cycles()
652 ret = crypto_hash_update(desc, sg, plen); in test_hash_cycles()
677 static void test_hash_sg_init(struct scatterlist *sg) in test_hash_sg_init() argument
681 sg_init_table(sg, TVMEMSIZE); in test_hash_sg_init()
683 sg_set_buf(sg + i, tvmem[i], PAGE_SIZE); in test_hash_sg_init()
691 struct scatterlist sg[TVMEMSIZE]; in test_hash_speed() local
718 test_hash_sg_init(sg); in test_hash_speed()
735 ret = test_hash_jiffies(&desc, sg, speed[i].blen, in test_hash_speed()
738 ret = test_hash_cycles(&desc, sg, speed[i].blen, in test_hash_speed()
929 struct scatterlist sg[TVMEMSIZE]; in test_ahash_speed() local
952 test_hash_sg_init(sg); in test_ahash_speed()
974 ahash_request_set_crypt(req, sg, output, speed[i].plen); in test_ahash_speed()
1126 struct scatterlist sg[TVMEMSIZE]; in test_acipher_speed() local
1159 sg_init_table(sg, DIV_ROUND_UP(k, PAGE_SIZE)); in test_acipher_speed()
1162 sg_set_buf(sg, tvmem[0] + *keysize, in test_acipher_speed()
1167 sg_set_buf(sg + j, tvmem[j], PAGE_SIZE); in test_acipher_speed()
1172 sg_set_buf(sg + j, tvmem[j], k); in test_acipher_speed()
1175 sg_set_buf(sg, tvmem[0] + *keysize, *b_size); in test_acipher_speed()
1182 ablkcipher_request_set_crypt(req, sg, sg, *b_size, iv); in test_acipher_speed()