Lines Matching full:act

135 static void offload_action_hw_count_set(struct tc_action *act,  in offload_action_hw_count_set()  argument
138 act->in_hw_count = hw_count; in offload_action_hw_count_set()
141 static void offload_action_hw_count_inc(struct tc_action *act, in offload_action_hw_count_inc() argument
144 act->in_hw_count += hw_count; in offload_action_hw_count_inc()
147 static void offload_action_hw_count_dec(struct tc_action *act, in offload_action_hw_count_dec() argument
150 act->in_hw_count = act->in_hw_count > hw_count ? in offload_action_hw_count_dec()
151 act->in_hw_count - hw_count : 0; in offload_action_hw_count_dec()
154 static unsigned int tcf_offload_act_num_actions_single(struct tc_action *act) in tcf_offload_act_num_actions_single() argument
156 if (is_tcf_pedit(act)) in tcf_offload_act_num_actions_single()
157 return tcf_pedit_nkeys(act); in tcf_offload_act_num_actions_single()
181 struct tc_action *act, in offload_action_init() argument
189 fl_action->index = act->tcfa_index; in offload_action_init()
190 fl_action->cookie = (unsigned long)act; in offload_action_init()
192 if (act->ops->offload_act_setup) { in offload_action_init()
193 spin_lock_bh(&act->tcfa_lock); in offload_action_init()
194 err = act->ops->offload_act_setup(act, fl_action, NULL, in offload_action_init()
196 spin_unlock_bh(&act->tcfa_lock); in offload_action_init()
397 /* Release with strict==1 and bind==0 is only called through act API in __tcf_idr_release()
400 * also created with act API (unbinding last classifier will destroy the in __tcf_idr_release()
403 * destroyed by act API while classifier binds to action with same id in __tcf_idr_release()
432 static size_t tcf_action_shared_attrs_size(const struct tc_action *act) in tcf_action_shared_attrs_size() argument
438 user_cookie = rcu_dereference(act->user_cookie); in tcf_action_shared_attrs_size()
468 static size_t tcf_action_fill_size(const struct tc_action *act) in tcf_action_fill_size() argument
470 size_t sz = tcf_action_shared_attrs_size(act); in tcf_action_fill_size()
472 if (act->ops->get_fill_size) in tcf_action_fill_size()
473 return act->ops->get_fill_size(act) + sz; in tcf_action_fill_size()
963 /* since act ops id is stored in pernet subsystem list,
1017 int tcf_register_action(struct tc_action_ops *act, in tcf_register_action() argument
1023 if (!act->act || !act->dump || !act->init) in tcf_register_action()
1042 if (act->id == a->id || (strcmp(act->kind, a->kind) == 0)) { in tcf_register_action()
1047 list_add_tail(&act->head, &act_base); in tcf_register_action()
1062 int tcf_unregister_action(struct tc_action_ops *act, in tcf_unregister_action() argument
1070 if (a == act) { in tcf_unregister_action()
1071 list_del(&act->head); in tcf_unregister_action()
1474 struct tc_action *act; in tcf_action_init() local
1508 act = tcf_action_init_1(net, tp, tb[i], est, ops[i - 1], in tcf_action_init()
1510 if (IS_ERR(act)) { in tcf_action_init()
1511 err = PTR_ERR(act); in tcf_action_init()
1514 sz += tcf_action_fill_size(act); in tcf_action_init()
1516 actions[i - 1] = act; in tcf_action_init()
1521 if (tc_act_bind(act->tcfa_flags)) { in tcf_action_init()
1529 if ((tc_act_skip_sw(act->tcfa_flags) && !skip_sw) || in tcf_action_init()
1530 (tc_act_skip_hw(act->tcfa_flags) && !skip_hw)) { in tcf_action_init()
1537 act->tcfa_flags |= TCA_ACT_FLAGS_SKIP_SW; in tcf_action_init()
1539 act->tcfa_flags |= TCA_ACT_FLAGS_SKIP_HW; in tcf_action_init()
1544 if (skip_sw != tc_act_skip_sw(act->tcfa_flags) || in tcf_action_init()
1545 skip_hw != tc_act_skip_hw(act->tcfa_flags)) { in tcf_action_init()
1552 err = tcf_action_offload_add(act, extack); in tcf_action_init()
1553 if (tc_act_skip_sw(act->tcfa_flags) && err) in tcf_action_init()
2014 struct tc_action *act; in tca_action_gd() local
2032 act = tcf_action_get_1(net, tb[i], n, portid, extack); in tca_action_gd()
2033 if (IS_ERR(act)) { in tca_action_gd()
2034 ret = PTR_ERR(act); in tca_action_gd()
2037 attr_size += tcf_action_fill_size(act); in tca_action_gd()
2038 actions[i - 1] = act; in tca_action_gd()