• Home
  • Raw
  • Download

Lines Matching refs:f

303 	struct flow_filter *f;  in flow_classify()  local
309 list_for_each_entry_rcu(f, &head->filters, list) { in flow_classify()
313 if (!tcf_em_tree_match(skb, &f->ematches, NULL)) in flow_classify()
316 keymask = f->keymask; in flow_classify()
320 for (n = 0; n < f->nkeys; n++) { in flow_classify()
326 if (f->mode == FLOW_MODE_HASH) in flow_classify()
327 classid = jhash2(keys, f->nkeys, f->hashrnd); in flow_classify()
330 classid = (classid & f->mask) ^ f->xor; in flow_classify()
331 classid = (classid >> f->rshift) + f->addend; in flow_classify()
334 if (f->divisor) in flow_classify()
335 classid %= f->divisor; in flow_classify()
338 res->classid = TC_H_MAKE(f->baseclass, f->baseclass + classid); in flow_classify()
340 r = tcf_exts_exec(skb, &f->exts, res); in flow_classify()
350 struct flow_filter *f = (struct flow_filter *)arg; in flow_perturbation() local
352 get_random_bytes(&f->hashrnd, 4); in flow_perturbation()
353 if (f->perturb_period) in flow_perturbation()
354 mod_timer(&f->perturb_timer, jiffies + f->perturb_period); in flow_perturbation()
374 struct flow_filter *f = container_of(head, struct flow_filter, rcu); in flow_destroy_filter() local
376 del_timer_sync(&f->perturb_timer); in flow_destroy_filter()
377 tcf_exts_destroy(&f->exts); in flow_destroy_filter()
378 tcf_em_tree_destroy(&f->ematches); in flow_destroy_filter()
379 kfree(f); in flow_destroy_filter()
568 struct flow_filter *f = (struct flow_filter *)arg; in flow_delete() local
570 list_del_rcu(&f->list); in flow_delete()
571 call_rcu(&f->rcu, flow_destroy_filter); in flow_delete()
590 struct flow_filter *f, *next; in flow_destroy() local
595 list_for_each_entry_safe(f, next, &head->filters, list) { in flow_destroy()
596 list_del_rcu(&f->list); in flow_destroy()
597 call_rcu(&f->rcu, flow_destroy_filter); in flow_destroy()
606 struct flow_filter *f; in flow_get() local
608 list_for_each_entry(f, &head->filters, list) in flow_get()
609 if (f->handle == handle) in flow_get()
610 return (unsigned long)f; in flow_get()
617 struct flow_filter *f = (struct flow_filter *)fh; in flow_dump() local
620 if (f == NULL) in flow_dump()
623 t->tcm_handle = f->handle; in flow_dump()
629 if (nla_put_u32(skb, TCA_FLOW_KEYS, f->keymask) || in flow_dump()
630 nla_put_u32(skb, TCA_FLOW_MODE, f->mode)) in flow_dump()
633 if (f->mask != ~0 || f->xor != 0) { in flow_dump()
634 if (nla_put_u32(skb, TCA_FLOW_MASK, f->mask) || in flow_dump()
635 nla_put_u32(skb, TCA_FLOW_XOR, f->xor)) in flow_dump()
638 if (f->rshift && in flow_dump()
639 nla_put_u32(skb, TCA_FLOW_RSHIFT, f->rshift)) in flow_dump()
641 if (f->addend && in flow_dump()
642 nla_put_u32(skb, TCA_FLOW_ADDEND, f->addend)) in flow_dump()
645 if (f->divisor && in flow_dump()
646 nla_put_u32(skb, TCA_FLOW_DIVISOR, f->divisor)) in flow_dump()
648 if (f->baseclass && in flow_dump()
649 nla_put_u32(skb, TCA_FLOW_BASECLASS, f->baseclass)) in flow_dump()
652 if (f->perturb_period && in flow_dump()
653 nla_put_u32(skb, TCA_FLOW_PERTURB, f->perturb_period / HZ)) in flow_dump()
656 if (tcf_exts_dump(skb, &f->exts) < 0) in flow_dump()
659 if (f->ematches.hdr.nmatches && in flow_dump()
660 tcf_em_tree_dump(skb, &f->ematches, TCA_FLOW_EMATCHES) < 0) in flow_dump()
665 if (tcf_exts_dump_stats(skb, &f->exts) < 0) in flow_dump()
678 struct flow_filter *f; in flow_walk() local
680 list_for_each_entry(f, &head->filters, list) { in flow_walk()
683 if (arg->fn(tp, (unsigned long)f, arg) < 0) { in flow_walk()