Lines Matching full:em

171 			   struct tcf_ematch *em, struct nlattr *nla, int idx)  in tcf_em_validate()  argument
202 em->data = ref; in tcf_em_validate()
212 em->ops = tcf_em_lookup(em_hdr->kind); in tcf_em_validate()
214 if (em->ops == NULL) { in tcf_em_validate()
220 em->ops = tcf_em_lookup(em_hdr->kind); in tcf_em_validate()
221 if (em->ops) { in tcf_em_validate()
226 module_put(em->ops->owner); in tcf_em_validate()
227 em->ops = NULL; in tcf_em_validate()
237 if (em->ops->datalen && data_len < em->ops->datalen) in tcf_em_validate()
240 if (em->ops->change) { in tcf_em_validate()
244 err = em->ops->change(net, data, data_len, em); in tcf_em_validate()
258 if (em->ops->datalen > 0) in tcf_em_validate()
262 em->data = *(u32 *) data; in tcf_em_validate()
269 em->data = (unsigned long) v; in tcf_em_validate()
271 em->datalen = data_len; in tcf_em_validate()
275 em->matchid = em_hdr->matchid; in tcf_em_validate()
276 em->flags = em_hdr->flags; in tcf_em_validate()
277 em->net = net; in tcf_em_validate()
312 struct tcf_ematch *em; in tcf_em_tree_validate() local
335 matches_len = tree_hdr->nmatches * sizeof(*em); in tcf_em_tree_validate()
362 em = tcf_em_get_match(tree, idx); in tcf_em_tree_validate()
364 err = tcf_em_validate(tp, tree_hdr, em, rt_match, idx); in tcf_em_tree_validate()
408 struct tcf_ematch *em = tcf_em_get_match(tree, i); in tcf_em_tree_destroy() local
410 if (em->ops) { in tcf_em_tree_destroy()
411 if (em->ops->destroy) in tcf_em_tree_destroy()
412 em->ops->destroy(em); in tcf_em_tree_destroy()
413 else if (!tcf_em_is_simple(em)) in tcf_em_tree_destroy()
414 kfree((void *) em->data); in tcf_em_tree_destroy()
415 module_put(em->ops->owner); in tcf_em_tree_destroy()
458 struct tcf_ematch *em = tcf_em_get_match(tree, i); in tcf_em_tree_dump() local
460 .kind = em->ops ? em->ops->kind : TCF_EM_CONTAINER, in tcf_em_tree_dump()
461 .matchid = em->matchid, in tcf_em_tree_dump()
462 .flags = em->flags in tcf_em_tree_dump()
468 if (em->ops && em->ops->dump) { in tcf_em_tree_dump()
469 if (em->ops->dump(skb, em) < 0) in tcf_em_tree_dump()
471 } else if (tcf_em_is_container(em) || tcf_em_is_simple(em)) { in tcf_em_tree_dump()
472 u32 u = em->data; in tcf_em_tree_dump()
474 } else if (em->datalen > 0) in tcf_em_tree_dump()
475 nla_put_nohdr(skb, em->datalen, (void *) em->data); in tcf_em_tree_dump()
491 static inline int tcf_em_match(struct sk_buff *skb, struct tcf_ematch *em, in tcf_em_match() argument
494 int r = em->ops->match(skb, em, info); in tcf_em_match()
496 return tcf_em_is_inverted(em) ? !r : r; in tcf_em_match()