Lines Matching refs:hinfo

48 	const struct seg6_hmac_info *hinfo = obj;
50 return (hinfo->hmackeyid != *(__u32 *)arg->key);
53 static inline void seg6_hinfo_release(struct seg6_hmac_info *hinfo)
55 kfree_rcu(hinfo, rcu);
60 struct seg6_hmac_info *hinfo = (struct seg6_hmac_info *)ptr;
62 if (hinfo)
63 seg6_hinfo_release(hinfo);
119 static int __do_hmac(struct seg6_hmac_info *hinfo, const char *text, u8 psize,
127 algo = __hmac_get_algo(hinfo->alg_id);
140 ret = crypto_shash_setkey(tfm, hinfo->secret, hinfo->slen);
161 int seg6_hmac_compute(struct seg6_hmac_info *hinfo, struct ipv6_sr_hdr *hdr,
164 __be32 hmackeyid = cpu_to_be32(hinfo->hmackeyid);
214 dgsize = __do_hmac(hinfo, ring, plen, tmp_out,
241 struct seg6_hmac_info *hinfo;
266 hinfo = seg6_hmac_info_lookup(net, be32_to_cpu(tlv->hmackeyid));
267 if (!hinfo)
270 if (seg6_hmac_compute(hinfo, srh, &ipv6_hdr(skb)->saddr, hmac_output))
284 struct seg6_hmac_info *hinfo;
286 hinfo = rhashtable_lookup_fast(&sdata->hmac_infos, &key, rht_params);
288 return hinfo;
292 int seg6_hmac_info_add(struct net *net, u32 key, struct seg6_hmac_info *hinfo)
297 err = rhashtable_lookup_insert_fast(&sdata->hmac_infos, &hinfo->node,
307 struct seg6_hmac_info *hinfo;
310 hinfo = rhashtable_lookup_fast(&sdata->hmac_infos, &key, rht_params);
311 if (!hinfo)
314 err = rhashtable_remove_fast(&sdata->hmac_infos, &hinfo->node,
319 seg6_hinfo_release(hinfo);
329 struct seg6_hmac_info *hinfo;
339 hinfo = seg6_hmac_info_lookup(net, be32_to_cpu(tlv->hmackeyid));
340 if (!hinfo)
344 err = seg6_hmac_compute(hinfo, srh, saddr, tlv->hmac);