Lines Matching full:act
3054 struct tc_action *act; in tcf_exts_validate() local
3058 act = tcf_action_init_1(net, tp, tb[exts->police], in tcf_exts_validate()
3062 if (IS_ERR(act)) in tcf_exts_validate()
3063 return PTR_ERR(act); in tcf_exts_validate()
3065 act->type = exts->type = TCA_OLD_COMPAT; in tcf_exts_validate()
3066 exts->actions[0] = act; in tcf_exts_validate()
3134 struct tc_action *act = tcf_exts_first_act(exts); in tcf_exts_dump() local
3136 if (nest == NULL || !act) in tcf_exts_dump()
3138 if (tcf_action_dump_old(skb, act, 0, 0) < 0) in tcf_exts_dump()
3451 const struct tc_action *act) in tcf_act_get_cookie() argument
3457 cookie = rcu_dereference(act->act_cookie); in tcf_act_get_cookie()
3488 const struct tc_action *act) in tcf_mirred_get_dev() argument
3491 entry->dev = act->ops->get_dev(act, &entry->destructor); in tcf_mirred_get_dev()
3506 const struct tc_action *act) in tcf_tunnel_encap_get_tunnel() argument
3508 entry->tunnel = tcf_tunnel_info_copy(act); in tcf_tunnel_encap_get_tunnel()
3517 const struct tc_action *act) in tcf_sample_get_group() argument
3521 act->ops->get_psample_group(act, &entry->destructor); in tcf_sample_get_group()
3534 const struct tc_action *act) in tcf_gate_get_entries() argument
3536 entry->gate.entries = tcf_gate_get_list(act); in tcf_gate_get_entries()
3560 struct tc_action *act; in tc_setup_flow_action() local
3571 tcf_exts_for_each_action(i, act, exts) { in tc_setup_flow_action()
3575 spin_lock_bh(&act->tcfa_lock); in tc_setup_flow_action()
3576 err = tcf_act_get_cookie(entry, act); in tc_setup_flow_action()
3580 entry->hw_stats = tc_act_hw_stats(act->hw_stats); in tc_setup_flow_action()
3582 if (is_tcf_gact_ok(act)) { in tc_setup_flow_action()
3584 } else if (is_tcf_gact_shot(act)) { in tc_setup_flow_action()
3586 } else if (is_tcf_gact_trap(act)) { in tc_setup_flow_action()
3588 } else if (is_tcf_gact_goto_chain(act)) { in tc_setup_flow_action()
3590 entry->chain_index = tcf_gact_goto_chain_index(act); in tc_setup_flow_action()
3591 } else if (is_tcf_mirred_egress_redirect(act)) { in tc_setup_flow_action()
3593 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3594 } else if (is_tcf_mirred_egress_mirror(act)) { in tc_setup_flow_action()
3596 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3597 } else if (is_tcf_mirred_ingress_redirect(act)) { in tc_setup_flow_action()
3599 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3600 } else if (is_tcf_mirred_ingress_mirror(act)) { in tc_setup_flow_action()
3602 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3603 } else if (is_tcf_vlan(act)) { in tc_setup_flow_action()
3604 switch (tcf_vlan_action(act)) { in tc_setup_flow_action()
3607 entry->vlan.vid = tcf_vlan_push_vid(act); in tc_setup_flow_action()
3608 entry->vlan.proto = tcf_vlan_push_proto(act); in tc_setup_flow_action()
3609 entry->vlan.prio = tcf_vlan_push_prio(act); in tc_setup_flow_action()
3616 entry->vlan.vid = tcf_vlan_push_vid(act); in tc_setup_flow_action()
3617 entry->vlan.proto = tcf_vlan_push_proto(act); in tc_setup_flow_action()
3618 entry->vlan.prio = tcf_vlan_push_prio(act); in tc_setup_flow_action()
3624 } else if (is_tcf_tunnel_set(act)) { in tc_setup_flow_action()
3626 err = tcf_tunnel_encap_get_tunnel(entry, act); in tc_setup_flow_action()
3629 } else if (is_tcf_tunnel_release(act)) { in tc_setup_flow_action()
3631 } else if (is_tcf_pedit(act)) { in tc_setup_flow_action()
3632 for (k = 0; k < tcf_pedit_nkeys(act); k++) { in tc_setup_flow_action()
3633 switch (tcf_pedit_cmd(act, k)) { in tc_setup_flow_action()
3644 entry->mangle.htype = tcf_pedit_htype(act, k); in tc_setup_flow_action()
3645 entry->mangle.mask = tcf_pedit_mask(act, k); in tc_setup_flow_action()
3646 entry->mangle.val = tcf_pedit_val(act, k); in tc_setup_flow_action()
3647 entry->mangle.offset = tcf_pedit_offset(act, k); in tc_setup_flow_action()
3648 entry->hw_stats = tc_act_hw_stats(act->hw_stats); in tc_setup_flow_action()
3651 } else if (is_tcf_csum(act)) { in tc_setup_flow_action()
3653 entry->csum_flags = tcf_csum_update_flags(act); in tc_setup_flow_action()
3654 } else if (is_tcf_skbedit_mark(act)) { in tc_setup_flow_action()
3656 entry->mark = tcf_skbedit_mark(act); in tc_setup_flow_action()
3657 } else if (is_tcf_sample(act)) { in tc_setup_flow_action()
3659 entry->sample.trunc_size = tcf_sample_trunc_size(act); in tc_setup_flow_action()
3660 entry->sample.truncate = tcf_sample_truncate(act); in tc_setup_flow_action()
3661 entry->sample.rate = tcf_sample_rate(act); in tc_setup_flow_action()
3662 tcf_sample_get_group(entry, act); in tc_setup_flow_action()
3663 } else if (is_tcf_police(act)) { in tc_setup_flow_action()
3665 entry->police.burst = tcf_police_burst(act); in tc_setup_flow_action()
3667 tcf_police_rate_bytes_ps(act); in tc_setup_flow_action()
3668 entry->police.mtu = tcf_police_tcfp_mtu(act); in tc_setup_flow_action()
3669 entry->police.index = act->tcfa_index; in tc_setup_flow_action()
3670 } else if (is_tcf_ct(act)) { in tc_setup_flow_action()
3672 entry->ct.action = tcf_ct_action(act); in tc_setup_flow_action()
3673 entry->ct.zone = tcf_ct_zone(act); in tc_setup_flow_action()
3674 entry->ct.flow_table = tcf_ct_ft(act); in tc_setup_flow_action()
3675 } else if (is_tcf_mpls(act)) { in tc_setup_flow_action()
3676 switch (tcf_mpls_action(act)) { in tc_setup_flow_action()
3679 entry->mpls_push.proto = tcf_mpls_proto(act); in tc_setup_flow_action()
3680 entry->mpls_push.label = tcf_mpls_label(act); in tc_setup_flow_action()
3681 entry->mpls_push.tc = tcf_mpls_tc(act); in tc_setup_flow_action()
3682 entry->mpls_push.bos = tcf_mpls_bos(act); in tc_setup_flow_action()
3683 entry->mpls_push.ttl = tcf_mpls_ttl(act); in tc_setup_flow_action()
3687 entry->mpls_pop.proto = tcf_mpls_proto(act); in tc_setup_flow_action()
3691 entry->mpls_mangle.label = tcf_mpls_label(act); in tc_setup_flow_action()
3692 entry->mpls_mangle.tc = tcf_mpls_tc(act); in tc_setup_flow_action()
3693 entry->mpls_mangle.bos = tcf_mpls_bos(act); in tc_setup_flow_action()
3694 entry->mpls_mangle.ttl = tcf_mpls_ttl(act); in tc_setup_flow_action()
3699 } else if (is_tcf_skbedit_ptype(act)) { in tc_setup_flow_action()
3701 entry->ptype = tcf_skbedit_ptype(act); in tc_setup_flow_action()
3702 } else if (is_tcf_skbedit_priority(act)) { in tc_setup_flow_action()
3704 entry->priority = tcf_skbedit_priority(act); in tc_setup_flow_action()
3705 } else if (is_tcf_gate(act)) { in tc_setup_flow_action()
3707 entry->gate.index = tcf_gate_index(act); in tc_setup_flow_action()
3708 entry->gate.prio = tcf_gate_prio(act); in tc_setup_flow_action()
3709 entry->gate.basetime = tcf_gate_basetime(act); in tc_setup_flow_action()
3710 entry->gate.cycletime = tcf_gate_cycletime(act); in tc_setup_flow_action()
3711 entry->gate.cycletimeext = tcf_gate_cycletimeext(act); in tc_setup_flow_action()
3712 entry->gate.num_entries = tcf_gate_num_entries(act); in tc_setup_flow_action()
3713 err = tcf_gate_get_entries(entry, act); in tc_setup_flow_action()
3720 spin_unlock_bh(&act->tcfa_lock); in tc_setup_flow_action()
3722 if (!is_tcf_pedit(act)) in tc_setup_flow_action()
3732 spin_unlock_bh(&act->tcfa_lock); in tc_setup_flow_action()
3740 struct tc_action *act; in tcf_exts_num_actions() local
3743 tcf_exts_for_each_action(i, act, exts) { in tcf_exts_num_actions()
3744 if (is_tcf_pedit(act)) in tcf_exts_num_actions()
3745 num_acts += tcf_pedit_nkeys(act); in tcf_exts_num_actions()