Lines Matching refs:tsgls
682 struct cipher_test_sglists *tsgls; in alloc_cipher_test_sglists() local
684 tsgls = kmalloc(sizeof(*tsgls), GFP_KERNEL); in alloc_cipher_test_sglists()
685 if (!tsgls) in alloc_cipher_test_sglists()
688 if (init_test_sglist(&tsgls->src) != 0) in alloc_cipher_test_sglists()
690 if (init_test_sglist(&tsgls->dst) != 0) in alloc_cipher_test_sglists()
693 return tsgls; in alloc_cipher_test_sglists()
696 destroy_test_sglist(&tsgls->src); in alloc_cipher_test_sglists()
698 kfree(tsgls); in alloc_cipher_test_sglists()
702 static void free_cipher_test_sglists(struct cipher_test_sglists *tsgls) in free_cipher_test_sglists() argument
704 if (tsgls) { in free_cipher_test_sglists()
705 destroy_test_sglist(&tsgls->src); in free_cipher_test_sglists()
706 destroy_test_sglist(&tsgls->dst); in free_cipher_test_sglists()
707 kfree(tsgls); in free_cipher_test_sglists()
712 static int build_cipher_test_sglists(struct cipher_test_sglists *tsgls, in build_cipher_test_sglists() argument
724 err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask, in build_cipher_test_sglists()
733 tsgls->dst.sgl_ptr = tsgls->src.sgl; in build_cipher_test_sglists()
734 tsgls->dst.nents = tsgls->src.nents; in build_cipher_test_sglists()
737 return build_test_sglist(&tsgls->dst, in build_cipher_test_sglists()
1842 struct cipher_test_sglists *tsgls) in test_aead_vec_cfg() argument
1906 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_aead_vec_cfg()
1921 aead_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_aead_vec_cfg()
1935 req->src != tsgls->src.sgl_ptr || in test_aead_vec_cfg()
1936 req->dst != tsgls->dst.sgl_ptr || in test_aead_vec_cfg()
1949 if (req->src != tsgls->src.sgl_ptr) in test_aead_vec_cfg()
1951 if (req->dst != tsgls->dst.sgl_ptr) in test_aead_vec_cfg()
1963 if (is_test_sglist_corrupted(&tsgls->src)) { in test_aead_vec_cfg()
1968 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_aead_vec_cfg()
1969 is_test_sglist_corrupted(&tsgls->dst)) { in test_aead_vec_cfg()
1991 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_aead_vec_cfg()
2011 struct cipher_test_sglists *tsgls) in test_aead_vec() argument
2025 req, tsgls); in test_aead_vec()
2039 &cfg, req, tsgls); in test_aead_vec()
2136 struct cipher_test_sglists *tsgls) in test_aead_vs_generic_impl() argument
2245 req, tsgls); in test_aead_vs_generic_impl()
2249 req, tsgls); in test_aead_vs_generic_impl()
2270 struct cipher_test_sglists *tsgls) in test_aead_vs_generic_impl() argument
2279 struct cipher_test_sglists *tsgls) in test_aead() argument
2286 tsgls); in test_aead()
2300 struct cipher_test_sglists *tsgls = NULL; in alg_test_aead() local
2323 tsgls = alloc_cipher_test_sglists(); in alg_test_aead()
2324 if (!tsgls) { in alg_test_aead()
2331 err = test_aead(driver, ENCRYPT, suite, req, tsgls); in alg_test_aead()
2335 err = test_aead(driver, DECRYPT, suite, req, tsgls); in alg_test_aead()
2339 err = test_aead_vs_generic_impl(driver, desc, req, tsgls); in alg_test_aead()
2341 free_cipher_test_sglists(tsgls); in alg_test_aead()
2439 struct cipher_test_sglists *tsgls) in test_skcipher_vec_cfg() argument
2497 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_skcipher_vec_cfg()
2508 skcipher_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_skcipher_vec_cfg()
2520 req->src != tsgls->src.sgl_ptr || in test_skcipher_vec_cfg()
2521 req->dst != tsgls->dst.sgl_ptr || in test_skcipher_vec_cfg()
2532 if (req->src != tsgls->src.sgl_ptr) in test_skcipher_vec_cfg()
2534 if (req->dst != tsgls->dst.sgl_ptr) in test_skcipher_vec_cfg()
2546 if (is_test_sglist_corrupted(&tsgls->src)) { in test_skcipher_vec_cfg()
2551 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_skcipher_vec_cfg()
2552 is_test_sglist_corrupted(&tsgls->dst)) { in test_skcipher_vec_cfg()
2573 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_skcipher_vec_cfg()
2601 struct cipher_test_sglists *tsgls) in test_skcipher_vec() argument
2615 req, tsgls); in test_skcipher_vec()
2629 &cfg, req, tsgls); in test_skcipher_vec()
2693 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
2796 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
2800 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
2820 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
2829 struct cipher_test_sglists *tsgls) in test_skcipher() argument
2836 tsgls); in test_skcipher()
2850 struct cipher_test_sglists *tsgls = NULL; in alg_test_skcipher() local
2873 tsgls = alloc_cipher_test_sglists(); in alg_test_skcipher()
2874 if (!tsgls) { in alg_test_skcipher()
2881 err = test_skcipher(driver, ENCRYPT, suite, req, tsgls); in alg_test_skcipher()
2885 err = test_skcipher(driver, DECRYPT, suite, req, tsgls); in alg_test_skcipher()
2890 tsgls); in alg_test_skcipher()
2892 free_cipher_test_sglists(tsgls); in alg_test_skcipher()