Lines Matching refs:a
25 static void tcf_action_goto_chain_exec(const struct tc_action *a, in tcf_action_goto_chain_exec() argument
28 const struct tcf_chain *chain = rcu_dereference_bh(a->goto_chain); in tcf_action_goto_chain_exec()
87 struct tcf_chain *tcf_action_set_ctrlact(struct tc_action *a, int action, in tcf_action_set_ctrlact() argument
90 a->tcfa_action = action; in tcf_action_set_ctrlact()
91 rcu_swap_protected(a->goto_chain, goto_chain, 1); in tcf_action_set_ctrlact()
357 int tcf_idr_search(struct tc_action_net *tn, struct tc_action **a, u32 index) in tcf_idr_search() argument
371 *a = p; in tcf_idr_search()
412 struct tc_action **a, const struct tc_action_ops *ops, in tcf_idr_create() argument
451 *a = p; in tcf_idr_create()
485 struct tc_action **a, int bind) in tcf_idr_check_alloc() argument
507 *a = p; in tcf_idr_check_alloc()
510 *a = NULL; in tcf_idr_check_alloc()
519 *a = NULL; in tcf_idr_check_alloc()
557 struct tc_action_ops *a; in tcf_register_action() local
572 list_for_each_entry(a, &act_base, head) { in tcf_register_action()
573 if (act->id == a->id || (strcmp(act->kind, a->kind) == 0)) { in tcf_register_action()
589 struct tc_action_ops *a; in tcf_unregister_action() local
593 list_for_each_entry(a, &act_base, head) { in tcf_unregister_action()
594 if (a == act) { in tcf_unregister_action()
610 struct tc_action_ops *a, *res = NULL; in tc_lookup_action_n() local
614 list_for_each_entry(a, &act_base, head) { in tc_lookup_action_n()
615 if (strcmp(kind, a->kind) == 0) { in tc_lookup_action_n()
616 if (try_module_get(a->owner)) in tc_lookup_action_n()
617 res = a; in tc_lookup_action_n()
629 struct tc_action_ops *a, *res = NULL; in tc_lookup_action() local
633 list_for_each_entry(a, &act_base, head) { in tc_lookup_action()
634 if (nla_strcmp(kind, a->kind) == 0) { in tc_lookup_action()
635 if (try_module_get(a->owner)) in tc_lookup_action()
636 res = a; in tc_lookup_action()
660 const struct tc_action *a = actions[i]; in tcf_action_exec() local
670 ret = a->ops->act(skb, a, res); in tcf_action_exec()
693 if (unlikely(!rcu_access_pointer(a->goto_chain))) { in tcf_action_exec()
697 tcf_action_goto_chain_exec(a, res); in tcf_action_exec()
711 struct tc_action *a; in tcf_action_destroy() local
715 a = actions[i]; in tcf_action_destroy()
717 ops = a->ops; in tcf_action_destroy()
718 ret = __tcf_idr_release(a, bind, true); in tcf_action_destroy()
738 struct tc_action *a = actions[i]; in tcf_action_put_many() local
741 if (!a) in tcf_action_put_many()
743 ops = a->ops; in tcf_action_put_many()
744 if (tcf_action_put(a)) in tcf_action_put_many()
750 tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int bind, int ref) in tcf_action_dump_old() argument
752 return a->ops->dump(skb, a, bind, ref); in tcf_action_dump_old()
756 tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref) in tcf_action_dump_1() argument
763 if (nla_put_string(skb, TCA_KIND, a->ops->kind)) in tcf_action_dump_1()
765 if (tcf_action_copy_stats(skb, a, 0)) in tcf_action_dump_1()
769 cookie = rcu_dereference(a->act_cookie); in tcf_action_dump_1()
781 err = tcf_action_dump_old(skb, a, bind, ref); in tcf_action_dump_1()
796 struct tc_action *a; in tcf_action_dump() local
801 a = actions[i]; in tcf_action_dump()
805 err = tcf_action_dump_1(skb, a, bind, ref); in tcf_action_dump()
849 struct tc_action *a = actions[i]; in tcf_idr_insert_many() local
852 if (!a) in tcf_idr_insert_many()
854 idrinfo = a->idrinfo; in tcf_idr_insert_many()
859 idr_replace(&idrinfo->action_idr, a, a->tcfa_index); in tcf_idr_insert_many()
870 struct tc_action *a; in tcf_action_init_1() local
938 err = a_o->init(net, tb[TCA_ACT_OPTIONS], est, &a, ovr, bind, in tcf_action_init_1()
941 err = a_o->init(net, nla, est, &a, ovr, bind, rtnl_held, in tcf_action_init_1()
947 tcf_set_action_cookie(&a->act_cookie, cookie); in tcf_action_init_1()
957 refcount_set(&a->tcfa_refcnt, 2); in tcf_action_init_1()
959 return a; in tcf_action_init_1()
1121 struct tc_action *a; in tcf_action_get_1() local
1145 if (ops->lookup(net, &a, index) == 0) { in tcf_action_get_1()
1151 return a; in tcf_action_get_1()
1242 struct tc_action *a = actions[i]; in tcf_action_delete() local
1243 const struct tc_action_ops *ops = a->ops; in tcf_action_delete()
1247 struct tcf_idrinfo *idrinfo = a->idrinfo; in tcf_action_delete()
1248 u32 act_index = a->tcfa_index; in tcf_action_delete()
1251 if (tcf_action_put(a)) { in tcf_action_delete()