• Home
  • Raw
  • Download

Lines Matching refs:tp

103 static int u32_classify(struct sk_buff *skb, const struct tcf_proto *tp,  in u32_classify()  argument
111 struct tc_u_hnode *ht = rcu_dereference_bh(tp->root); in u32_classify()
286 static void *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()
319 static void *tc_u_common_ptr(const struct tcf_proto *tp) in tc_u_common_ptr() argument
321 struct tcf_block *block = tp->chain->block; in tc_u_common_ptr()
350 static int u32_init(struct tcf_proto *tp) in u32_init() argument
353 void *key = tc_u_common_ptr(tp); in u32_init()
362 root_ht->prio = tp->prio; in u32_init()
384 rcu_assign_pointer(tp->root, root_ht); in u32_init()
385 tp->data = tp_c; in u32_init()
448 static int u32_delete_key(struct tcf_proto *tp, struct tc_u_knode *key) in u32_delete_key() argument
450 struct tc_u_common *tp_c = tp->data; in u32_delete_key()
463 tcf_unbind_filter(tp, &key->res); in u32_delete_key()
475 static void u32_clear_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h, in u32_clear_hw_hnode() argument
478 struct tcf_block *block = tp->chain->block; in u32_clear_hw_hnode()
481 tc_cls_common_offload_init(&cls_u32.common, tp, h->flags, extack); in u32_clear_hw_hnode()
490 static int u32_replace_hw_hnode(struct tcf_proto *tp, struct tc_u_hnode *h, in u32_replace_hw_hnode() argument
493 struct tcf_block *block = tp->chain->block; in u32_replace_hw_hnode()
499 tc_cls_common_offload_init(&cls_u32.common, tp, flags, extack); in u32_replace_hw_hnode()
507 u32_clear_hw_hnode(tp, h, NULL); in u32_replace_hw_hnode()
519 static void u32_remove_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n, in u32_remove_hw_knode() argument
522 struct tcf_block *block = tp->chain->block; in u32_remove_hw_knode()
525 tc_cls_common_offload_init(&cls_u32.common, tp, n->flags, extack); in u32_remove_hw_knode()
529 tc_setup_cb_destroy(block, tp, TC_SETUP_CLSU32, &cls_u32, false, in u32_remove_hw_knode()
533 static int u32_replace_hw_knode(struct tcf_proto *tp, struct tc_u_knode *n, in u32_replace_hw_knode() argument
537 struct tcf_block *block = tp->chain->block; in u32_replace_hw_knode()
542 tc_cls_common_offload_init(&cls_u32.common, tp, flags, extack); in u32_replace_hw_knode()
559 err = tc_setup_cb_add(block, tp, TC_SETUP_CLSU32, &cls_u32, skip_sw, in u32_replace_hw_knode()
562 u32_remove_hw_knode(tp, n, NULL); in u32_replace_hw_knode()
572 static void u32_clear_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht, in u32_clear_hnode() argument
575 struct tc_u_common *tp_c = tp->data; in u32_clear_hnode()
584 tcf_unbind_filter(tp, &n->res); in u32_clear_hnode()
585 u32_remove_hw_knode(tp, n, extack); in u32_clear_hnode()
595 static int u32_destroy_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht, in u32_destroy_hnode() argument
598 struct tc_u_common *tp_c = tp->data; in u32_destroy_hnode()
604 u32_clear_hnode(tp, ht, extack); in u32_destroy_hnode()
611 u32_clear_hw_hnode(tp, ht, extack); in u32_destroy_hnode()
623 static void u32_destroy(struct tcf_proto *tp, bool rtnl_held, in u32_destroy() argument
626 struct tc_u_common *tp_c = tp->data; in u32_destroy()
627 struct tc_u_hnode *root_ht = rtnl_dereference(tp->root); in u32_destroy()
632 u32_destroy_hnode(tp, root_ht, extack); in u32_destroy()
640 u32_clear_hnode(tp, ht, extack); in u32_destroy()
654 tp->data = NULL; in u32_destroy()
657 static int u32_delete(struct tcf_proto *tp, void *arg, bool *last, in u32_delete() argument
661 struct tc_u_common *tp_c = tp->data; in u32_delete()
665 u32_remove_hw_knode(tp, (struct tc_u_knode *)ht, extack); in u32_delete()
666 ret = u32_delete_key(tp, (struct tc_u_knode *)ht); in u32_delete()
676 u32_destroy_hnode(tp, ht, extack); in u32_delete()
713 static int u32_set_parms(struct net *net, struct tcf_proto *tp, in u32_set_parms() argument
721 err = tcf_exts_validate(net, tp, tb, est, &n->exts, flags, extack); in u32_set_parms()
741 ht_down = u32_lookup_ht(tp->data, handle); in u32_set_parms()
762 tcf_bind_filter(tp, &n->res, base); in u32_set_parms()
771 static void u32_replace_knode(struct tcf_proto *tp, struct tc_u_common *tp_c, in u32_replace_knode() argument
779 ht = rtnl_dereference(tp->root); in u32_replace_knode()
798 static struct tc_u_knode *u32_init_knode(struct net *net, struct tcf_proto *tp, in u32_init_knode() argument
847 struct tcf_proto *tp, unsigned long base, u32 handle, in u32_change() argument
851 struct tc_u_common *tp_c = tp->data; in u32_change()
898 new = u32_init_knode(net, tp, n); in u32_change()
902 err = u32_set_parms(net, tp, base, new, tb, in u32_change()
910 err = u32_replace_hw_knode(tp, new, flags, extack); in u32_change()
919 u32_replace_knode(tp, tp_c, new); in u32_change()
920 tcf_unbind_filter(tp, &n->res); in u32_change()
945 handle = gen_new_htid(tp->data, ht); in u32_change()
961 ht->prio = tp->prio; in u32_change()
965 err = u32_replace_hw_hnode(tp, ht, userflags, extack); in u32_change()
982 ht = rtnl_dereference(tp->root); in u32_change()
985 ht = u32_lookup_ht(tp->data, TC_U32_HTID(htid)); in u32_change()
992 ht = rtnl_dereference(tp->root); in u32_change()
1112 err = u32_set_parms(net, tp, base, n, tb, tca[TCA_RATE], flags, in u32_change()
1118 err = u32_replace_hw_knode(tp, n, flags, extack); in u32_change()
1155 static void u32_walk(struct tcf_proto *tp, struct tcf_walker *arg, in u32_walk() argument
1158 struct tc_u_common *tp_c = tp->data; in u32_walk()
1169 if (ht->prio != tp->prio) in u32_walk()
1172 if (arg->fn(tp, ht, arg) < 0) { in u32_walk()
1186 if (arg->fn(tp, n, arg) < 0) { in u32_walk()
1196 static int u32_reoffload_hnode(struct tcf_proto *tp, struct tc_u_hnode *ht, in u32_reoffload_hnode() argument
1203 tc_cls_common_offload_init(&cls_u32.common, tp, ht->flags, extack); in u32_reoffload_hnode()
1216 static int u32_reoffload_knode(struct tcf_proto *tp, struct tc_u_knode *n, in u32_reoffload_knode() argument
1221 struct tcf_block *block = tp->chain->block; in u32_reoffload_knode()
1224 tc_cls_common_offload_init(&cls_u32.common, tp, n->flags, extack); in u32_reoffload_knode()
1245 return tc_setup_cb_reoffload(block, tp, add, cb, TC_SETUP_CLSU32, in u32_reoffload_knode()
1250 static int u32_reoffload(struct tcf_proto *tp, bool add, flow_setup_cb_t *cb, in u32_reoffload() argument
1253 struct tc_u_common *tp_c = tp->data; in u32_reoffload()
1262 if (ht->prio != tp->prio) in u32_reoffload()
1270 err = u32_reoffload_hnode(tp, ht, add, cb, cb_priv, in u32_reoffload()
1283 err = u32_reoffload_knode(tp, n, add, cb, in u32_reoffload()
1291 u32_reoffload_hnode(tp, ht, add, cb, cb_priv, extack); in u32_reoffload()
1310 static int u32_dump(struct net *net, struct tcf_proto *tp, void *fh, in u32_dump() argument