Lines Matching refs:tp

43 	struct tcf_proto *tp;  member
81 static int tcindex_classify(struct sk_buff *skb, const struct tcf_proto *tp, in tcindex_classify() argument
84 struct tcindex_data *p = rcu_dereference_bh(tp->root); in tcindex_classify()
89 skb, tp, res, p); in tcindex_classify()
95 res->classid = TC_H_MAKE(TC_H_MAJ(tp->q->handle), key); in tcindex_classify()
107 static unsigned long tcindex_get(struct tcf_proto *tp, u32 handle) in tcindex_get() argument
109 struct tcindex_data *p = rtnl_dereference(tp->root); in tcindex_get()
112 pr_debug("tcindex_get(tp %p,handle 0x%08x)\n", tp, handle); in tcindex_get()
119 static int tcindex_init(struct tcf_proto *tp) in tcindex_init() argument
123 pr_debug("tcindex_init(tp %p)\n", tp); in tcindex_init()
132 rcu_assign_pointer(tp->root, p); in tcindex_init()
137 tcindex_delete(struct tcf_proto *tp, unsigned long arg) in tcindex_delete() argument
139 struct tcindex_data *p = rtnl_dereference(tp->root); in tcindex_delete()
144 pr_debug("tcindex_delete(tp %p,arg 0x%lx),p %p\n", tp, arg, p); in tcindex_delete()
164 tcf_unbind_filter(tp, &r->res); in tcindex_delete()
171 static int tcindex_destroy_element(struct tcf_proto *tp, in tcindex_destroy_element() argument
175 return tcindex_delete(tp, arg); in tcindex_destroy_element()
216 tcindex_set_parms(struct net *net, struct tcf_proto *tp, unsigned long base, in tcindex_set_parms() argument
229 err = tcf_exts_validate(net, tp, tb, est, &e, ovr); in tcindex_set_parms()
247 cp->tp = tp; in tcindex_set_parms()
361 tcf_bind_filter(tp, &cr.res, base); in tcindex_set_parms()
365 tcf_exts_change(tp, &r->exts, &e); in tcindex_set_parms()
367 tcf_exts_change(tp, &cr.exts, &e); in tcindex_set_parms()
374 rcu_assign_pointer(tp->root, cp); in tcindex_set_parms()
380 tcf_exts_change(tp, &f->result.exts, &r->exts); in tcindex_set_parms()
408 struct tcf_proto *tp, unsigned long base, u32 handle, in tcindex_change() argument
413 struct tcindex_data *p = rtnl_dereference(tp->root); in tcindex_change()
419 tp, handle, tca, arg, opt, p, r, arg ? *arg : 0L); in tcindex_change()
428 return tcindex_set_parms(net, tp, base, handle, p, r, tb, in tcindex_change()
432 static void tcindex_walk(struct tcf_proto *tp, struct tcf_walker *walker) in tcindex_walk() argument
434 struct tcindex_data *p = rtnl_dereference(tp->root); in tcindex_walk()
438 pr_debug("tcindex_walk(tp %p,walker %p),p %p\n", tp, walker, p); in tcindex_walk()
444 if (walker->fn(tp, in tcindex_walk()
460 if (walker->fn(tp, (unsigned long) &f->result, in tcindex_walk()
471 static bool tcindex_destroy(struct tcf_proto *tp, bool force) in tcindex_destroy() argument
473 struct tcindex_data *p = rtnl_dereference(tp->root); in tcindex_destroy()
479 pr_debug("tcindex_destroy(tp %p),p %p\n", tp, p); in tcindex_destroy()
483 tcindex_walk(tp, &walker); in tcindex_destroy()
485 RCU_INIT_POINTER(tp->root, NULL); in tcindex_destroy()
491 static int tcindex_dump(struct net *net, struct tcf_proto *tp, unsigned long fh, in tcindex_dump() argument
494 struct tcindex_data *p = rtnl_dereference(tp->root); in tcindex_dump()
499 tp, fh, skb, t, p, r); in tcindex_dump()