Lines Matching refs:f

296 	struct flow_filter *f;  in flow_classify()  local
302 list_for_each_entry_rcu(f, &head->filters, list) { in flow_classify()
306 if (!tcf_em_tree_match(skb, &f->ematches, NULL)) in flow_classify()
309 keymask = f->keymask; in flow_classify()
313 for (n = 0; n < f->nkeys; n++) { in flow_classify()
319 if (f->mode == FLOW_MODE_HASH) in flow_classify()
320 classid = jhash2(keys, f->nkeys, f->hashrnd); in flow_classify()
323 classid = (classid & f->mask) ^ f->xor; in flow_classify()
324 classid = (classid >> f->rshift) + f->addend; in flow_classify()
327 if (f->divisor) in flow_classify()
328 classid %= f->divisor; in flow_classify()
331 res->classid = TC_H_MAKE(f->baseclass, f->baseclass + classid); in flow_classify()
333 r = tcf_exts_exec(skb, &f->exts, res); in flow_classify()
343 struct flow_filter *f = (struct flow_filter *)arg; in flow_perturbation() local
345 get_random_bytes(&f->hashrnd, 4); in flow_perturbation()
346 if (f->perturb_period) in flow_perturbation()
347 mod_timer(&f->perturb_timer, jiffies + f->perturb_period); in flow_perturbation()
367 struct flow_filter *f = container_of(head, struct flow_filter, rcu); in flow_destroy_filter() local
369 del_timer_sync(&f->perturb_timer); in flow_destroy_filter()
370 tcf_exts_destroy(&f->exts); in flow_destroy_filter()
371 tcf_em_tree_destroy(&f->ematches); in flow_destroy_filter()
372 kfree(f); in flow_destroy_filter()
555 struct flow_filter *f = (struct flow_filter *)arg; in flow_delete() local
557 list_del_rcu(&f->list); in flow_delete()
558 call_rcu(&f->rcu, flow_destroy_filter); in flow_delete()
577 struct flow_filter *f, *next; in flow_destroy() local
582 list_for_each_entry_safe(f, next, &head->filters, list) { in flow_destroy()
583 list_del_rcu(&f->list); in flow_destroy()
584 call_rcu(&f->rcu, flow_destroy_filter); in flow_destroy()
594 struct flow_filter *f; in flow_get() local
596 list_for_each_entry(f, &head->filters, list) in flow_get()
597 if (f->handle == handle) in flow_get()
598 return (unsigned long)f; in flow_get()
605 struct flow_filter *f = (struct flow_filter *)fh; in flow_dump() local
608 if (f == NULL) in flow_dump()
611 t->tcm_handle = f->handle; in flow_dump()
617 if (nla_put_u32(skb, TCA_FLOW_KEYS, f->keymask) || in flow_dump()
618 nla_put_u32(skb, TCA_FLOW_MODE, f->mode)) in flow_dump()
621 if (f->mask != ~0 || f->xor != 0) { in flow_dump()
622 if (nla_put_u32(skb, TCA_FLOW_MASK, f->mask) || in flow_dump()
623 nla_put_u32(skb, TCA_FLOW_XOR, f->xor)) in flow_dump()
626 if (f->rshift && in flow_dump()
627 nla_put_u32(skb, TCA_FLOW_RSHIFT, f->rshift)) in flow_dump()
629 if (f->addend && in flow_dump()
630 nla_put_u32(skb, TCA_FLOW_ADDEND, f->addend)) in flow_dump()
633 if (f->divisor && in flow_dump()
634 nla_put_u32(skb, TCA_FLOW_DIVISOR, f->divisor)) in flow_dump()
636 if (f->baseclass && in flow_dump()
637 nla_put_u32(skb, TCA_FLOW_BASECLASS, f->baseclass)) in flow_dump()
640 if (f->perturb_period && in flow_dump()
641 nla_put_u32(skb, TCA_FLOW_PERTURB, f->perturb_period / HZ)) in flow_dump()
644 if (tcf_exts_dump(skb, &f->exts) < 0) in flow_dump()
647 if (f->ematches.hdr.nmatches && in flow_dump()
648 tcf_em_tree_dump(skb, &f->ematches, TCA_FLOW_EMATCHES) < 0) in flow_dump()
653 if (tcf_exts_dump_stats(skb, &f->exts) < 0) in flow_dump()
666 struct flow_filter *f; in flow_walk() local
668 list_for_each_entry(f, &head->filters, list) { in flow_walk()
671 if (arg->fn(tp, (unsigned long)f, arg) < 0) { in flow_walk()