Lines Matching refs:tp

49 	struct tcf_proto *tp;  member
62 static int cls_bpf_classify(struct sk_buff *skb, const struct tcf_proto *tp, in cls_bpf_classify() argument
65 struct cls_bpf_head *head = rcu_dereference_bh(tp->root); in cls_bpf_classify()
100 static int cls_bpf_init(struct tcf_proto *tp) in cls_bpf_init() argument
109 rcu_assign_pointer(tp->root, head); in cls_bpf_init()
114 static void cls_bpf_delete_prog(struct tcf_proto *tp, struct cls_bpf_prog *prog) in cls_bpf_delete_prog() argument
132 cls_bpf_delete_prog(prog->tp, prog); in __cls_bpf_delete_prog()
135 static int cls_bpf_delete(struct tcf_proto *tp, unsigned long arg) in cls_bpf_delete() argument
140 tcf_unbind_filter(tp, &prog->res); in cls_bpf_delete()
146 static bool cls_bpf_destroy(struct tcf_proto *tp, bool force) in cls_bpf_destroy() argument
148 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_destroy()
156 tcf_unbind_filter(tp, &prog->res); in cls_bpf_destroy()
160 RCU_INIT_POINTER(tp->root, NULL); in cls_bpf_destroy()
165 static unsigned long cls_bpf_get(struct tcf_proto *tp, u32 handle) in cls_bpf_get() argument
167 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_get()
264 static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp, in cls_bpf_modify_existing() argument
282 ret = tcf_exts_validate(net, tp, tb, est, &exts, ovr); in cls_bpf_modify_existing()
295 tcf_bind_filter(tp, &prog->res, base); in cls_bpf_modify_existing()
296 tcf_exts_change(tp, &prog->exts, &exts); in cls_bpf_modify_existing()
301 static u32 cls_bpf_grab_new_handle(struct tcf_proto *tp, in cls_bpf_grab_new_handle() argument
310 } while (--i > 0 && cls_bpf_get(tp, head->hgen)); in cls_bpf_grab_new_handle()
323 struct tcf_proto *tp, unsigned long base, in cls_bpf_change() argument
327 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_change()
354 prog->handle = cls_bpf_grab_new_handle(tp, head); in cls_bpf_change()
362 ret = cls_bpf_modify_existing(net, tp, prog, base, tb, tca[TCA_RATE], ovr); in cls_bpf_change()
368 tcf_unbind_filter(tp, &oldprog->res); in cls_bpf_change()
413 static int cls_bpf_dump(struct net *net, struct tcf_proto *tp, unsigned long fh, in cls_bpf_dump() argument
454 static void cls_bpf_walk(struct tcf_proto *tp, struct tcf_walker *arg) in cls_bpf_walk() argument
456 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_walk()
462 if (arg->fn(tp, (unsigned long) prog, arg) < 0) { in cls_bpf_walk()