Lines Matching refs:act
3060 struct tc_action *act; in tcf_exts_validate() local
3069 act = tcf_action_init_1(net, tp, tb[exts->police], in tcf_exts_validate()
3074 if (IS_ERR(act)) in tcf_exts_validate()
3075 return PTR_ERR(act); in tcf_exts_validate()
3077 act->type = exts->type = TCA_OLD_COMPAT; in tcf_exts_validate()
3078 exts->actions[0] = act; in tcf_exts_validate()
3147 struct tc_action *act = tcf_exts_first_act(exts); in tcf_exts_dump() local
3149 if (nest == NULL || !act) in tcf_exts_dump()
3151 if (tcf_action_dump_old(skb, act, 0, 0) < 0) in tcf_exts_dump()
3464 const struct tc_action *act) in tcf_act_get_cookie() argument
3470 cookie = rcu_dereference(act->act_cookie); in tcf_act_get_cookie()
3501 const struct tc_action *act) in tcf_mirred_get_dev() argument
3504 entry->dev = act->ops->get_dev(act, &entry->destructor); in tcf_mirred_get_dev()
3519 const struct tc_action *act) in tcf_tunnel_encap_get_tunnel() argument
3521 entry->tunnel = tcf_tunnel_info_copy(act); in tcf_tunnel_encap_get_tunnel()
3530 const struct tc_action *act) in tcf_sample_get_group() argument
3534 act->ops->get_psample_group(act, &entry->destructor); in tcf_sample_get_group()
3547 const struct tc_action *act) in tcf_gate_get_entries() argument
3549 entry->gate.entries = tcf_gate_get_list(act); in tcf_gate_get_entries()
3573 struct tc_action *act; in tc_setup_flow_action() local
3584 tcf_exts_for_each_action(i, act, exts) { in tc_setup_flow_action()
3588 spin_lock_bh(&act->tcfa_lock); in tc_setup_flow_action()
3589 err = tcf_act_get_cookie(entry, act); in tc_setup_flow_action()
3593 entry->hw_stats = tc_act_hw_stats(act->hw_stats); in tc_setup_flow_action()
3595 if (is_tcf_gact_ok(act)) { in tc_setup_flow_action()
3597 } else if (is_tcf_gact_shot(act)) { in tc_setup_flow_action()
3599 } else if (is_tcf_gact_trap(act)) { in tc_setup_flow_action()
3601 } else if (is_tcf_gact_goto_chain(act)) { in tc_setup_flow_action()
3603 entry->chain_index = tcf_gact_goto_chain_index(act); in tc_setup_flow_action()
3604 } else if (is_tcf_mirred_egress_redirect(act)) { in tc_setup_flow_action()
3606 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3607 } else if (is_tcf_mirred_egress_mirror(act)) { in tc_setup_flow_action()
3609 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3610 } else if (is_tcf_mirred_ingress_redirect(act)) { in tc_setup_flow_action()
3612 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3613 } else if (is_tcf_mirred_ingress_mirror(act)) { in tc_setup_flow_action()
3615 tcf_mirred_get_dev(entry, act); in tc_setup_flow_action()
3616 } else if (is_tcf_vlan(act)) { in tc_setup_flow_action()
3617 switch (tcf_vlan_action(act)) { in tc_setup_flow_action()
3620 entry->vlan.vid = tcf_vlan_push_vid(act); in tc_setup_flow_action()
3621 entry->vlan.proto = tcf_vlan_push_proto(act); in tc_setup_flow_action()
3622 entry->vlan.prio = tcf_vlan_push_prio(act); in tc_setup_flow_action()
3629 entry->vlan.vid = tcf_vlan_push_vid(act); in tc_setup_flow_action()
3630 entry->vlan.proto = tcf_vlan_push_proto(act); in tc_setup_flow_action()
3631 entry->vlan.prio = tcf_vlan_push_prio(act); in tc_setup_flow_action()
3637 } else if (is_tcf_tunnel_set(act)) { in tc_setup_flow_action()
3639 err = tcf_tunnel_encap_get_tunnel(entry, act); in tc_setup_flow_action()
3642 } else if (is_tcf_tunnel_release(act)) { in tc_setup_flow_action()
3644 } else if (is_tcf_pedit(act)) { in tc_setup_flow_action()
3645 for (k = 0; k < tcf_pedit_nkeys(act); k++) { in tc_setup_flow_action()
3646 switch (tcf_pedit_cmd(act, k)) { in tc_setup_flow_action()
3657 entry->mangle.htype = tcf_pedit_htype(act, k); in tc_setup_flow_action()
3658 entry->mangle.mask = tcf_pedit_mask(act, k); in tc_setup_flow_action()
3659 entry->mangle.val = tcf_pedit_val(act, k); in tc_setup_flow_action()
3660 entry->mangle.offset = tcf_pedit_offset(act, k); in tc_setup_flow_action()
3661 entry->hw_stats = tc_act_hw_stats(act->hw_stats); in tc_setup_flow_action()
3664 } else if (is_tcf_csum(act)) { in tc_setup_flow_action()
3666 entry->csum_flags = tcf_csum_update_flags(act); in tc_setup_flow_action()
3667 } else if (is_tcf_skbedit_mark(act)) { in tc_setup_flow_action()
3669 entry->mark = tcf_skbedit_mark(act); in tc_setup_flow_action()
3670 } else if (is_tcf_sample(act)) { in tc_setup_flow_action()
3672 entry->sample.trunc_size = tcf_sample_trunc_size(act); in tc_setup_flow_action()
3673 entry->sample.truncate = tcf_sample_truncate(act); in tc_setup_flow_action()
3674 entry->sample.rate = tcf_sample_rate(act); in tc_setup_flow_action()
3675 tcf_sample_get_group(entry, act); in tc_setup_flow_action()
3676 } else if (is_tcf_police(act)) { in tc_setup_flow_action()
3678 entry->police.burst = tcf_police_burst(act); in tc_setup_flow_action()
3680 tcf_police_rate_bytes_ps(act); in tc_setup_flow_action()
3681 entry->police.mtu = tcf_police_tcfp_mtu(act); in tc_setup_flow_action()
3682 entry->police.index = act->tcfa_index; in tc_setup_flow_action()
3683 } else if (is_tcf_ct(act)) { in tc_setup_flow_action()
3685 entry->ct.action = tcf_ct_action(act); in tc_setup_flow_action()
3686 entry->ct.zone = tcf_ct_zone(act); in tc_setup_flow_action()
3687 entry->ct.flow_table = tcf_ct_ft(act); in tc_setup_flow_action()
3688 } else if (is_tcf_mpls(act)) { in tc_setup_flow_action()
3689 switch (tcf_mpls_action(act)) { in tc_setup_flow_action()
3692 entry->mpls_push.proto = tcf_mpls_proto(act); in tc_setup_flow_action()
3693 entry->mpls_push.label = tcf_mpls_label(act); in tc_setup_flow_action()
3694 entry->mpls_push.tc = tcf_mpls_tc(act); in tc_setup_flow_action()
3695 entry->mpls_push.bos = tcf_mpls_bos(act); in tc_setup_flow_action()
3696 entry->mpls_push.ttl = tcf_mpls_ttl(act); in tc_setup_flow_action()
3700 entry->mpls_pop.proto = tcf_mpls_proto(act); in tc_setup_flow_action()
3704 entry->mpls_mangle.label = tcf_mpls_label(act); in tc_setup_flow_action()
3705 entry->mpls_mangle.tc = tcf_mpls_tc(act); in tc_setup_flow_action()
3706 entry->mpls_mangle.bos = tcf_mpls_bos(act); in tc_setup_flow_action()
3707 entry->mpls_mangle.ttl = tcf_mpls_ttl(act); in tc_setup_flow_action()
3713 } else if (is_tcf_skbedit_ptype(act)) { in tc_setup_flow_action()
3715 entry->ptype = tcf_skbedit_ptype(act); in tc_setup_flow_action()
3716 } else if (is_tcf_skbedit_priority(act)) { in tc_setup_flow_action()
3718 entry->priority = tcf_skbedit_priority(act); in tc_setup_flow_action()
3719 } else if (is_tcf_gate(act)) { in tc_setup_flow_action()
3721 entry->gate.index = tcf_gate_index(act); in tc_setup_flow_action()
3722 entry->gate.prio = tcf_gate_prio(act); in tc_setup_flow_action()
3723 entry->gate.basetime = tcf_gate_basetime(act); in tc_setup_flow_action()
3724 entry->gate.cycletime = tcf_gate_cycletime(act); in tc_setup_flow_action()
3725 entry->gate.cycletimeext = tcf_gate_cycletimeext(act); in tc_setup_flow_action()
3726 entry->gate.num_entries = tcf_gate_num_entries(act); in tc_setup_flow_action()
3727 err = tcf_gate_get_entries(entry, act); in tc_setup_flow_action()
3734 spin_unlock_bh(&act->tcfa_lock); in tc_setup_flow_action()
3736 if (!is_tcf_pedit(act)) in tc_setup_flow_action()
3746 spin_unlock_bh(&act->tcfa_lock); in tc_setup_flow_action()
3754 struct tc_action *act; in tcf_exts_num_actions() local
3757 tcf_exts_for_each_action(i, act, exts) { in tcf_exts_num_actions()
3758 if (is_tcf_pedit(act)) in tcf_exts_num_actions()
3759 num_acts += tcf_pedit_nkeys(act); in tcf_exts_num_actions()