Lines Matching refs:hinfo
47 const struct seg6_hmac_info *hinfo = obj;
49 return (hinfo->hmackeyid != *(__u32 *)arg->key);
52 static inline void seg6_hinfo_release(struct seg6_hmac_info *hinfo)
54 kfree_rcu(hinfo, rcu);
59 struct seg6_hmac_info *hinfo = (struct seg6_hmac_info *)ptr;
61 if (hinfo)
62 seg6_hinfo_release(hinfo);
118 static int __do_hmac(struct seg6_hmac_info *hinfo, const char *text, u8 psize,
126 algo = __hmac_get_algo(hinfo->alg_id);
139 ret = crypto_shash_setkey(tfm, hinfo->secret, hinfo->slen);
160 int seg6_hmac_compute(struct seg6_hmac_info *hinfo, struct ipv6_sr_hdr *hdr,
163 __be32 hmackeyid = cpu_to_be32(hinfo->hmackeyid);
213 dgsize = __do_hmac(hinfo, ring, plen, tmp_out,
240 struct seg6_hmac_info *hinfo;
265 hinfo = seg6_hmac_info_lookup(net, be32_to_cpu(tlv->hmackeyid));
266 if (!hinfo)
269 if (seg6_hmac_compute(hinfo, srh, &ipv6_hdr(skb)->saddr, hmac_output))
283 struct seg6_hmac_info *hinfo;
285 hinfo = rhashtable_lookup_fast(&sdata->hmac_infos, &key, rht_params);
287 return hinfo;
291 int seg6_hmac_info_add(struct net *net, u32 key, struct seg6_hmac_info *hinfo)
296 err = rhashtable_lookup_insert_fast(&sdata->hmac_infos, &hinfo->node,
306 struct seg6_hmac_info *hinfo;
309 hinfo = rhashtable_lookup_fast(&sdata->hmac_infos, &key, rht_params);
310 if (!hinfo)
313 err = rhashtable_remove_fast(&sdata->hmac_infos, &hinfo->node,
318 seg6_hinfo_release(hinfo);
328 struct seg6_hmac_info *hinfo;
338 hinfo = seg6_hmac_info_lookup(net, be32_to_cpu(tlv->hmackeyid));
339 if (!hinfo)
343 err = seg6_hmac_compute(hinfo, srh, saddr, tlv->hmac);