Lines Matching refs:md_dst

170 			struct metadata_dst *md_dst = (struct metadata_dst *)dst;  in dst_release()  local
172 if (md_dst->type == METADATA_IP_TUNNEL) in dst_release()
173 dst_cache_reset_now(&md_dst->u.tun_info.dst_cache); in dst_release()
280 static void __metadata_dst_init(struct metadata_dst *md_dst, in __metadata_dst_init() argument
285 dst = &md_dst->dst; in __metadata_dst_init()
288 memset(dst + 1, 0, sizeof(*md_dst) + optslen - sizeof(*dst)); in __metadata_dst_init()
289 md_dst->type = type; in __metadata_dst_init()
295 struct metadata_dst *md_dst; in metadata_dst_alloc() local
297 md_dst = kmalloc(struct_size(md_dst, u.tun_info.options, optslen), in metadata_dst_alloc()
299 if (!md_dst) in metadata_dst_alloc()
302 __metadata_dst_init(md_dst, type, optslen); in metadata_dst_alloc()
304 return md_dst; in metadata_dst_alloc()
308 void metadata_dst_free(struct metadata_dst *md_dst) in metadata_dst_free() argument
311 if (md_dst->type == METADATA_IP_TUNNEL) in metadata_dst_free()
312 dst_cache_destroy(&md_dst->u.tun_info.dst_cache); in metadata_dst_free()
314 if (md_dst->type == METADATA_XFRM) in metadata_dst_free()
315 dst_release(md_dst->u.xfrm_info.dst_orig); in metadata_dst_free()
316 kfree(md_dst); in metadata_dst_free()
324 struct metadata_dst __percpu *md_dst; in metadata_dst_alloc_percpu() local
326 md_dst = __alloc_percpu_gfp(struct_size(md_dst, u.tun_info.options, in metadata_dst_alloc_percpu()
329 if (!md_dst) in metadata_dst_alloc_percpu()
333 __metadata_dst_init(per_cpu_ptr(md_dst, cpu), type, optslen); in metadata_dst_alloc_percpu()
335 return md_dst; in metadata_dst_alloc_percpu()
339 void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst) in metadata_dst_free_percpu() argument
344 struct metadata_dst *one_md_dst = per_cpu_ptr(md_dst, cpu); in metadata_dst_free_percpu()
353 free_percpu(md_dst); in metadata_dst_free_percpu()