Lines Matching refs:f

283 	struct flow_filter *f;  in flow_classify()  local
289 list_for_each_entry_rcu(f, &head->filters, list) { in flow_classify()
293 if (!tcf_em_tree_match(skb, &f->ematches, NULL)) in flow_classify()
296 keymask = f->keymask; in flow_classify()
300 for (n = 0; n < f->nkeys; n++) { in flow_classify()
306 if (f->mode == FLOW_MODE_HASH) in flow_classify()
307 classid = jhash2(keys, f->nkeys, f->hashrnd); in flow_classify()
310 classid = (classid & f->mask) ^ f->xor; in flow_classify()
311 classid = (classid >> f->rshift) + f->addend; in flow_classify()
314 if (f->divisor) in flow_classify()
315 classid %= f->divisor; in flow_classify()
318 res->classid = TC_H_MAKE(f->baseclass, f->baseclass + classid); in flow_classify()
320 r = tcf_exts_exec(skb, &f->exts, res); in flow_classify()
330 struct flow_filter *f = (struct flow_filter *)arg; in flow_perturbation() local
332 get_random_bytes(&f->hashrnd, 4); in flow_perturbation()
333 if (f->perturb_period) in flow_perturbation()
334 mod_timer(&f->perturb_timer, jiffies + f->perturb_period); in flow_perturbation()
354 struct flow_filter *f = container_of(head, struct flow_filter, rcu); in flow_destroy_filter() local
356 del_timer_sync(&f->perturb_timer); in flow_destroy_filter()
357 tcf_exts_destroy(&f->exts); in flow_destroy_filter()
358 tcf_em_tree_destroy(&f->ematches); in flow_destroy_filter()
359 kfree(f); in flow_destroy_filter()
542 struct flow_filter *f = (struct flow_filter *)arg; in flow_delete() local
544 list_del_rcu(&f->list); in flow_delete()
545 call_rcu(&f->rcu, flow_destroy_filter); in flow_delete()
564 struct flow_filter *f, *next; in flow_destroy() local
569 list_for_each_entry_safe(f, next, &head->filters, list) { in flow_destroy()
570 list_del_rcu(&f->list); in flow_destroy()
571 call_rcu(&f->rcu, flow_destroy_filter); in flow_destroy()
581 struct flow_filter *f; in flow_get() local
583 list_for_each_entry(f, &head->filters, list) in flow_get()
584 if (f->handle == handle) in flow_get()
585 return (unsigned long)f; in flow_get()
592 struct flow_filter *f = (struct flow_filter *)fh; in flow_dump() local
595 if (f == NULL) in flow_dump()
598 t->tcm_handle = f->handle; in flow_dump()
604 if (nla_put_u32(skb, TCA_FLOW_KEYS, f->keymask) || in flow_dump()
605 nla_put_u32(skb, TCA_FLOW_MODE, f->mode)) in flow_dump()
608 if (f->mask != ~0 || f->xor != 0) { in flow_dump()
609 if (nla_put_u32(skb, TCA_FLOW_MASK, f->mask) || in flow_dump()
610 nla_put_u32(skb, TCA_FLOW_XOR, f->xor)) in flow_dump()
613 if (f->rshift && in flow_dump()
614 nla_put_u32(skb, TCA_FLOW_RSHIFT, f->rshift)) in flow_dump()
616 if (f->addend && in flow_dump()
617 nla_put_u32(skb, TCA_FLOW_ADDEND, f->addend)) in flow_dump()
620 if (f->divisor && in flow_dump()
621 nla_put_u32(skb, TCA_FLOW_DIVISOR, f->divisor)) in flow_dump()
623 if (f->baseclass && in flow_dump()
624 nla_put_u32(skb, TCA_FLOW_BASECLASS, f->baseclass)) in flow_dump()
627 if (f->perturb_period && in flow_dump()
628 nla_put_u32(skb, TCA_FLOW_PERTURB, f->perturb_period / HZ)) in flow_dump()
631 if (tcf_exts_dump(skb, &f->exts) < 0) in flow_dump()
634 if (f->ematches.hdr.nmatches && in flow_dump()
635 tcf_em_tree_dump(skb, &f->ematches, TCA_FLOW_EMATCHES) < 0) in flow_dump()
640 if (tcf_exts_dump_stats(skb, &f->exts) < 0) in flow_dump()
653 struct flow_filter *f; in flow_walk() local
655 list_for_each_entry(f, &head->filters, list) { in flow_walk()
658 if (arg->fn(tp, (unsigned long)f, arg) < 0) { in flow_walk()