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
1733 struct tcf_exts *exts; in __tcf_classify() local
1750 exts = tp->ops->get_exts(tp, n->handle); in __tcf_classify()
1751 if (unlikely(!exts || n->exts != exts)) { in __tcf_classify()
1758 err = tcf_exts_exec_ex(skb, exts, act_index, res); in __tcf_classify()
3330 int tcf_exts_init_ex(struct tcf_exts *exts, struct net *net, int action, in tcf_exts_init_ex() argument
3337 exts->type = 0; in tcf_exts_init_ex()
3338 exts->nr_actions = 0; in tcf_exts_init_ex()
3339 exts->miss_cookie_node = NULL; in tcf_exts_init_ex()
3343 exts->net = net; in tcf_exts_init_ex()
3344 exts->actions = kcalloc(TCA_ACT_MAX_PRIO, sizeof(struct tc_action *), in tcf_exts_init_ex()
3346 if (!exts->actions) in tcf_exts_init_ex()
3350 exts->action = action; in tcf_exts_init_ex()
3351 exts->police = police; in tcf_exts_init_ex()
3356 err = tcf_exts_miss_cookie_base_alloc(exts, tp, handle); in tcf_exts_init_ex()
3363 tcf_exts_destroy(exts); in tcf_exts_init_ex()
3365 exts->actions = NULL; in tcf_exts_init_ex()
3371 void tcf_exts_destroy(struct tcf_exts *exts) in tcf_exts_destroy() argument
3373 tcf_exts_miss_cookie_base_destroy(exts); in tcf_exts_destroy()
3376 if (exts->actions) { in tcf_exts_destroy()
3377 tcf_action_destroy(exts->actions, TCA_ACT_UNBIND); in tcf_exts_destroy()
3378 kfree(exts->actions); in tcf_exts_destroy()
3380 exts->nr_actions = 0; in tcf_exts_destroy()
3386 struct nlattr *rate_tlv, struct tcf_exts *exts, in tcf_exts_validate_ex() argument
3395 if (exts->police && tb[exts->police]) { in tcf_exts_validate_ex()
3399 a_o = tc_action_load_ops(tb[exts->police], flags, in tcf_exts_validate_ex()
3403 act = tcf_action_init_1(net, tp, tb[exts->police], in tcf_exts_validate_ex()
3410 act->type = exts->type = TCA_OLD_COMPAT; in tcf_exts_validate_ex()
3411 exts->actions[0] = act; in tcf_exts_validate_ex()
3412 exts->nr_actions = 1; in tcf_exts_validate_ex()
3413 tcf_idr_insert_many(exts->actions, init_res); in tcf_exts_validate_ex()
3414 } else if (exts->action && tb[exts->action]) { in tcf_exts_validate_ex()
3418 err = tcf_action_init(net, tp, tb[exts->action], in tcf_exts_validate_ex()
3419 rate_tlv, exts->actions, init_res, in tcf_exts_validate_ex()
3424 exts->nr_actions = err; in tcf_exts_validate_ex()
3428 if ((exts->action && tb[exts->action]) || in tcf_exts_validate_ex()
3429 (exts->police && tb[exts->police])) { in tcf_exts_validate_ex()
3440 struct nlattr *rate_tlv, struct tcf_exts *exts, in tcf_exts_validate() argument
3443 return tcf_exts_validate_ex(net, tp, tb, rate_tlv, exts, in tcf_exts_validate()
3460 static struct tc_action *tcf_exts_first_act(struct tcf_exts *exts) in tcf_exts_first_act() argument
3462 if (exts->nr_actions == 0) in tcf_exts_first_act()
3465 return exts->actions[0]; in tcf_exts_first_act()
3469 int tcf_exts_dump(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_dump() argument
3474 if (exts->action && tcf_exts_has_actions(exts)) { in tcf_exts_dump()
3480 if (exts->type != TCA_OLD_COMPAT) { in tcf_exts_dump()
3481 nest = nla_nest_start_noflag(skb, exts->action); in tcf_exts_dump()
3485 if (tcf_action_dump(skb, exts->actions, 0, 0, false) in tcf_exts_dump()
3489 } else if (exts->police) { in tcf_exts_dump()
3490 struct tc_action *act = tcf_exts_first_act(exts); in tcf_exts_dump()
3491 nest = nla_nest_start_noflag(skb, exts->police); in tcf_exts_dump()
3510 int tcf_exts_terse_dump(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_terse_dump() argument
3515 if (!exts->action || !tcf_exts_has_actions(exts)) in tcf_exts_terse_dump()
3518 nest = nla_nest_start_noflag(skb, exts->action); in tcf_exts_terse_dump()
3522 if (tcf_action_dump(skb, exts->actions, 0, 0, true) < 0) in tcf_exts_terse_dump()
3536 int tcf_exts_dump_stats(struct sk_buff *skb, struct tcf_exts *exts) in tcf_exts_dump_stats() argument
3539 struct tc_action *a = tcf_exts_first_act(exts); in tcf_exts_dump_stats()
3915 const struct tcf_exts *exts, in tc_setup_offload_action() argument
3921 if (!exts) in tc_setup_offload_action()
3924 miss_cookie_base = exts->miss_cookie_node ? in tc_setup_offload_action()
3925 exts->miss_cookie_node->miss_cookie_base : 0; in tc_setup_offload_action()
3926 return tc_setup_action(flow_action, exts->actions, miss_cookie_base, in tc_setup_offload_action()
3934 unsigned int tcf_exts_num_actions(struct tcf_exts *exts) in tcf_exts_num_actions() argument
3940 tcf_exts_for_each_action(i, act, exts) { in tcf_exts_num_actions()