Lines Matching refs:md_dst
258 static void __metadata_dst_init(struct metadata_dst *md_dst, in __metadata_dst_init() argument
264 dst = &md_dst->dst; in __metadata_dst_init()
271 memset(dst + 1, 0, sizeof(*md_dst) + optslen - sizeof(*dst)); in __metadata_dst_init()
272 md_dst->type = type; in __metadata_dst_init()
278 struct metadata_dst *md_dst; in metadata_dst_alloc() local
280 md_dst = kmalloc(sizeof(*md_dst) + optslen, flags); in metadata_dst_alloc()
281 if (!md_dst) in metadata_dst_alloc()
284 __metadata_dst_init(md_dst, type, optslen); in metadata_dst_alloc()
286 return md_dst; in metadata_dst_alloc()
290 void metadata_dst_free(struct metadata_dst *md_dst) in metadata_dst_free() argument
293 if (md_dst->type == METADATA_IP_TUNNEL) in metadata_dst_free()
294 dst_cache_destroy(&md_dst->u.tun_info.dst_cache); in metadata_dst_free()
296 kfree(md_dst); in metadata_dst_free()
304 struct metadata_dst __percpu *md_dst; in metadata_dst_alloc_percpu() local
306 md_dst = __alloc_percpu_gfp(sizeof(struct metadata_dst) + optslen, in metadata_dst_alloc_percpu()
308 if (!md_dst) in metadata_dst_alloc_percpu()
312 __metadata_dst_init(per_cpu_ptr(md_dst, cpu), type, optslen); in metadata_dst_alloc_percpu()
314 return md_dst; in metadata_dst_alloc_percpu()
318 void metadata_dst_free_percpu(struct metadata_dst __percpu *md_dst) in metadata_dst_free_percpu() argument
324 struct metadata_dst *one_md_dst = per_cpu_ptr(md_dst, cpu); in metadata_dst_free_percpu()
330 free_percpu(md_dst); in metadata_dst_free_percpu()