2 * net/sched/act_api.c Packet action API.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
9 * Author: Jamal Hadi Salim
14 #include <linux/types.h>
15 #include <linux/kernel.h>
16 #include <linux/string.h>
17 #include <linux/errno.h>
18 #include <linux/slab.h>
19 #include <linux/skbuff.h>
20 #include <linux/init.h>
21 #include <linux/kmod.h>
22 #include <linux/err.h>
23 #include <linux/module.h>
24 #include <net/net_namespace.h>
26 #include <net/sch_generic.h>
27 #include <net/act_api.h>
28 #include <net/netlink.h>
30 void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo)
32 unsigned int h = tcf_hash(p->tcfc_index, hinfo->hmask);
33 struct tcf_common **p1p;
35 for (p1p = &hinfo->htab[h]; *p1p; p1p = &(*p1p)->tcfc_next) {
37 write_lock_bh(hinfo->lock);
39 write_unlock_bh(hinfo->lock);
40 gen_kill_estimator(&p->tcfc_bstats,
43 * gen_estimator est_timer() might access p->tcfc_lock
44 * or bstats, wait a RCU grace period before freeing p
46 kfree_rcu(p, tcfc_rcu);
52 EXPORT_SYMBOL(tcf_hash_destroy);
54 int tcf_hash_release(struct tcf_common *p, int bind,
55 struct tcf_hashinfo *hinfo)
64 if (p->tcfc_bindcnt <= 0 && p->tcfc_refcnt <= 0) {
65 tcf_hash_destroy(p, hinfo);
71 EXPORT_SYMBOL(tcf_hash_release);
73 static int tcf_dump_walker(struct sk_buff *skb, struct netlink_callback *cb,
74 struct tc_action *a, struct tcf_hashinfo *hinfo)
77 int err = 0, index = -1, i = 0, s_i = 0, n_i = 0;
80 read_lock_bh(hinfo->lock);
84 for (i = 0; i < (hinfo->hmask + 1); i++) {
85 p = hinfo->htab[tcf_hash(i, hinfo->hmask)];
87 for (; p; p = p->tcfc_next) {
94 nest = nla_nest_start(skb, a->order);
97 err = tcf_action_dump_1(skb, a, 0, 0);
100 nlmsg_trim(skb, nest);
103 nla_nest_end(skb, nest);
105 if (n_i >= TCA_ACT_MAX_PRIO)
110 read_unlock_bh(hinfo->lock);
116 nla_nest_cancel(skb, nest);
120 static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a,
121 struct tcf_hashinfo *hinfo)
123 struct tcf_common *p, *s_p;
127 nest = nla_nest_start(skb, a->order);
129 goto nla_put_failure;
130 if (nla_put_string(skb, TCA_KIND, a->ops->kind))
131 goto nla_put_failure;
132 for (i = 0; i < (hinfo->hmask + 1); i++) {
133 p = hinfo->htab[tcf_hash(i, hinfo->hmask)];
137 if (ACT_P_DELETED == tcf_hash_release(p, 0, hinfo))
138 module_put(a->ops->owner);
143 if (nla_put_u32(skb, TCA_FCNT, n_i))
144 goto nla_put_failure;
145 nla_nest_end(skb, nest);
149 nla_nest_cancel(skb, nest);
153 int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb,
154 int type, struct tc_action *a)
156 struct tcf_hashinfo *hinfo = a->ops->hinfo;
158 if (type == RTM_DELACTION) {
159 return tcf_del_walker(skb, a, hinfo);
160 } else if (type == RTM_GETACTION) {
161 return tcf_dump_walker(skb, cb, a, hinfo);
163 WARN(1, "tcf_generic_walker: unknown action %d\n", type);
167 EXPORT_SYMBOL(tcf_generic_walker);
169 struct tcf_common *tcf_hash_lookup(u32 index, struct tcf_hashinfo *hinfo)
171 struct tcf_common *p;
173 read_lock_bh(hinfo->lock);
174 for (p = hinfo->htab[tcf_hash(index, hinfo->hmask)]; p;
176 if (p->tcfc_index == index)
179 read_unlock_bh(hinfo->lock);
183 EXPORT_SYMBOL(tcf_hash_lookup);
185 u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo)
192 } while (tcf_hash_lookup(val, hinfo));
197 EXPORT_SYMBOL(tcf_hash_new_index);
199 int tcf_hash_search(struct tc_action *a, u32 index)
201 struct tcf_hashinfo *hinfo = a->ops->hinfo;
202 struct tcf_common *p = tcf_hash_lookup(index, hinfo);
210 EXPORT_SYMBOL(tcf_hash_search);
212 struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a, int bind,
213 struct tcf_hashinfo *hinfo)
215 struct tcf_common *p = NULL;
216 if (index && (p = tcf_hash_lookup(index, hinfo)) != NULL) {
224 EXPORT_SYMBOL(tcf_hash_check);
226 struct tcf_common *tcf_hash_create(u32 index, struct nlattr *est,
227 struct tc_action *a, int size, int bind,
228 u32 *idx_gen, struct tcf_hashinfo *hinfo)
230 struct tcf_common *p = kzalloc(size, GFP_KERNEL);
233 return ERR_PTR(-ENOMEM);
238 spin_lock_init(&p->tcfc_lock);
239 p->tcfc_index = index ? index : tcf_hash_new_index(idx_gen, hinfo);
240 p->tcfc_tm.install = jiffies;
241 p->tcfc_tm.lastuse = jiffies;
243 int err = gen_new_estimator(&p->tcfc_bstats, &p->tcfc_rate_est,
251 a->priv = (void *) p;
254 EXPORT_SYMBOL(tcf_hash_create);
256 void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo)
258 unsigned int h = tcf_hash(p->tcfc_index, hinfo->hmask);
260 write_lock_bh(hinfo->lock);
261 p->tcfc_next = hinfo->htab[h];
263 write_unlock_bh(hinfo->lock);
265 EXPORT_SYMBOL(tcf_hash_insert);
267 static struct tc_action_ops *act_base = NULL;
268 static DEFINE_RWLOCK(act_mod_lock);
270 int tcf_register_action(struct tc_action_ops *act)
272 struct tc_action_ops *a, **ap;
274 /* Must supply act, dump, cleanup and init */
275 if (!act->act || !act->dump || !act->cleanup || !act->init)
278 /* Supply defaults */
280 act->lookup = tcf_hash_search;
282 act->walk = tcf_generic_walker;
284 write_lock(&act_mod_lock);
285 for (ap = &act_base; (a = *ap) != NULL; ap = &a->next) {
286 if (act->type == a->type || (strcmp(act->kind, a->kind) == 0)) {
287 write_unlock(&act_mod_lock);
293 write_unlock(&act_mod_lock);
296 EXPORT_SYMBOL(tcf_register_action);
298 int tcf_unregister_action(struct tc_action_ops *act)
300 struct tc_action_ops *a, **ap;
303 write_lock(&act_mod_lock);
304 for (ap = &act_base; (a = *ap) != NULL; ap = &a->next)
312 write_unlock(&act_mod_lock);
315 EXPORT_SYMBOL(tcf_unregister_action);
318 static struct tc_action_ops *tc_lookup_action_n(char *kind)
320 struct tc_action_ops *a = NULL;
323 read_lock(&act_mod_lock);
324 for (a = act_base; a; a = a->next) {
325 if (strcmp(kind, a->kind) == 0) {
326 if (!try_module_get(a->owner)) {
327 read_unlock(&act_mod_lock);
333 read_unlock(&act_mod_lock);
338 /* lookup by nlattr */
339 static struct tc_action_ops *tc_lookup_action(struct nlattr *kind)
341 struct tc_action_ops *a = NULL;
344 read_lock(&act_mod_lock);
345 for (a = act_base; a; a = a->next) {
346 if (nla_strcmp(kind, a->kind) == 0) {
347 if (!try_module_get(a->owner)) {
348 read_unlock(&act_mod_lock);
354 read_unlock(&act_mod_lock);
361 static struct tc_action_ops *tc_lookup_action_id(u32 type)
363 struct tc_action_ops *a = NULL;
366 read_lock(&act_mod_lock);
367 for (a = act_base; a; a = a->next) {
368 if (a->type == type) {
369 if (!try_module_get(a->owner)) {
370 read_unlock(&act_mod_lock);
376 read_unlock(&act_mod_lock);
382 int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions,
383 struct tcf_result *res)
385 const struct tc_action *a;
388 if (skb->tc_verd & TC_NCLS) {
389 skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
393 list_for_each_entry(a, actions, list) {
396 ret = a->ops->act(skb, a, res);
397 if (TC_MUNGED & skb->tc_verd) {
398 /* copied already, allow trampling */
399 skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd);
400 skb->tc_verd = CLR_TC_MUNGED(skb->tc_verd);
402 if (ret == TC_ACT_REPEAT)
403 goto repeat; /* we need a ttl - JHS */
404 if (ret != TC_ACT_PIPE)
411 EXPORT_SYMBOL(tcf_action_exec);
413 void tcf_action_destroy(struct list_head *actions, int bind)
415 struct tc_action *a, *tmp;
417 list_for_each_entry_safe(a, tmp, actions, list) {
419 if (a->ops->cleanup(a, bind) == ACT_P_DELETED)
420 module_put(a->ops->owner);
424 /*FIXME: Remove later - catch insertion bugs*/
425 WARN(1, "tcf_action_destroy: BUG? destroying NULL ops\n");
433 tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
439 return a->ops->dump(skb, a, bind, ref);
443 tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
446 unsigned char *b = skb_tail_pointer(skb);
452 if (nla_put_string(skb, TCA_KIND, a->ops->kind))
453 goto nla_put_failure;
454 if (tcf_action_copy_stats(skb, a, 0))
455 goto nla_put_failure;
456 nest = nla_nest_start(skb, TCA_OPTIONS);
458 goto nla_put_failure;
459 err = tcf_action_dump_old(skb, a, bind, ref);
461 nla_nest_end(skb, nest);
469 EXPORT_SYMBOL(tcf_action_dump_1);
472 tcf_action_dump(struct sk_buff *skb, struct list_head *actions, int bind, int ref)
478 list_for_each_entry(a, actions, list) {
479 nest = nla_nest_start(skb, a->order);
481 goto nla_put_failure;
482 err = tcf_action_dump_1(skb, a, bind, ref);
485 nla_nest_end(skb, nest);
493 nla_nest_cancel(skb, nest);
497 struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla,
498 struct nlattr *est, char *name, int ovr,
502 struct tc_action_ops *a_o;
503 char act_name[IFNAMSIZ];
504 struct nlattr *tb[TCA_ACT_MAX + 1];
509 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL);
513 kind = tb[TCA_ACT_KIND];
516 if (nla_strlcpy(act_name, kind, IFNAMSIZ) >= IFNAMSIZ)
520 if (strlcpy(act_name, name, IFNAMSIZ) >= IFNAMSIZ)
524 a_o = tc_lookup_action_n(act_name);
526 #ifdef CONFIG_MODULES
528 request_module("act_%s", act_name);
531 a_o = tc_lookup_action_n(act_name);
533 /* We dropped the RTNL semaphore in order to
534 * perform the module load. So, even if we
535 * succeeded in loading the module we have to
536 * tell the caller to replay the request. We
537 * indicate this using -EAGAIN.
549 a = kzalloc(sizeof(*a), GFP_KERNEL);
553 INIT_LIST_HEAD(&a->list);
554 /* backward compatibility for policer */
556 err = a_o->init(net, tb[TCA_ACT_OPTIONS], est, a, ovr, bind);
558 err = a_o->init(net, nla, est, a, ovr, bind);
562 /* module count goes up only when brand new policy is created
563 * if it exists and is only bound to in a_o->init() then
564 * ACT_P_CREATED is not returned (a zero is).
566 if (err != ACT_P_CREATED)
567 module_put(a_o->owner);
575 module_put(a_o->owner);
580 int tcf_action_init(struct net *net, struct nlattr *nla,
581 struct nlattr *est, char *name, int ovr,
582 int bind, struct list_head *actions)
584 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1];
585 struct tc_action *act;
589 err = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL);
593 for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) {
594 act = tcf_action_init_1(net, tb[i], est, name, ovr, bind);
600 list_add_tail(&act->list, actions);
605 tcf_action_destroy(actions, bind);
609 int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
614 struct tcf_act_hdr *h = a->priv;
619 /* compat_mode being true specifies a call that is supposed
620 * to add additional backward compatibility statistic TLVs.
623 if (a->type == TCA_OLD_COMPAT)
624 err = gnet_stats_start_copy_compat(skb, 0,
625 TCA_STATS, TCA_XSTATS, &h->tcf_lock, &d);
629 err = gnet_stats_start_copy(skb, TCA_ACT_STATS,
635 if (gnet_stats_copy_basic(&d, &h->tcf_bstats) < 0 ||
636 gnet_stats_copy_rate_est(&d, &h->tcf_bstats,
637 &h->tcf_rate_est) < 0 ||
638 gnet_stats_copy_queue(&d, &h->tcf_qstats) < 0)
641 if (gnet_stats_finish_copy(&d) < 0)
651 tca_get_fill(struct sk_buff *skb, struct list_head *actions, u32 portid, u32 seq,
652 u16 flags, int event, int bind, int ref)
655 struct nlmsghdr *nlh;
656 unsigned char *b = skb_tail_pointer(skb);
659 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*t), flags);
663 t->tca_family = AF_UNSPEC;
667 nest = nla_nest_start(skb, TCA_ACT_TAB);
671 if (tcf_action_dump(skb, actions, bind, ref) < 0)
674 nla_nest_end(skb, nest);
676 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
685 act_get_notify(struct net *net, u32 portid, struct nlmsghdr *n,
686 struct list_head *actions, int event)
690 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
693 if (tca_get_fill(skb, actions, portid, n->nlmsg_seq, 0, event, 0, 0) <= 0) {
698 return rtnl_unicast(skb, net, portid);
701 static struct tc_action *
702 tcf_action_get_1(struct nlattr *nla, struct nlmsghdr *n, u32 portid)
704 struct nlattr *tb[TCA_ACT_MAX + 1];
709 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL);
714 if (tb[TCA_ACT_INDEX] == NULL ||
715 nla_len(tb[TCA_ACT_INDEX]) < sizeof(index))
717 index = nla_get_u32(tb[TCA_ACT_INDEX]);
720 a = kzalloc(sizeof(struct tc_action), GFP_KERNEL);
724 INIT_LIST_HEAD(&a->list);
726 a->ops = tc_lookup_action(tb[TCA_ACT_KIND]);
730 if (a->ops->lookup(a, index) == 0)
733 module_put(a->ops->owner);
737 module_put(a->ops->owner);
744 static void cleanup_a(struct list_head *actions)
746 struct tc_action *a, *tmp;
748 list_for_each_entry_safe(a, tmp, actions, list) {
754 static struct tc_action *create_a(int i)
756 struct tc_action *act;
758 act = kzalloc(sizeof(*act), GFP_KERNEL);
760 pr_debug("create_a: failed to alloc!\n");
764 INIT_LIST_HEAD(&act->list);
768 static int tca_action_flush(struct net *net, struct nlattr *nla,
769 struct nlmsghdr *n, u32 portid)
773 struct nlmsghdr *nlh;
775 struct netlink_callback dcb;
777 struct nlattr *tb[TCA_ACT_MAX + 1];
779 struct tc_action *a = create_a(0);
783 pr_debug("tca_action_flush: couldnt create tc_action\n");
787 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
789 pr_debug("tca_action_flush: failed skb alloc\n");
794 b = skb_tail_pointer(skb);
796 err = nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL);
801 kind = tb[TCA_ACT_KIND];
802 a->ops = tc_lookup_action(kind);
806 nlh = nlmsg_put(skb, portid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t), 0);
810 t->tca_family = AF_UNSPEC;
814 nest = nla_nest_start(skb, TCA_ACT_TAB);
818 err = a->ops->walk(skb, &dcb, RTM_DELACTION, a);
824 nla_nest_end(skb, nest);
826 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
827 nlh->nlmsg_flags |= NLM_F_ROOT;
828 module_put(a->ops->owner);
830 err = rtnetlink_send(skb, net, portid, RTNLGRP_TC,
831 n->nlmsg_flags & NLM_F_ECHO);
838 module_put(a->ops->owner);
847 tca_action_gd(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
848 u32 portid, int event)
851 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1];
852 struct tc_action *act;
855 ret = nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL);
859 if (event == RTM_DELACTION && n->nlmsg_flags & NLM_F_ROOT) {
861 return tca_action_flush(net, tb[1], n, portid);
866 for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) {
867 act = tcf_action_get_1(tb[i], n, portid);
873 list_add_tail(&act->list, &actions);
876 if (event == RTM_GETACTION)
877 ret = act_get_notify(net, portid, n, &actions, event);
881 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
887 if (tca_get_fill(skb, &actions, portid, n->nlmsg_seq, 0, event,
894 /* now do the delete */
895 tcf_action_destroy(&actions, 0);
896 ret = rtnetlink_send(skb, net, portid, RTNLGRP_TC,
897 n->nlmsg_flags & NLM_F_ECHO);
907 static int tcf_add_notify(struct net *net, struct list_head *actions,
908 u32 portid, u32 seq, int event, u16 flags)
911 struct nlmsghdr *nlh;
917 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
921 b = skb_tail_pointer(skb);
923 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*t), flags);
927 t->tca_family = AF_UNSPEC;
931 nest = nla_nest_start(skb, TCA_ACT_TAB);
935 if (tcf_action_dump(skb, actions, 0, 0) < 0)
938 nla_nest_end(skb, nest);
940 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
941 NETLINK_CB(skb).dst_group = RTNLGRP_TC;
943 err = rtnetlink_send(skb, net, portid, RTNLGRP_TC, flags & NLM_F_ECHO);
955 tcf_action_add(struct net *net, struct nlattr *nla, struct nlmsghdr *n,
960 u32 seq = n->nlmsg_seq;
962 ret = tcf_action_init(net, nla, NULL, NULL, ovr, 0, &actions);
966 /* dump then free all the actions after update; inserted policy
969 ret = tcf_add_notify(net, &actions, portid, seq, RTM_NEWACTION, n->nlmsg_flags);
975 static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n)
977 struct net *net = sock_net(skb->sk);
978 struct nlattr *tca[TCA_ACT_MAX + 1];
979 u32 portid = skb ? NETLINK_CB(skb).portid : 0;
980 int ret = 0, ovr = 0;
982 if ((n->nlmsg_type != RTM_GETACTION) && !capable(CAP_NET_ADMIN))
985 ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL);
989 if (tca[TCA_ACT_TAB] == NULL) {
990 pr_notice("tc_ctl_action: received NO action attribs\n");
994 /* n->nlmsg_flags & NLM_F_CREATE */
995 switch (n->nlmsg_type) {
997 /* we are going to assume all other flags
998 * imply create only if it doesn't exist
999 * Note that CREATE | EXCL implies that
1000 * but since we want avoid ambiguity (eg when flags
1001 * is zero) then just set this
1003 if (n->nlmsg_flags & NLM_F_REPLACE)
1006 ret = tcf_action_add(net, tca[TCA_ACT_TAB], n, portid, ovr);
1011 ret = tca_action_gd(net, tca[TCA_ACT_TAB], n,
1012 portid, RTM_DELACTION);
1015 ret = tca_action_gd(net, tca[TCA_ACT_TAB], n,
1016 portid, RTM_GETACTION);
1025 static struct nlattr *
1026 find_dump_kind(const struct nlmsghdr *n)
1028 struct nlattr *tb1, *tb2[TCA_ACT_MAX + 1];
1029 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1];
1030 struct nlattr *nla[TCAA_MAX + 1];
1031 struct nlattr *kind;
1033 if (nlmsg_parse(n, sizeof(struct tcamsg), nla, TCAA_MAX, NULL) < 0)
1035 tb1 = nla[TCA_ACT_TAB];
1039 if (nla_parse(tb, TCA_ACT_MAX_PRIO, nla_data(tb1),
1040 NLMSG_ALIGN(nla_len(tb1)), NULL) < 0)
1045 if (nla_parse(tb2, TCA_ACT_MAX, nla_data(tb[1]),
1046 nla_len(tb[1]), NULL) < 0)
1048 kind = tb2[TCA_ACT_KIND];
1054 tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
1056 struct nlmsghdr *nlh;
1057 unsigned char *b = skb_tail_pointer(skb);
1058 struct nlattr *nest;
1059 struct tc_action_ops *a_o;
1062 struct tcamsg *t = (struct tcamsg *) nlmsg_data(cb->nlh);
1063 struct nlattr *kind = find_dump_kind(cb->nlh);
1066 pr_info("tc_dump_action: action bad kind\n");
1070 a_o = tc_lookup_action(kind);
1074 memset(&a, 0, sizeof(struct tc_action));
1077 nlh = nlmsg_put(skb, NETLINK_CB(cb->skb).portid, cb->nlh->nlmsg_seq,
1078 cb->nlh->nlmsg_type, sizeof(*t), 0);
1080 goto out_module_put;
1081 t = nlmsg_data(nlh);
1082 t->tca_family = AF_UNSPEC;
1086 nest = nla_nest_start(skb, TCA_ACT_TAB);
1088 goto out_module_put;
1090 ret = a_o->walk(skb, cb, RTM_GETACTION, &a);
1092 goto out_module_put;
1095 nla_nest_end(skb, nest);
1098 nla_nest_cancel(skb, nest);
1100 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
1101 if (NETLINK_CB(cb->skb).portid && ret)
1102 nlh->nlmsg_flags |= NLM_F_MULTI;
1103 module_put(a_o->owner);
1107 module_put(a_o->owner);
1112 static int __init tc_action_init(void)
1114 rtnl_register(PF_UNSPEC, RTM_NEWACTION, tc_ctl_action, NULL, NULL);
1115 rtnl_register(PF_UNSPEC, RTM_DELACTION, tc_ctl_action, NULL, NULL);
1116 rtnl_register(PF_UNSPEC, RTM_GETACTION, tc_ctl_action, tc_dump_action,
1122 subsys_initcall(tc_action_init);