Lines Matching refs:algo
105 struct seg6_hmac_algo *algo; in __hmac_get_algo() local
110 algo = &hmac_algos[i]; in __hmac_get_algo()
111 if (algo->alg_id == alg_id) in __hmac_get_algo()
112 return algo; in __hmac_get_algo()
121 struct seg6_hmac_algo *algo; in __do_hmac() local
126 algo = __hmac_get_algo(hinfo->alg_id); in __do_hmac()
127 if (!algo) in __do_hmac()
130 tfm = *this_cpu_ptr(algo->tfms); in __do_hmac()
145 shash = *this_cpu_ptr(algo->shashs); in __do_hmac()
355 struct seg6_hmac_algo *algo; in seg6_hmac_init_algo() local
367 algo = &hmac_algos[i]; in seg6_hmac_init_algo()
368 algo->tfms = alloc_percpu(struct crypto_shash *); in seg6_hmac_init_algo()
369 if (!algo->tfms) in seg6_hmac_init_algo()
373 tfm = crypto_alloc_shash(algo->name, 0, 0); in seg6_hmac_init_algo()
378 p_tfm = per_cpu_ptr(algo->tfms, cpu); in seg6_hmac_init_algo()
382 p_tfm = raw_cpu_ptr(algo->tfms); in seg6_hmac_init_algo()
387 algo->shashs = alloc_percpu(struct shash_desc *); in seg6_hmac_init_algo()
388 if (!algo->shashs) in seg6_hmac_init_algo()
396 *per_cpu_ptr(algo->shashs, cpu) = shash; in seg6_hmac_init_algo()
421 struct seg6_hmac_algo *algo = NULL; in seg6_hmac_exit() local
428 algo = &hmac_algos[i]; in seg6_hmac_exit()
430 if (algo->shashs) { in seg6_hmac_exit()
432 shash = *per_cpu_ptr(algo->shashs, cpu); in seg6_hmac_exit()
435 free_percpu(algo->shashs); in seg6_hmac_exit()
438 if (algo->tfms) { in seg6_hmac_exit()
440 tfm = *per_cpu_ptr(algo->tfms, cpu); in seg6_hmac_exit()
443 free_percpu(algo->tfms); in seg6_hmac_exit()