Lines Matching refs:exts

3041 void tcf_exts_destroy(struct tcf_exts *exts)  in tcf_exts_destroy()  argument
3044 if (exts->actions) { in tcf_exts_destroy()
3045 tcf_action_destroy(exts->actions, TCA_ACT_UNBIND); in tcf_exts_destroy()
3046 kfree(exts->actions); in tcf_exts_destroy()
3048 exts->nr_actions = 0; in tcf_exts_destroy()
3054 struct nlattr *rate_tlv, struct tcf_exts *exts, bool ovr, in tcf_exts_validate() argument
3063 if (exts->police && tb[exts->police]) { in tcf_exts_validate()
3066 a_o = tc_action_load_ops("police", tb[exts->police], rtnl_held, extack); in tcf_exts_validate()
3069 act = tcf_action_init_1(net, tp, tb[exts->police], 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()
3079 exts->nr_actions = 1; in tcf_exts_validate()
3080 tcf_idr_insert_many(exts->actions); in tcf_exts_validate()
3081 } else if (exts->action && tb[exts->action]) { in tcf_exts_validate()
3084 err = tcf_action_init(net, tp, tb[exts->action], in tcf_exts_validate()
3086 exts->actions, init_res, in tcf_exts_validate()
3090 exts->nr_actions = err; in tcf_exts_validate()
3094 if ((exts->action && tb[exts->action]) || in tcf_exts_validate()
3095 (exts->police && tb[exts->police])) { in tcf_exts_validate()
3117 static struct tc_action *tcf_exts_first_act(struct tcf_exts *exts) in tcf_exts_first_act() argument
3119 if (exts->nr_actions == 0) in tcf_exts_first_act()
3122 return exts->actions[0]; in tcf_exts_first_act()
3126 int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_dump() argument
3131 if (exts->action && tcf_exts_has_actions(exts)) { in tcf_exts_dump()
3137 if (exts->type != TCA_OLD_COMPAT) { in tcf_exts_dump()
3138 nest = nla_nest_start_noflag(skb, exts->action); in tcf_exts_dump()
3142 if (tcf_action_dump(skb, exts->actions, 0, 0, false) in tcf_exts_dump()
3146 } else if (exts->police) { in tcf_exts_dump()
3147 struct tc_action *act = tcf_exts_first_act(exts); in tcf_exts_dump()
3148 nest = nla_nest_start_noflag(skb, exts->police); in tcf_exts_dump()
3167 int tcf_exts_terse_dump(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_terse_dump() argument
3172 if (!exts->action || !tcf_exts_has_actions(exts)) in tcf_exts_terse_dump()
3175 nest = nla_nest_start_noflag(skb, exts->action); in tcf_exts_terse_dump()
3179 if (tcf_action_dump(skb, exts->actions, 0, 0, true) < 0) in tcf_exts_terse_dump()
3193 int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_dump_stats() argument
3196 struct tc_action *a = tcf_exts_first_act(exts); in tcf_exts_dump_stats()
3571 const struct tcf_exts *exts) in tc_setup_flow_action() argument
3580 if (!exts) in tc_setup_flow_action()
3584 tcf_exts_for_each_action(i, act, exts) { in tc_setup_flow_action()
3751 unsigned int tcf_exts_num_actions(struct tcf_exts *exts) in tcf_exts_num_actions() argument
3757 tcf_exts_for_each_action(i, act, exts) { in tcf_exts_num_actions()