Lines Matching refs:tp
50 struct tcf_proto *tp; member
78 static int cls_bpf_classify(struct sk_buff *skb, const struct tcf_proto *tp, in cls_bpf_classify() argument
81 struct cls_bpf_head *head = rcu_dereference_bh(tp->root); in cls_bpf_classify()
145 static int cls_bpf_init(struct tcf_proto *tp) in cls_bpf_init() argument
154 rcu_assign_pointer(tp->root, head); in cls_bpf_init()
159 static void cls_bpf_delete_prog(struct tcf_proto *tp, struct cls_bpf_prog *prog) in cls_bpf_delete_prog() argument
177 cls_bpf_delete_prog(prog->tp, prog); in __cls_bpf_delete_prog()
180 static int cls_bpf_delete(struct tcf_proto *tp, unsigned long arg) in cls_bpf_delete() argument
185 tcf_unbind_filter(tp, &prog->res); in cls_bpf_delete()
191 static bool cls_bpf_destroy(struct tcf_proto *tp, bool force) in cls_bpf_destroy() argument
193 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_destroy()
201 tcf_unbind_filter(tp, &prog->res); in cls_bpf_destroy()
209 static unsigned long cls_bpf_get(struct tcf_proto *tp, u32 handle) in cls_bpf_get() argument
211 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_get()
265 const struct tcf_proto *tp) in cls_bpf_prog_from_efd() argument
298 netif_keep_dst(qdisc_dev(tp->q)); in cls_bpf_prog_from_efd()
303 static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp, in cls_bpf_modify_existing() argument
318 ret = tcf_exts_validate(net, tp, tb, est, &exts, ovr); in cls_bpf_modify_existing()
336 cls_bpf_prog_from_efd(tb, prog, tp); in cls_bpf_modify_existing()
344 tcf_bind_filter(tp, &prog->res, base); in cls_bpf_modify_existing()
347 tcf_exts_change(tp, &prog->exts, &exts); in cls_bpf_modify_existing()
351 static u32 cls_bpf_grab_new_handle(struct tcf_proto *tp, in cls_bpf_grab_new_handle() argument
360 } while (--i > 0 && cls_bpf_get(tp, head->hgen)); in cls_bpf_grab_new_handle()
373 struct tcf_proto *tp, unsigned long base, in cls_bpf_change() argument
377 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_change()
404 prog->handle = cls_bpf_grab_new_handle(tp, head); in cls_bpf_change()
412 ret = cls_bpf_modify_existing(net, tp, prog, base, tb, tca[TCA_RATE], ovr); in cls_bpf_change()
418 tcf_unbind_filter(tp, &oldprog->res); in cls_bpf_change()
463 static int cls_bpf_dump(struct net *net, struct tcf_proto *tp, unsigned long fh, in cls_bpf_dump() argument
511 static void cls_bpf_walk(struct tcf_proto *tp, struct tcf_walker *arg) in cls_bpf_walk() argument
513 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_walk()
519 if (arg->fn(tp, (unsigned long) prog, arg) < 0) { in cls_bpf_walk()