Lines Matching refs:algo
106 struct seg6_hmac_algo *algo; in __hmac_get_algo() local
111 algo = &hmac_algos[i]; in __hmac_get_algo()
112 if (algo->alg_id == alg_id) in __hmac_get_algo()
113 return algo; in __hmac_get_algo()
122 struct seg6_hmac_algo *algo; in __do_hmac() local
127 algo = __hmac_get_algo(hinfo->alg_id); in __do_hmac()
128 if (!algo) in __do_hmac()
131 tfm = *this_cpu_ptr(algo->tfms); in __do_hmac()
146 shash = *this_cpu_ptr(algo->shashs); in __do_hmac()
354 struct seg6_hmac_algo *algo; in seg6_hmac_init_algo() local
365 algo = &hmac_algos[i]; in seg6_hmac_init_algo()
366 algo->tfms = alloc_percpu(struct crypto_shash *); in seg6_hmac_init_algo()
367 if (!algo->tfms) in seg6_hmac_init_algo()
371 tfm = crypto_alloc_shash(algo->name, 0, 0); in seg6_hmac_init_algo()
374 p_tfm = per_cpu_ptr(algo->tfms, cpu); in seg6_hmac_init_algo()
378 p_tfm = raw_cpu_ptr(algo->tfms); in seg6_hmac_init_algo()
383 algo->shashs = alloc_percpu(struct shash_desc *); in seg6_hmac_init_algo()
384 if (!algo->shashs) in seg6_hmac_init_algo()
392 *per_cpu_ptr(algo->shashs, cpu) = shash; in seg6_hmac_init_algo()
415 struct seg6_hmac_algo *algo = NULL; in seg6_hmac_exit() local
420 algo = &hmac_algos[i]; in seg6_hmac_exit()
425 shash = *per_cpu_ptr(algo->shashs, cpu); in seg6_hmac_exit()
427 tfm = *per_cpu_ptr(algo->tfms, cpu); in seg6_hmac_exit()
430 free_percpu(algo->tfms); in seg6_hmac_exit()
431 free_percpu(algo->shashs); in seg6_hmac_exit()