Lines Matching refs:metaval
43 int ife_encode_meta_u16(u16 metaval, void *skbdata, struct tcf_meta_info *mi) in ife_encode_meta_u16() argument
47 if (mi->metaval) in ife_encode_meta_u16()
48 edata = *(u16 *)mi->metaval; in ife_encode_meta_u16()
49 else if (metaval) in ife_encode_meta_u16()
50 edata = metaval; in ife_encode_meta_u16()
62 if (mi->metaval) in ife_get_meta_u32()
63 return nla_put_u32(skb, mi->metaid, *(u32 *)mi->metaval); in ife_get_meta_u32()
69 int ife_check_meta_u32(u32 metaval, struct tcf_meta_info *mi) in ife_check_meta_u32() argument
71 if (metaval || mi->metaval) in ife_check_meta_u32()
78 int ife_check_meta_u16(u16 metaval, struct tcf_meta_info *mi) in ife_check_meta_u16() argument
80 if (metaval || mi->metaval) in ife_check_meta_u16()
87 int ife_encode_meta_u32(u32 metaval, void *skbdata, struct tcf_meta_info *mi) in ife_encode_meta_u32() argument
89 u32 edata = metaval; in ife_encode_meta_u32()
91 if (mi->metaval) in ife_encode_meta_u32()
92 edata = *(u32 *)mi->metaval; in ife_encode_meta_u32()
93 else if (metaval) in ife_encode_meta_u32()
94 edata = metaval; in ife_encode_meta_u32()
106 if (mi->metaval) in ife_get_meta_u16()
107 return nla_put_u16(skb, mi->metaid, *(u16 *)mi->metaval); in ife_get_meta_u16()
113 int ife_alloc_meta_u32(struct tcf_meta_info *mi, void *metaval, gfp_t gfp) in ife_alloc_meta_u32() argument
115 mi->metaval = kmemdup(metaval, sizeof(u32), gfp); in ife_alloc_meta_u32()
116 if (!mi->metaval) in ife_alloc_meta_u32()
123 int ife_alloc_meta_u16(struct tcf_meta_info *mi, void *metaval, gfp_t gfp) in ife_alloc_meta_u16() argument
125 mi->metaval = kmemdup(metaval, sizeof(u16), gfp); in ife_alloc_meta_u16()
126 if (!mi->metaval) in ife_alloc_meta_u16()
135 kfree(mi->metaval); in ife_release_meta_gen()
295 struct tcf_ife_info *ife, u32 metaid, void *metaval, in __add_metainfo() argument
308 ret = ops->alloc(mi, metaval, atomic ? GFP_ATOMIC : GFP_KERNEL); in __add_metainfo()
338 static int add_metainfo(struct tcf_ife_info *ife, u32 metaid, void *metaval, in add_metainfo() argument
346 ret = __add_metainfo(ops, ife, metaid, metaval, len, false, exists); in add_metainfo()
413 if (e->metaval) { in _tcf_ife_cleanup()
417 kfree(e->metaval); in _tcf_ife_cleanup()