Lines Matching refs:exts
3036 void tcf_exts_destroy(struct tcf_exts *exts) in tcf_exts_destroy() argument
3039 if (exts->actions) { in tcf_exts_destroy()
3040 tcf_action_destroy(exts->actions, TCA_ACT_UNBIND); in tcf_exts_destroy()
3041 kfree(exts->actions); in tcf_exts_destroy()
3043 exts->nr_actions = 0; in tcf_exts_destroy()
3049 struct nlattr *rate_tlv, struct tcf_exts *exts, bool ovr, in tcf_exts_validate() argument
3057 if (exts->police && tb[exts->police]) { in tcf_exts_validate()
3058 act = tcf_action_init_1(net, tp, tb[exts->police], 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()
3067 exts->nr_actions = 1; in tcf_exts_validate()
3068 } else if (exts->action && tb[exts->action]) { in tcf_exts_validate()
3071 err = tcf_action_init(net, tp, tb[exts->action], in tcf_exts_validate()
3073 exts->actions, &attr_size, in tcf_exts_validate()
3077 exts->nr_actions = err; in tcf_exts_validate()
3081 if ((exts->action && tb[exts->action]) || in tcf_exts_validate()
3082 (exts->police && tb[exts->police])) { in tcf_exts_validate()
3104 static struct tc_action *tcf_exts_first_act(struct tcf_exts *exts) in tcf_exts_first_act() argument
3106 if (exts->nr_actions == 0) in tcf_exts_first_act()
3109 return exts->actions[0]; in tcf_exts_first_act()
3113 int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_dump() argument
3118 if (exts->action && tcf_exts_has_actions(exts)) { in tcf_exts_dump()
3124 if (exts->type != TCA_OLD_COMPAT) { in tcf_exts_dump()
3125 nest = nla_nest_start_noflag(skb, exts->action); in tcf_exts_dump()
3129 if (tcf_action_dump(skb, exts->actions, 0, 0, false) in tcf_exts_dump()
3133 } else if (exts->police) { in tcf_exts_dump()
3134 struct tc_action *act = tcf_exts_first_act(exts); in tcf_exts_dump()
3135 nest = nla_nest_start_noflag(skb, exts->police); in tcf_exts_dump()
3154 int tcf_exts_terse_dump(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_terse_dump() argument
3159 if (!exts->action || !tcf_exts_has_actions(exts)) in tcf_exts_terse_dump()
3162 nest = nla_nest_start_noflag(skb, exts->action); in tcf_exts_terse_dump()
3166 if (tcf_action_dump(skb, exts->actions, 0, 0, true) < 0) in tcf_exts_terse_dump()
3180 int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_dump_stats() argument
3183 struct tc_action *a = tcf_exts_first_act(exts); in tcf_exts_dump_stats()
3558 const struct tcf_exts *exts) in tc_setup_flow_action() argument
3567 if (!exts) in tc_setup_flow_action()
3571 tcf_exts_for_each_action(i, act, exts) { in tc_setup_flow_action()
3737 unsigned int tcf_exts_num_actions(struct tcf_exts *exts) in tcf_exts_num_actions() argument
3743 tcf_exts_for_each_action(i, act, exts) { in tcf_exts_num_actions()