Lines Matching refs:exts

56 	const struct tcf_exts *exts;  member
77 tcf_exts_miss_cookie_base_alloc(struct tcf_exts *exts, struct tcf_proto *tp, in tcf_exts_miss_cookie_base_alloc() argument
95 n->exts = exts; in tcf_exts_miss_cookie_base_alloc()
103 exts->miss_cookie_node = n; in tcf_exts_miss_cookie_base_alloc()
111 static void tcf_exts_miss_cookie_base_destroy(struct tcf_exts *exts) in tcf_exts_miss_cookie_base_destroy() argument
115 if (!exts->miss_cookie_node) in tcf_exts_miss_cookie_base_destroy()
118 n = exts->miss_cookie_node; in tcf_exts_miss_cookie_base_destroy()
133 tcf_exts_miss_cookie_base_alloc(struct tcf_exts *exts, struct tcf_proto *tp, in tcf_exts_miss_cookie_base_alloc() argument
139 static void tcf_exts_miss_cookie_base_destroy(struct tcf_exts *exts) in tcf_exts_miss_cookie_base_destroy() argument
1673 struct tcf_exts *exts; in __tcf_classify() local
1687 exts = tp->ops->get_exts(tp, n->handle); in __tcf_classify()
1688 if (unlikely(!exts || n->exts != exts)) in __tcf_classify()
1692 err = tcf_exts_exec_ex(skb, exts, act_index, res); in __tcf_classify()
3207 int tcf_exts_init_ex(struct tcf_exts *exts, struct net *net, int action, in tcf_exts_init_ex() argument
3214 exts->type = 0; in tcf_exts_init_ex()
3215 exts->nr_actions = 0; in tcf_exts_init_ex()
3216 exts->miss_cookie_node = NULL; in tcf_exts_init_ex()
3220 exts->net = net; in tcf_exts_init_ex()
3221 exts->actions = kcalloc(TCA_ACT_MAX_PRIO, sizeof(struct tc_action *), in tcf_exts_init_ex()
3223 if (!exts->actions) in tcf_exts_init_ex()
3227 exts->action = action; in tcf_exts_init_ex()
3228 exts->police = police; in tcf_exts_init_ex()
3233 err = tcf_exts_miss_cookie_base_alloc(exts, tp, handle); in tcf_exts_init_ex()
3240 tcf_exts_destroy(exts); in tcf_exts_init_ex()
3242 exts->actions = NULL; in tcf_exts_init_ex()
3248 void tcf_exts_destroy(struct tcf_exts *exts) in tcf_exts_destroy() argument
3250 tcf_exts_miss_cookie_base_destroy(exts); in tcf_exts_destroy()
3253 if (exts->actions) { in tcf_exts_destroy()
3254 tcf_action_destroy(exts->actions, TCA_ACT_UNBIND); in tcf_exts_destroy()
3255 kfree(exts->actions); in tcf_exts_destroy()
3257 exts->nr_actions = 0; in tcf_exts_destroy()
3263 struct nlattr *rate_tlv, struct tcf_exts *exts, in tcf_exts_validate_ex() argument
3272 if (exts->police && tb[exts->police]) { in tcf_exts_validate_ex()
3275 a_o = tc_action_load_ops(tb[exts->police], true, in tcf_exts_validate_ex()
3281 act = tcf_action_init_1(net, tp, tb[exts->police], in tcf_exts_validate_ex()
3288 act->type = exts->type = TCA_OLD_COMPAT; in tcf_exts_validate_ex()
3289 exts->actions[0] = act; in tcf_exts_validate_ex()
3290 exts->nr_actions = 1; in tcf_exts_validate_ex()
3291 tcf_idr_insert_many(exts->actions); in tcf_exts_validate_ex()
3292 } else if (exts->action && tb[exts->action]) { in tcf_exts_validate_ex()
3296 err = tcf_action_init(net, tp, tb[exts->action], in tcf_exts_validate_ex()
3297 rate_tlv, exts->actions, init_res, in tcf_exts_validate_ex()
3302 exts->nr_actions = err; in tcf_exts_validate_ex()
3306 if ((exts->action && tb[exts->action]) || in tcf_exts_validate_ex()
3307 (exts->police && tb[exts->police])) { in tcf_exts_validate_ex()
3318 struct nlattr *rate_tlv, struct tcf_exts *exts, in tcf_exts_validate() argument
3321 return tcf_exts_validate_ex(net, tp, tb, rate_tlv, exts, in tcf_exts_validate()
3338 static struct tc_action *tcf_exts_first_act(struct tcf_exts *exts) in tcf_exts_first_act() argument
3340 if (exts->nr_actions == 0) in tcf_exts_first_act()
3343 return exts->actions[0]; in tcf_exts_first_act()
3347 int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_dump() argument
3352 if (exts->action && tcf_exts_has_actions(exts)) { in tcf_exts_dump()
3358 if (exts->type != TCA_OLD_COMPAT) { in tcf_exts_dump()
3359 nest = nla_nest_start_noflag(skb, exts->action); in tcf_exts_dump()
3363 if (tcf_action_dump(skb, exts->actions, 0, 0, false) in tcf_exts_dump()
3367 } else if (exts->police) { in tcf_exts_dump()
3368 struct tc_action *act = tcf_exts_first_act(exts); in tcf_exts_dump()
3369 nest = nla_nest_start_noflag(skb, exts->police); in tcf_exts_dump()
3388 int tcf_exts_terse_dump(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_terse_dump() argument
3393 if (!exts->action || !tcf_exts_has_actions(exts)) in tcf_exts_terse_dump()
3396 nest = nla_nest_start_noflag(skb, exts->action); in tcf_exts_terse_dump()
3400 if (tcf_action_dump(skb, exts->actions, 0, 0, true) < 0) in tcf_exts_terse_dump()
3414 int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_dump_stats() argument
3417 struct tc_action *a = tcf_exts_first_act(exts); in tcf_exts_dump_stats()
3793 const struct tcf_exts *exts, in tc_setup_offload_action() argument
3799 if (!exts) in tc_setup_offload_action()
3802 miss_cookie_base = exts->miss_cookie_node ? in tc_setup_offload_action()
3803 exts->miss_cookie_node->miss_cookie_base : 0; in tc_setup_offload_action()
3804 return tc_setup_action(flow_action, exts->actions, miss_cookie_base, in tc_setup_offload_action()
3812 unsigned int tcf_exts_num_actions(struct tcf_exts *exts) in tcf_exts_num_actions() argument
3818 tcf_exts_for_each_action(i, act, exts) { in tcf_exts_num_actions()