Lines Matching refs:tsgls

712 	struct cipher_test_sglists *tsgls;  in alloc_cipher_test_sglists()  local
714 tsgls = kmalloc(sizeof(*tsgls), GFP_KERNEL); in alloc_cipher_test_sglists()
715 if (!tsgls) in alloc_cipher_test_sglists()
718 if (init_test_sglist(&tsgls->src) != 0) in alloc_cipher_test_sglists()
720 if (init_test_sglist(&tsgls->dst) != 0) in alloc_cipher_test_sglists()
723 return tsgls; in alloc_cipher_test_sglists()
726 destroy_test_sglist(&tsgls->src); in alloc_cipher_test_sglists()
728 kfree(tsgls); in alloc_cipher_test_sglists()
732 static void free_cipher_test_sglists(struct cipher_test_sglists *tsgls) in free_cipher_test_sglists() argument
734 if (tsgls) { in free_cipher_test_sglists()
735 destroy_test_sglist(&tsgls->src); in free_cipher_test_sglists()
736 destroy_test_sglist(&tsgls->dst); in free_cipher_test_sglists()
737 kfree(tsgls); in free_cipher_test_sglists()
742 static int build_cipher_test_sglists(struct cipher_test_sglists *tsgls, in build_cipher_test_sglists() argument
754 err = build_test_sglist(&tsgls->src, cfg->src_divs, alignmask, in build_cipher_test_sglists()
763 tsgls->dst.sgl_ptr = tsgls->src.sgl; in build_cipher_test_sglists()
764 tsgls->dst.nents = tsgls->src.nents; in build_cipher_test_sglists()
767 return build_test_sglist(&tsgls->dst, in build_cipher_test_sglists()
1934 struct cipher_test_sglists *tsgls) in test_aead_vec_cfg() argument
1999 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_aead_vec_cfg()
2014 aead_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_aead_vec_cfg()
2028 req->src != tsgls->src.sgl_ptr || in test_aead_vec_cfg()
2029 req->dst != tsgls->dst.sgl_ptr || in test_aead_vec_cfg()
2042 if (req->src != tsgls->src.sgl_ptr) in test_aead_vec_cfg()
2044 if (req->dst != tsgls->dst.sgl_ptr) in test_aead_vec_cfg()
2056 if (is_test_sglist_corrupted(&tsgls->src)) { in test_aead_vec_cfg()
2061 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_aead_vec_cfg()
2062 is_test_sglist_corrupted(&tsgls->dst)) { in test_aead_vec_cfg()
2095 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_aead_vec_cfg()
2115 struct cipher_test_sglists *tsgls) in test_aead_vec() argument
2129 req, tsgls); in test_aead_vec()
2143 &cfg, req, tsgls); in test_aead_vec()
2160 struct cipher_test_sglists *tsgls; member
2366 ctx->req, ctx->tsgls); in test_aead_inauthentic_inputs()
2462 ctx->req, ctx->tsgls); in test_aead_vs_generic_impl()
2469 ctx->req, ctx->tsgls); in test_aead_vs_generic_impl()
2485 struct cipher_test_sglists *tsgls) in test_aead_extra() argument
2501 ctx->tsgls = tsgls; in test_aead_extra()
2537 struct cipher_test_sglists *tsgls) in test_aead_extra() argument
2546 struct cipher_test_sglists *tsgls) in test_aead() argument
2553 tsgls); in test_aead()
2567 struct cipher_test_sglists *tsgls = NULL; in alg_test_aead() local
2590 tsgls = alloc_cipher_test_sglists(); in alg_test_aead()
2591 if (!tsgls) { in alg_test_aead()
2598 err = test_aead(driver, ENCRYPT, suite, req, tsgls); in alg_test_aead()
2602 err = test_aead(driver, DECRYPT, suite, req, tsgls); in alg_test_aead()
2606 err = test_aead_extra(driver, desc, req, tsgls); in alg_test_aead()
2608 free_cipher_test_sglists(tsgls); in alg_test_aead()
2706 struct cipher_test_sglists *tsgls) in test_skcipher_vec_cfg() argument
2765 err = build_cipher_test_sglists(tsgls, cfg, alignmask, in test_skcipher_vec_cfg()
2776 skcipher_request_set_crypt(req, tsgls->src.sgl_ptr, tsgls->dst.sgl_ptr, in test_skcipher_vec_cfg()
2788 req->src != tsgls->src.sgl_ptr || in test_skcipher_vec_cfg()
2789 req->dst != tsgls->dst.sgl_ptr || in test_skcipher_vec_cfg()
2800 if (req->src != tsgls->src.sgl_ptr) in test_skcipher_vec_cfg()
2802 if (req->dst != tsgls->dst.sgl_ptr) in test_skcipher_vec_cfg()
2814 if (is_test_sglist_corrupted(&tsgls->src)) { in test_skcipher_vec_cfg()
2819 if (tsgls->dst.sgl_ptr != tsgls->src.sgl && in test_skcipher_vec_cfg()
2820 is_test_sglist_corrupted(&tsgls->dst)) { in test_skcipher_vec_cfg()
2841 err = verify_correct_output(&tsgls->dst, enc ? vec->ctext : vec->ptext, in test_skcipher_vec_cfg()
2869 struct cipher_test_sglists *tsgls) in test_skcipher_vec() argument
2883 req, tsgls); in test_skcipher_vec()
2897 &cfg, req, tsgls); in test_skcipher_vec()
2970 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
3084 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
3088 cfg, req, tsgls); in test_skcipher_vs_generic_impl()
3108 struct cipher_test_sglists *tsgls) in test_skcipher_vs_generic_impl() argument
3117 struct cipher_test_sglists *tsgls) in test_skcipher() argument
3124 tsgls); in test_skcipher()
3138 struct cipher_test_sglists *tsgls = NULL; in alg_test_skcipher() local
3161 tsgls = alloc_cipher_test_sglists(); in alg_test_skcipher()
3162 if (!tsgls) { in alg_test_skcipher()
3169 err = test_skcipher(driver, ENCRYPT, suite, req, tsgls); in alg_test_skcipher()
3173 err = test_skcipher(driver, DECRYPT, suite, req, tsgls); in alg_test_skcipher()
3178 tsgls); in alg_test_skcipher()
3180 free_cipher_test_sglists(tsgls); in alg_test_skcipher()