• Home
  • Raw
  • Download

Lines Matching refs:f

81 		   struct route4_filter *f)  in route4_set_fastmap()  argument
89 head->fastmap[h].filter = f; in route4_set_fastmap()
115 *res = f->res; \
116 if (tcf_exts_is_available(&f->exts)) { \
117 int r = tcf_exts_exec(skb, &f->exts, res); \
124 route4_set_fastmap(head, id, iif, f); \
134 struct route4_filter *f; in route4_classify() local
153 (f = head->fastmap[h].filter) != NULL) { in route4_classify()
154 if (f == ROUTE4_FAILURE) { in route4_classify()
159 *res = f->res; in route4_classify()
170 for (f = rcu_dereference_bh(b->ht[route4_hash_from(id)]); in route4_classify()
171 f; in route4_classify()
172 f = rcu_dereference_bh(f->next)) in route4_classify()
173 if (f->id == id) in route4_classify()
176 for (f = rcu_dereference_bh(b->ht[route4_hash_iif(iif)]); in route4_classify()
177 f; in route4_classify()
178 f = rcu_dereference_bh(f->next)) in route4_classify()
179 if (f->iif == iif) in route4_classify()
182 for (f = rcu_dereference_bh(b->ht[route4_hash_wild()]); in route4_classify()
183 f; in route4_classify()
184 f = rcu_dereference_bh(f->next)) in route4_classify()
234 struct route4_filter *f; in route4_get() local
250 for (f = rtnl_dereference(b->ht[h2]); in route4_get()
251 f; in route4_get()
252 f = rtnl_dereference(f->next)) in route4_get()
253 if (f->handle == handle) in route4_get()
254 return (unsigned long)f; in route4_get()
273 struct route4_filter *f = container_of(head, struct route4_filter, rcu); in route4_delete_filter() local
275 tcf_exts_destroy(&f->exts); in route4_delete_filter()
276 kfree(f); in route4_delete_filter()
300 struct route4_filter *f; in route4_destroy() local
302 while ((f = rtnl_dereference(b->ht[h2])) != NULL) { in route4_destroy()
305 next = rtnl_dereference(f->next); in route4_destroy()
307 tcf_unbind_filter(tp, &f->res); in route4_destroy()
308 call_rcu(&f->rcu, route4_delete_filter); in route4_destroy()
323 struct route4_filter *f = (struct route4_filter *)arg; in route4_delete() local
330 if (!head || !f) in route4_delete()
333 h = f->handle; in route4_delete()
334 b = f->bkt; in route4_delete()
339 if (nf == f) { in route4_delete()
341 RCU_INIT_POINTER(*fp, rtnl_dereference(f->next)); in route4_delete()
350 tcf_unbind_filter(tp, &f->res); in route4_delete()
351 call_rcu(&f->rcu, route4_delete_filter); in route4_delete()
380 unsigned long base, struct route4_filter *f, in route4_set_parms() argument
446 if (fp->handle == f->handle) in route4_set_parms()
451 f->id = to; in route4_set_parms()
454 f->id = to | id<<16; in route4_set_parms()
456 f->iif = id; in route4_set_parms()
458 f->handle = nhandle; in route4_set_parms()
459 f->bkt = b; in route4_set_parms()
460 f->tp = tp; in route4_set_parms()
463 f->res.classid = nla_get_u32(tb[TCA_ROUTE4_CLASSID]); in route4_set_parms()
464 tcf_bind_filter(tp, &f->res, base); in route4_set_parms()
467 tcf_exts_change(tp, &f->exts, &e); in route4_set_parms()
481 struct route4_filter *fold, *f1, *pfp, *f = NULL; in route4_change() local
501 f = kzalloc(sizeof(struct route4_filter), GFP_KERNEL); in route4_change()
502 if (!f) in route4_change()
505 err = tcf_exts_init(&f->exts, TCA_ROUTE4_ACT, TCA_ROUTE4_POLICE); in route4_change()
510 f->id = fold->id; in route4_change()
511 f->iif = fold->iif; in route4_change()
512 f->res = fold->res; in route4_change()
513 f->handle = fold->handle; in route4_change()
515 f->tp = fold->tp; in route4_change()
516 f->bkt = fold->bkt; in route4_change()
520 err = route4_set_parms(net, tp, base, f, handle, head, tb, in route4_change()
525 h = from_hash(f->handle >> 16); in route4_change()
526 fp = &f->bkt->ht[h]; in route4_change()
530 if (f->handle < f1->handle) in route4_change()
534 rcu_assign_pointer(f->next, f1); in route4_change()
535 rcu_assign_pointer(*fp, f); in route4_change()
537 if (fold && fold->handle && f->handle != fold->handle) { in route4_change()
545 if (pfp == f) { in route4_change()
546 *fp = f->next; in route4_change()
554 *arg = (unsigned long)f; in route4_change()
562 if (f) in route4_change()
563 tcf_exts_destroy(&f->exts); in route4_change()
564 kfree(f); in route4_change()
584 struct route4_filter *f; in route4_walk() local
586 for (f = rtnl_dereference(b->ht[h1]); in route4_walk()
587 f; in route4_walk()
588 f = rtnl_dereference(f->next)) { in route4_walk()
593 if (arg->fn(tp, (unsigned long)f, arg) < 0) { in route4_walk()
607 struct route4_filter *f = (struct route4_filter *)fh; in route4_dump() local
611 if (f == NULL) in route4_dump()
614 t->tcm_handle = f->handle; in route4_dump()
620 if (!(f->handle & 0x8000)) { in route4_dump()
621 id = f->id & 0xFF; in route4_dump()
625 if (f->handle & 0x80000000) { in route4_dump()
626 if ((f->handle >> 16) != 0xFFFF && in route4_dump()
627 nla_put_u32(skb, TCA_ROUTE4_IIF, f->iif)) in route4_dump()
630 id = f->id >> 16; in route4_dump()
634 if (f->res.classid && in route4_dump()
635 nla_put_u32(skb, TCA_ROUTE4_CLASSID, f->res.classid)) in route4_dump()
638 if (tcf_exts_dump(skb, &f->exts) < 0) in route4_dump()
643 if (tcf_exts_dump_stats(skb, &f->exts) < 0) in route4_dump()