Lines Matching full:f
44 struct basic_filter *f; in basic_classify() local
46 list_for_each_entry_rcu(f, &head->flist, link) { in basic_classify()
47 __this_cpu_inc(f->pf->rcnt); in basic_classify()
48 if (!tcf_em_tree_match(skb, &f->ematches, NULL)) in basic_classify()
50 __this_cpu_inc(f->pf->rhit); in basic_classify()
51 *res = f->res; in basic_classify()
52 r = tcf_exts_exec(skb, &f->exts, res); in basic_classify()
63 struct basic_filter *f; in basic_get() local
65 list_for_each_entry(f, &head->flist, link) { in basic_get()
66 if (f->handle == handle) { in basic_get()
67 return f; in basic_get()
87 static void __basic_delete_filter(struct basic_filter *f) in __basic_delete_filter() argument
89 tcf_exts_destroy(&f->exts); in __basic_delete_filter()
90 tcf_em_tree_destroy(&f->ematches); in __basic_delete_filter()
91 tcf_exts_put_net(&f->exts); in __basic_delete_filter()
92 free_percpu(f->pf); in __basic_delete_filter()
93 kfree(f); in __basic_delete_filter()
98 struct basic_filter *f = container_of(to_rcu_work(work), in basic_delete_filter_work() local
102 __basic_delete_filter(f); in basic_delete_filter_work()
110 struct basic_filter *f, *n; in basic_destroy() local
112 list_for_each_entry_safe(f, n, &head->flist, link) { in basic_destroy()
113 list_del_rcu(&f->link); in basic_destroy()
114 tcf_unbind_filter(tp, &f->res); in basic_destroy()
115 idr_remove(&head->handle_idr, f->handle); in basic_destroy()
116 if (tcf_exts_get_net(&f->exts)) in basic_destroy()
117 tcf_queue_work(&f->rwork, basic_delete_filter_work); in basic_destroy()
119 __basic_delete_filter(f); in basic_destroy()
129 struct basic_filter *f = arg; in basic_delete() local
131 list_del_rcu(&f->link); in basic_delete()
132 tcf_unbind_filter(tp, &f->res); in basic_delete()
133 idr_remove(&head->handle_idr, f->handle); in basic_delete()
134 tcf_exts_get_net(&f->exts); in basic_delete()
135 tcf_queue_work(&f->rwork, basic_delete_filter_work); in basic_delete()
146 struct basic_filter *f, unsigned long base, in basic_set_parms() argument
153 err = tcf_exts_validate(net, tp, tb, est, &f->exts, ovr, true, extack); in basic_set_parms()
157 err = tcf_em_tree_validate(tp, tb[TCA_BASIC_EMATCHES], &f->ematches); in basic_set_parms()
162 f->res.classid = nla_get_u32(tb[TCA_BASIC_CLASSID]); in basic_set_parms()
163 tcf_bind_filter(tp, &f->res, base); in basic_set_parms()
166 f->tp = tp; in basic_set_parms()
251 struct basic_filter *f; in basic_walk() local
253 list_for_each_entry(f, &head->flist, link) { in basic_walk()
257 if (arg->fn(tp, f, arg) < 0) { in basic_walk()
269 struct basic_filter *f = fh; in basic_bind_class() local
271 if (f && f->res.classid == classid) { in basic_bind_class()
273 __tcf_bind_filter(q, &f->res, base); in basic_bind_class()
275 __tcf_unbind_filter(q, &f->res); in basic_bind_class()
283 struct basic_filter *f = fh; in basic_dump() local
287 if (f == NULL) in basic_dump()
290 t->tcm_handle = f->handle; in basic_dump()
296 if (f->res.classid && in basic_dump()
297 nla_put_u32(skb, TCA_BASIC_CLASSID, f->res.classid)) in basic_dump()
301 struct tc_basic_pcnt *pf = per_cpu_ptr(f->pf, cpu); in basic_dump()
312 if (tcf_exts_dump(skb, &f->exts) < 0 || in basic_dump()
313 tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0) in basic_dump()
318 if (tcf_exts_dump_stats(skb, &f->exts) < 0) in basic_dump()