Lines Matching refs:v
89 static inline int meta_id(struct meta_value *v) in meta_id() argument
91 return TCF_META_ID(v->hdr.kind); in meta_id()
94 static inline int meta_type(struct meta_value *v) in meta_type() argument
96 return TCF_META_TYPE(v->hdr.kind); in meta_type()
100 struct tcf_pkt_info *info, struct meta_value *v, \
706 static void meta_var_destroy(struct meta_value *v) in meta_var_destroy() argument
708 kfree((void *) v->val); in meta_var_destroy()
711 static void meta_var_apply_extras(struct meta_value *v, in meta_var_apply_extras() argument
714 int shift = v->hdr.shift; in meta_var_apply_extras()
720 static int meta_var_dump(struct sk_buff *skb, struct meta_value *v, int tlv) in meta_var_dump() argument
722 if (v->val && v->len && in meta_var_dump()
723 nla_put(skb, tlv, v->len, (void *) v->val)) in meta_var_dump()
762 static void meta_int_apply_extras(struct meta_value *v, in meta_int_apply_extras() argument
765 if (v->hdr.shift) in meta_int_apply_extras()
766 dst->value >>= v->hdr.shift; in meta_int_apply_extras()
768 if (v->val) in meta_int_apply_extras()
769 dst->value &= v->val; in meta_int_apply_extras()
772 static int meta_int_dump(struct sk_buff *skb, struct meta_value *v, int tlv) in meta_int_dump() argument
774 if (v->len == sizeof(unsigned long)) { in meta_int_dump()
775 if (nla_put(skb, tlv, sizeof(unsigned long), &v->val)) in meta_int_dump()
777 } else if (v->len == sizeof(u32)) { in meta_int_dump()
778 if (nla_put_u32(skb, tlv, v->val)) in meta_int_dump()
816 static inline const struct meta_type_ops *meta_type_ops(struct meta_value *v) in meta_type_ops() argument
818 return &__meta_type_ops[meta_type(v)]; in meta_type_ops()
826 struct meta_value *v, struct meta_obj *dst) in meta_get() argument
830 if (meta_id(v) == TCF_META_ID_VALUE) { in meta_get()
831 dst->value = v->val; in meta_get()
832 dst->len = v->len; in meta_get()
836 meta_ops(v)->get(skb, info, v, dst, &err); in meta_get()
840 if (meta_type_ops(v)->apply_extras) in meta_get()
841 meta_type_ops(v)->apply_extras(v, dst); in meta_get()