Lines Matching refs:md_dst
286 static void __metadata_dst_init(struct metadata_dst *md_dst, in __metadata_dst_init() argument
291 dst = &md_dst->dst; in __metadata_dst_init()
294 memset(dst + 1, 0, sizeof(*md_dst) + optslen - sizeof(*dst)); in __metadata_dst_init()
295 md_dst->type = type; in __metadata_dst_init()
301 struct metadata_dst *md_dst; in metadata_dst_alloc() local
303 md_dst = kmalloc(sizeof(*md_dst) + optslen, flags); in metadata_dst_alloc()
304 if (!md_dst) in metadata_dst_alloc()
307 __metadata_dst_init(md_dst, type, optslen); in metadata_dst_alloc()
309 return md_dst; in metadata_dst_alloc()
313 void metadata_dst_free(struct metadata_dst *md_dst) in metadata_dst_free() argument
316 if (md_dst->type == METADATA_IP_TUNNEL) in metadata_dst_free()
317 dst_cache_destroy(&md_dst->u.tun_info.dst_cache); in metadata_dst_free()
319 kfree(md_dst); in metadata_dst_free()
327 struct metadata_dst __percpu *md_dst; in metadata_dst_alloc_percpu() local
329 md_dst = __alloc_percpu_gfp(sizeof(struct metadata_dst) + optslen, in metadata_dst_alloc_percpu()
331 if (!md_dst) in metadata_dst_alloc_percpu()
335 __metadata_dst_init(per_cpu_ptr(md_dst, cpu), type, optslen); in metadata_dst_alloc_percpu()
337 return md_dst; in metadata_dst_alloc_percpu()
341 void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst) in metadata_dst_free_percpu() argument
347 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()