Lines Matching refs:exts
3043 void tcf_exts_destroy(struct tcf_exts *exts)
3046 if (exts->actions) {
3047 tcf_action_destroy(exts->actions, TCA_ACT_UNBIND);
3048 kfree(exts->actions);
3050 exts->nr_actions = 0;
3056 struct nlattr *rate_tlv, struct tcf_exts *exts, bool ovr,
3065 if (exts->police && tb[exts->police]) {
3068 a_o = tc_action_load_ops("police", tb[exts->police], rtnl_held, extack);
3071 act = tcf_action_init_1(net, tp, tb[exts->police],
3079 act->type = exts->type = TCA_OLD_COMPAT;
3080 exts->actions[0] = act;
3081 exts->nr_actions = 1;
3082 tcf_idr_insert_many(exts->actions);
3083 } else if (exts->action && tb[exts->action]) {
3086 err = tcf_action_init(net, tp, tb[exts->action],
3088 exts->actions, init_res,
3092 exts->nr_actions = err;
3096 if ((exts->action && tb[exts->action]) ||
3097 (exts->police && tb[exts->police])) {
3119 static struct tc_action *tcf_exts_first_act(struct tcf_exts *exts)
3121 if (exts->nr_actions == 0)
3124 return exts->actions[0];
3128 int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts)
3133 if (exts->action && tcf_exts_has_actions(exts)) {
3139 if (exts->type != TCA_OLD_COMPAT) {
3140 nest = nla_nest_start_noflag(skb, exts->action);
3144 if (tcf_action_dump(skb, exts->actions, 0, 0, false)
3148 } else if (exts->police) {
3149 struct tc_action *act = tcf_exts_first_act(exts);
3150 nest = nla_nest_start_noflag(skb, exts->police);
3169 int tcf_exts_terse_dump(struct sk_buff *skb, struct tcf_exts *exts)
3174 if (!exts->action || !tcf_exts_has_actions(exts))
3177 nest = nla_nest_start_noflag(skb, exts->action);
3181 if (tcf_action_dump(skb, exts->actions, 0, 0, true) < 0)
3195 int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts)
3198 struct tc_action *a = tcf_exts_first_act(exts);
3573 const struct tcf_exts *exts)
3582 if (!exts)
3586 tcf_exts_for_each_action(i, act, exts) {
3753 unsigned int tcf_exts_num_actions(struct tcf_exts *exts)
3759 tcf_exts_for_each_action(i, act, exts) {