Lines Matching refs:tp

66 	struct tcf_proto	*tp;  member
105 static int u32_classify(struct sk_buff *skb, const struct tcf_proto *tp, struct tcf_result *res) in u32_classify() argument
112 struct tc_u_hnode *ht = rcu_dereference_bh(tp->root); in u32_classify()
286 static unsigned long u32_get(struct tcf_proto *tp, u32 handle) in u32_get() argument
289 struct tc_u_common *tp_c = tp->data; in u32_get()
292 ht = rtnl_dereference(tp->root); in u32_get()
320 static int u32_init(struct tcf_proto *tp) in u32_init() argument
325 tp_c = tp->q->u32_node; in u32_init()
334 root_ht->prio = tp->prio; in u32_init()
342 tp_c->q = tp->q; in u32_init()
343 tp->q->u32_node = tp_c; in u32_init()
351 rcu_assign_pointer(tp->root, root_ht); in u32_init()
352 tp->data = tp_c; in u32_init()
356 static int u32_destroy_key(struct tcf_proto *tp, in u32_destroy_key() argument
387 u32_destroy_key(key->tp, key, false); in u32_delete_key_rcu()
401 u32_destroy_key(key->tp, key, true); in u32_delete_key_freepf_rcu()
404 static int u32_delete_key(struct tcf_proto *tp, struct tc_u_knode *key) in u32_delete_key() argument
417 tcf_unbind_filter(tp, &key->res); in u32_delete_key()
427 static void u32_clear_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht) in u32_clear_hnode() argument
436 tcf_unbind_filter(tp, &n->res); in u32_clear_hnode()
442 static int u32_destroy_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht) in u32_destroy_hnode() argument
444 struct tc_u_common *tp_c = tp->data; in u32_destroy_hnode()
450 u32_clear_hnode(tp, ht); in u32_destroy_hnode()
477 static bool u32_destroy(struct tcf_proto *tp, bool force) in u32_destroy() argument
479 struct tc_u_common *tp_c = tp->data; in u32_destroy()
480 struct tc_u_hnode *root_ht = rtnl_dereference(tp->root); in u32_destroy()
509 u32_destroy_hnode(tp, root_ht); in u32_destroy()
514 tp->q->u32_node = NULL; in u32_destroy()
520 u32_clear_hnode(tp, ht); in u32_destroy()
531 tp->data = NULL; in u32_destroy()
535 static int u32_delete(struct tcf_proto *tp, unsigned long arg) in u32_delete() argument
538 struct tc_u_hnode *root_ht = rtnl_dereference(tp->root); in u32_delete()
544 return u32_delete_key(tp, (struct tc_u_knode *)ht); in u32_delete()
551 u32_destroy_hnode(tp, ht); in u32_delete()
592 static int u32_set_parms(struct net *net, struct tcf_proto *tp, in u32_set_parms() argument
601 err = tcf_exts_validate(net, tp, tb, est, &e, ovr); in u32_set_parms()
629 tcf_bind_filter(tp, &n->res, base); in u32_set_parms()
641 tcf_exts_change(tp, &n->exts, &e); in u32_set_parms()
649 static void u32_replace_knode(struct tcf_proto *tp, in u32_replace_knode() argument
658 ht = rtnl_dereference(tp->root); in u32_replace_knode()
676 static struct tc_u_knode *u32_init_knode(struct tcf_proto *tp, in u32_init_knode() argument
717 new->tp = tp; in u32_init_knode()
726 struct tcf_proto *tp, unsigned long base, u32 handle, in u32_change() argument
730 struct tc_u_common *tp_c = tp->data; in u32_change()
756 new = u32_init_knode(tp, n); in u32_change()
760 err = u32_set_parms(net, tp, base, in u32_change()
765 u32_destroy_key(tp, new, false); in u32_change()
769 u32_replace_knode(tp, tp_c, new); in u32_change()
770 tcf_unbind_filter(tp, &n->res); in u32_change()
783 handle = gen_new_htid(tp->data); in u32_change()
794 ht->prio = tp->prio; in u32_change()
804 ht = rtnl_dereference(tp->root); in u32_change()
807 ht = u32_lookup_ht(tp->data, TC_U32_HTID(htid)); in u32_change()
812 ht = rtnl_dereference(tp->root); in u32_change()
849 n->tp = tp; in u32_change()
867 err = u32_set_parms(net, tp, base, ht, n, tb, tca[TCA_RATE], ovr); in u32_change()
897 static void u32_walk(struct tcf_proto *tp, struct tcf_walker *arg) in u32_walk() argument
899 struct tc_u_common *tp_c = tp->data; in u32_walk()
910 if (ht->prio != tp->prio) in u32_walk()
913 if (arg->fn(tp, (unsigned long)ht, arg) < 0) { in u32_walk()
927 if (arg->fn(tp, (unsigned long)n, arg) < 0) { in u32_walk()
937 static int u32_dump(struct net *net, struct tcf_proto *tp, unsigned long fh, in u32_dump() argument