Lines Matching refs:exts

3016 void tcf_exts_destroy(struct tcf_exts *exts)  in tcf_exts_destroy()  argument
3019 if (exts->actions) { in tcf_exts_destroy()
3020 tcf_action_destroy(exts->actions, TCA_ACT_UNBIND); in tcf_exts_destroy()
3021 kfree(exts->actions); in tcf_exts_destroy()
3023 exts->nr_actions = 0; in tcf_exts_destroy()
3029 struct nlattr *rate_tlv, struct tcf_exts *exts, in tcf_exts_validate() argument
3038 if (exts->police && tb[exts->police]) { in tcf_exts_validate()
3041 a_o = tc_action_load_ops(tb[exts->police], true, in tcf_exts_validate()
3047 act = tcf_action_init_1(net, tp, tb[exts->police], 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()
3056 exts->nr_actions = 1; in tcf_exts_validate()
3057 tcf_idr_insert_many(exts->actions); in tcf_exts_validate()
3058 } else if (exts->action && tb[exts->action]) { in tcf_exts_validate()
3062 err = tcf_action_init(net, tp, tb[exts->action], in tcf_exts_validate()
3063 rate_tlv, exts->actions, init_res, in tcf_exts_validate()
3067 exts->nr_actions = err; in tcf_exts_validate()
3071 if ((exts->action && tb[exts->action]) || in tcf_exts_validate()
3072 (exts->police && tb[exts->police])) { in tcf_exts_validate()
3094 static struct tc_action *tcf_exts_first_act(struct tcf_exts *exts) in tcf_exts_first_act() argument
3096 if (exts->nr_actions == 0) in tcf_exts_first_act()
3099 return exts->actions[0]; in tcf_exts_first_act()
3103 int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_dump() argument
3108 if (exts->action && tcf_exts_has_actions(exts)) { in tcf_exts_dump()
3114 if (exts->type != TCA_OLD_COMPAT) { in tcf_exts_dump()
3115 nest = nla_nest_start_noflag(skb, exts->action); in tcf_exts_dump()
3119 if (tcf_action_dump(skb, exts->actions, 0, 0, false) in tcf_exts_dump()
3123 } else if (exts->police) { in tcf_exts_dump()
3124 struct tc_action *act = tcf_exts_first_act(exts); in tcf_exts_dump()
3125 nest = nla_nest_start_noflag(skb, exts->police); in tcf_exts_dump()
3144 int tcf_exts_terse_dump(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_terse_dump() argument
3149 if (!exts->action || !tcf_exts_has_actions(exts)) in tcf_exts_terse_dump()
3152 nest = nla_nest_start_noflag(skb, exts->action); in tcf_exts_terse_dump()
3156 if (tcf_action_dump(skb, exts->actions, 0, 0, true) < 0) in tcf_exts_terse_dump()
3170 int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_dump_stats() argument
3173 struct tc_action *a = tcf_exts_first_act(exts); in tcf_exts_dump_stats()
3548 const struct tcf_exts *exts) in tc_setup_flow_action() argument
3557 if (!exts) in tc_setup_flow_action()
3561 tcf_exts_for_each_action(i, act, exts) { in tc_setup_flow_action()
3730 unsigned int tcf_exts_num_actions(struct tcf_exts *exts) in tcf_exts_num_actions() argument
3736 tcf_exts_for_each_action(i, act, exts) { in tcf_exts_num_actions()