Lines Matching full:act
3035 struct tc_action *act; in tcf_exts_validate() local
3047 act = tcf_action_init_1(net, tp, tb[exts->police], in tcf_exts_validate()
3051 if (IS_ERR(act)) in tcf_exts_validate()
3052 return PTR_ERR(act); in tcf_exts_validate()
3054 act->type = exts->type = TCA_OLD_COMPAT; in tcf_exts_validate()
3055 exts->actions[0] = act; in tcf_exts_validate()
3124 struct tc_action *act = tcf_exts_first_act(exts); in tcf_exts_dump() local
3126 if (nest == NULL || !act) in tcf_exts_dump()
3128 if (tcf_action_dump_old(skb, act, 0, 0) < 0) in tcf_exts_dump()
3441 const struct tc_action *act) in tcf_act_get_cookie() argument
3447 cookie = rcu_dereference(act->act_cookie); in tcf_act_get_cookie()
3478 const struct tc_action *act) in tcf_mirred_get_dev() argument
3481 entry->dev = act->ops->get_dev(act, &entry->destructor); in tcf_mirred_get_dev()
3496 const struct tc_action *act) in tcf_tunnel_encap_get_tunnel() argument
3498 entry->tunnel = tcf_tunnel_info_copy(act); in tcf_tunnel_encap_get_tunnel()
3507 const struct tc_action *act) in tcf_sample_get_group() argument
3511 act->ops->get_psample_group(act, &entry->destructor); in tcf_sample_get_group()
3524 const struct tc_action *act) in tcf_gate_get_entries() argument
3526 entry->gate.entries = tcf_gate_get_list(act); in tcf_gate_get_entries()
3550 struct tc_action *act; in tc_setup_flow_action() local
3561 tcf_exts_for_each_action(i, act, exts) { in tc_setup_flow_action()
3565 spin_lock_bh(&act->tcfa_lock); in tc_setup_flow_action()
3566 err = tcf_act_get_cookie(entry, act); in tc_setup_flow_action()
3570 entry->hw_stats = tc_act_hw_stats(act->hw_stats); in tc_setup_flow_action()
3572 if (is_tcf_gact_ok(act)) { in tc_setup_flow_action()
3574 } else if (is_tcf_gact_shot(act)) { in tc_setup_flow_action()
3576 } else if (is_tcf_gact_trap(act)) { in tc_setup_flow_action()
3578 } else if (is_tcf_gact_goto_chain(act)) { in tc_setup_flow_action()
3580 entry->chain_index = tcf_gact_goto_chain_index(act); in tc_setup_flow_action()
3581 } else if (is_tcf_mirred_egress_redirect(act)) { in tc_setup_flow_action()
3583 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3584 } else if (is_tcf_mirred_egress_mirror(act)) { in tc_setup_flow_action()
3586 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3587 } else if (is_tcf_mirred_ingress_redirect(act)) { in tc_setup_flow_action()
3589 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3590 } else if (is_tcf_mirred_ingress_mirror(act)) { in tc_setup_flow_action()
3592 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3593 } else if (is_tcf_vlan(act)) { in tc_setup_flow_action()
3594 switch (tcf_vlan_action(act)) { in tc_setup_flow_action()
3597 entry->vlan.vid = tcf_vlan_push_vid(act); in tc_setup_flow_action()
3598 entry->vlan.proto = tcf_vlan_push_proto(act); in tc_setup_flow_action()
3599 entry->vlan.prio = tcf_vlan_push_prio(act); in tc_setup_flow_action()
3606 entry->vlan.vid = tcf_vlan_push_vid(act); in tc_setup_flow_action()
3607 entry->vlan.proto = tcf_vlan_push_proto(act); in tc_setup_flow_action()
3608 entry->vlan.prio = tcf_vlan_push_prio(act); in tc_setup_flow_action()
3614 } else if (is_tcf_tunnel_set(act)) { in tc_setup_flow_action()
3616 err = tcf_tunnel_encap_get_tunnel(entry, act); in tc_setup_flow_action()
3619 } else if (is_tcf_tunnel_release(act)) { in tc_setup_flow_action()
3621 } else if (is_tcf_pedit(act)) { in tc_setup_flow_action()
3622 for (k = 0; k < tcf_pedit_nkeys(act); k++) { in tc_setup_flow_action()
3623 switch (tcf_pedit_cmd(act, k)) { in tc_setup_flow_action()
3634 entry->mangle.htype = tcf_pedit_htype(act, k); in tc_setup_flow_action()
3635 entry->mangle.mask = tcf_pedit_mask(act, k); in tc_setup_flow_action()
3636 entry->mangle.val = tcf_pedit_val(act, k); in tc_setup_flow_action()
3637 entry->mangle.offset = tcf_pedit_offset(act, k); in tc_setup_flow_action()
3638 entry->hw_stats = tc_act_hw_stats(act->hw_stats); in tc_setup_flow_action()
3641 } else if (is_tcf_csum(act)) { in tc_setup_flow_action()
3643 entry->csum_flags = tcf_csum_update_flags(act); in tc_setup_flow_action()
3644 } else if (is_tcf_skbedit_mark(act)) { in tc_setup_flow_action()
3646 entry->mark = tcf_skbedit_mark(act); in tc_setup_flow_action()
3647 } else if (is_tcf_sample(act)) { in tc_setup_flow_action()
3649 entry->sample.trunc_size = tcf_sample_trunc_size(act); in tc_setup_flow_action()
3650 entry->sample.truncate = tcf_sample_truncate(act); in tc_setup_flow_action()
3651 entry->sample.rate = tcf_sample_rate(act); in tc_setup_flow_action()
3652 tcf_sample_get_group(entry, act); in tc_setup_flow_action()
3653 } else if (is_tcf_police(act)) { in tc_setup_flow_action()
3655 entry->police.burst = tcf_police_burst(act); in tc_setup_flow_action()
3657 tcf_police_rate_bytes_ps(act); in tc_setup_flow_action()
3658 entry->police.burst_pkt = tcf_police_burst_pkt(act); in tc_setup_flow_action()
3660 tcf_police_rate_pkt_ps(act); in tc_setup_flow_action()
3661 entry->police.mtu = tcf_police_tcfp_mtu(act); in tc_setup_flow_action()
3662 entry->police.index = act->tcfa_index; in tc_setup_flow_action()
3663 } else if (is_tcf_ct(act)) { in tc_setup_flow_action()
3665 entry->ct.action = tcf_ct_action(act); in tc_setup_flow_action()
3666 entry->ct.zone = tcf_ct_zone(act); in tc_setup_flow_action()
3667 entry->ct.flow_table = tcf_ct_ft(act); in tc_setup_flow_action()
3668 } else if (is_tcf_mpls(act)) { in tc_setup_flow_action()
3669 switch (tcf_mpls_action(act)) { in tc_setup_flow_action()
3672 entry->mpls_push.proto = tcf_mpls_proto(act); in tc_setup_flow_action()
3673 entry->mpls_push.label = tcf_mpls_label(act); in tc_setup_flow_action()
3674 entry->mpls_push.tc = tcf_mpls_tc(act); in tc_setup_flow_action()
3675 entry->mpls_push.bos = tcf_mpls_bos(act); in tc_setup_flow_action()
3676 entry->mpls_push.ttl = tcf_mpls_ttl(act); in tc_setup_flow_action()
3680 entry->mpls_pop.proto = tcf_mpls_proto(act); in tc_setup_flow_action()
3684 entry->mpls_mangle.label = tcf_mpls_label(act); in tc_setup_flow_action()
3685 entry->mpls_mangle.tc = tcf_mpls_tc(act); in tc_setup_flow_action()
3686 entry->mpls_mangle.bos = tcf_mpls_bos(act); in tc_setup_flow_action()
3687 entry->mpls_mangle.ttl = tcf_mpls_ttl(act); in tc_setup_flow_action()
3692 } else if (is_tcf_skbedit_ptype(act)) { in tc_setup_flow_action()
3694 entry->ptype = tcf_skbedit_ptype(act); in tc_setup_flow_action()
3695 } else if (is_tcf_skbedit_priority(act)) { in tc_setup_flow_action()
3697 entry->priority = tcf_skbedit_priority(act); in tc_setup_flow_action()
3698 } else if (is_tcf_gate(act)) { in tc_setup_flow_action()
3700 entry->gate.index = tcf_gate_index(act); in tc_setup_flow_action()
3701 entry->gate.prio = tcf_gate_prio(act); in tc_setup_flow_action()
3702 entry->gate.basetime = tcf_gate_basetime(act); in tc_setup_flow_action()
3703 entry->gate.cycletime = tcf_gate_cycletime(act); in tc_setup_flow_action()
3704 entry->gate.cycletimeext = tcf_gate_cycletimeext(act); in tc_setup_flow_action()
3705 entry->gate.num_entries = tcf_gate_num_entries(act); in tc_setup_flow_action()
3706 err = tcf_gate_get_entries(entry, act); in tc_setup_flow_action()
3713 spin_unlock_bh(&act->tcfa_lock); in tc_setup_flow_action()
3715 if (!is_tcf_pedit(act)) in tc_setup_flow_action()
3725 spin_unlock_bh(&act->tcfa_lock); in tc_setup_flow_action()
3733 struct tc_action *act; in tcf_exts_num_actions() local
3736 tcf_exts_for_each_action(i, act, exts) { in tcf_exts_num_actions()
3737 if (is_tcf_pedit(act)) in tcf_exts_num_actions()
3738 num_acts += tcf_pedit_nkeys(act); in tcf_exts_num_actions()