Lines Matching refs:fnew
394 struct flow_filter *fold, *fnew; in flow_change() local
433 fnew = kzalloc(sizeof(*fnew), GFP_KERNEL); in flow_change()
434 if (!fnew) in flow_change()
437 err = tcf_em_tree_validate(tp, tb[TCA_FLOW_EMATCHES], &fnew->ematches); in flow_change()
441 err = tcf_exts_init(&fnew->exts, net, TCA_FLOW_ACT, TCA_FLOW_POLICE); in flow_change()
445 err = tcf_exts_validate(net, tp, tb, tca[TCA_RATE], &fnew->exts, flags, in flow_change()
457 fnew->tp = fold->tp; in flow_change()
458 fnew->handle = fold->handle; in flow_change()
459 fnew->nkeys = fold->nkeys; in flow_change()
460 fnew->keymask = fold->keymask; in flow_change()
461 fnew->mode = fold->mode; in flow_change()
462 fnew->mask = fold->mask; in flow_change()
463 fnew->xor = fold->xor; in flow_change()
464 fnew->rshift = fold->rshift; in flow_change()
465 fnew->addend = fold->addend; in flow_change()
466 fnew->divisor = fold->divisor; in flow_change()
467 fnew->baseclass = fold->baseclass; in flow_change()
468 fnew->hashrnd = fold->hashrnd; in flow_change()
510 fnew->handle = handle; in flow_change()
511 fnew->mask = ~0U; in flow_change()
512 fnew->tp = tp; in flow_change()
513 get_random_bytes(&fnew->hashrnd, 4); in flow_change()
516 timer_setup(&fnew->perturb_timer, flow_perturbation, TIMER_DEFERRABLE); in flow_change()
521 fnew->keymask = keymask; in flow_change()
522 fnew->nkeys = nkeys; in flow_change()
525 fnew->mode = mode; in flow_change()
528 fnew->mask = nla_get_u32(tb[TCA_FLOW_MASK]); in flow_change()
530 fnew->xor = nla_get_u32(tb[TCA_FLOW_XOR]); in flow_change()
532 fnew->rshift = nla_get_u32(tb[TCA_FLOW_RSHIFT]); in flow_change()
534 fnew->addend = nla_get_u32(tb[TCA_FLOW_ADDEND]); in flow_change()
537 fnew->divisor = nla_get_u32(tb[TCA_FLOW_DIVISOR]); in flow_change()
539 fnew->baseclass = baseclass; in flow_change()
541 fnew->perturb_period = perturb_period; in flow_change()
543 mod_timer(&fnew->perturb_timer, jiffies + perturb_period); in flow_change()
546 list_add_tail_rcu(&fnew->list, &head->filters); in flow_change()
548 list_replace_rcu(&fold->list, &fnew->list); in flow_change()
550 *arg = fnew; in flow_change()
559 tcf_exts_destroy(&fnew->exts); in flow_change()
560 tcf_em_tree_destroy(&fnew->ematches); in flow_change()
562 kfree(fnew); in flow_change()