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()
142 static int cls_bpf_init(struct tcf_proto *tp) in cls_bpf_init() argument
151 rcu_assign_pointer(tp->root, head); in cls_bpf_init()
156 static void cls_bpf_delete_prog(struct tcf_proto *tp, struct cls_bpf_prog *prog) in cls_bpf_delete_prog() argument
174 cls_bpf_delete_prog(prog->tp, prog); in __cls_bpf_delete_prog()
177 static int cls_bpf_delete(struct tcf_proto *tp, unsigned long arg) in cls_bpf_delete() argument
182 tcf_unbind_filter(tp, &prog->res); in cls_bpf_delete()
188 static bool cls_bpf_destroy(struct tcf_proto *tp, bool force) in cls_bpf_destroy() argument
190 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_destroy()
198 tcf_unbind_filter(tp, &prog->res); in cls_bpf_destroy()
202 RCU_INIT_POINTER(tp->root, NULL); in cls_bpf_destroy()
207 static unsigned long cls_bpf_get(struct tcf_proto *tp, u32 handle) in cls_bpf_get() argument
209 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_get()
266 const struct tcf_proto *tp) in cls_bpf_prog_from_efd() argument
299 netif_keep_dst(qdisc_dev(tp->q)); in cls_bpf_prog_from_efd()
304 static int cls_bpf_modify_existing(struct net *net, struct tcf_proto *tp, in cls_bpf_modify_existing() argument
319 ret = tcf_exts_validate(net, tp, tb, est, &exts, ovr); in cls_bpf_modify_existing()
337 cls_bpf_prog_from_efd(tb, prog, tp); in cls_bpf_modify_existing()
345 tcf_bind_filter(tp, &prog->res, base); in cls_bpf_modify_existing()
348 tcf_exts_change(tp, &prog->exts, &exts); in cls_bpf_modify_existing()
352 static u32 cls_bpf_grab_new_handle(struct tcf_proto *tp, in cls_bpf_grab_new_handle() argument
361 } while (--i > 0 && cls_bpf_get(tp, head->hgen)); in cls_bpf_grab_new_handle()
374 struct tcf_proto *tp, unsigned long base, in cls_bpf_change() argument
378 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_change()
405 prog->handle = cls_bpf_grab_new_handle(tp, head); in cls_bpf_change()
413 ret = cls_bpf_modify_existing(net, tp, prog, base, tb, tca[TCA_RATE], ovr); in cls_bpf_change()
419 tcf_unbind_filter(tp, &oldprog->res); in cls_bpf_change()
464 static int cls_bpf_dump(struct net *net, struct tcf_proto *tp, unsigned long fh, in cls_bpf_dump() argument
512 static void cls_bpf_walk(struct tcf_proto *tp, struct tcf_walker *arg) in cls_bpf_walk() argument
514 struct cls_bpf_head *head = rtnl_dereference(tp->root); in cls_bpf_walk()
520 if (arg->fn(tp, (unsigned long) prog, arg) < 0) { in cls_bpf_walk()