Lines Matching refs:f

46 	struct basic_filter *f;  in basic_classify()  local
48 list_for_each_entry_rcu(f, &head->flist, link) { in basic_classify()
49 if (!tcf_em_tree_match(skb, &f->ematches, NULL)) 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 kfree(f); in __basic_delete_filter()
97 struct basic_filter *f = container_of(to_rcu_work(work), in basic_delete_filter_work() local
101 __basic_delete_filter(f); in basic_delete_filter_work()
108 struct basic_filter *f, *n; in basic_destroy() local
110 list_for_each_entry_safe(f, n, &head->flist, link) { in basic_destroy()
111 list_del_rcu(&f->link); in basic_destroy()
112 tcf_unbind_filter(tp, &f->res); in basic_destroy()
113 idr_remove(&head->handle_idr, f->handle); in basic_destroy()
114 if (tcf_exts_get_net(&f->exts)) in basic_destroy()
115 tcf_queue_work(&f->rwork, basic_delete_filter_work); in basic_destroy()
117 __basic_delete_filter(f); in basic_destroy()
127 struct basic_filter *f = arg; in basic_delete() local
129 list_del_rcu(&f->link); in basic_delete()
130 tcf_unbind_filter(tp, &f->res); in basic_delete()
131 idr_remove(&head->handle_idr, f->handle); in basic_delete()
132 tcf_exts_get_net(&f->exts); in basic_delete()
133 tcf_queue_work(&f->rwork, basic_delete_filter_work); in basic_delete()
144 struct basic_filter *f, unsigned long base, in basic_set_parms() argument
151 err = tcf_exts_validate(net, tp, tb, est, &f->exts, ovr, extack); in basic_set_parms()
155 err = tcf_em_tree_validate(tp, tb[TCA_BASIC_EMATCHES], &f->ematches); in basic_set_parms()
160 f->res.classid = nla_get_u32(tb[TCA_BASIC_CLASSID]); in basic_set_parms()
161 tcf_bind_filter(tp, &f->res, base); in basic_set_parms()
164 f->tp = tp; in basic_set_parms()
242 struct basic_filter *f; in basic_walk() local
244 list_for_each_entry(f, &head->flist, link) { in basic_walk()
248 if (arg->fn(tp, f, arg) < 0) { in basic_walk()
259 struct basic_filter *f = fh; in basic_bind_class() local
261 if (f && f->res.classid == classid) in basic_bind_class()
262 f->res.class = cl; in basic_bind_class()
268 struct basic_filter *f = fh; in basic_dump() local
271 if (f == NULL) in basic_dump()
274 t->tcm_handle = f->handle; in basic_dump()
280 if (f->res.classid && in basic_dump()
281 nla_put_u32(skb, TCA_BASIC_CLASSID, f->res.classid)) in basic_dump()
284 if (tcf_exts_dump(skb, &f->exts) < 0 || in basic_dump()
285 tcf_em_tree_dump(skb, &f->ematches, TCA_BASIC_EMATCHES) < 0) in basic_dump()
290 if (tcf_exts_dump_stats(skb, &f->exts) < 0) in basic_dump()