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()
353 struct seg6_hmac_algo *algo; in seg6_hmac_init_algo() local
364 algo = &hmac_algos[i]; in seg6_hmac_init_algo()
365 algo->tfms = alloc_percpu(struct crypto_shash *); in seg6_hmac_init_algo()
366 if (!algo->tfms) in seg6_hmac_init_algo()
370 tfm = crypto_alloc_shash(algo->name, 0, 0); in seg6_hmac_init_algo()
373 p_tfm = per_cpu_ptr(algo->tfms, cpu); in seg6_hmac_init_algo()
377 p_tfm = raw_cpu_ptr(algo->tfms); in seg6_hmac_init_algo()
382 algo->shashs = alloc_percpu(struct shash_desc *); in seg6_hmac_init_algo()
383 if (!algo->shashs) in seg6_hmac_init_algo()
391 *per_cpu_ptr(algo->shashs, cpu) = shash; in seg6_hmac_init_algo()
414 struct seg6_hmac_algo *algo = NULL; in seg6_hmac_exit() local
419 algo = &hmac_algos[i]; in seg6_hmac_exit()
424 shash = *per_cpu_ptr(algo->shashs, cpu); in seg6_hmac_exit()
426 tfm = *per_cpu_ptr(algo->tfms, cpu); in seg6_hmac_exit()
429 free_percpu(algo->tfms); in seg6_hmac_exit()
430 free_percpu(algo->shashs); in seg6_hmac_exit()