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/skbuff.h>
19 #include <linux/init.h>
20 #include <linux/kmod.h>
21 #include <linux/err.h>
22 #include <net/net_namespace.h>
24 #include <net/sch_generic.h>
25 #include <net/act_api.h>
26 #include <net/netlink.h>
28 void tcf_hash_destroy(struct tcf_common *p, struct tcf_hashinfo *hinfo)
30 unsigned int h = tcf_hash(p->tcfc_index, hinfo->hmask);
31 struct tcf_common **p1p;
33 for (p1p = &hinfo->htab[h]; *p1p; p1p = &(*p1p)->tcfc_next) {
35 write_lock_bh(hinfo->lock);
37 write_unlock_bh(hinfo->lock);
38 gen_kill_estimator(&p->tcfc_bstats,
46 EXPORT_SYMBOL(tcf_hash_destroy);
48 int tcf_hash_release(struct tcf_common *p, int bind,
49 struct tcf_hashinfo *hinfo)
58 if (p->tcfc_bindcnt <= 0 && p->tcfc_refcnt <= 0) {
59 tcf_hash_destroy(p, hinfo);
65 EXPORT_SYMBOL(tcf_hash_release);
67 static int tcf_dump_walker(struct sk_buff *skb, struct netlink_callback *cb,
68 struct tc_action *a, struct tcf_hashinfo *hinfo)
71 int err = 0, index = -1,i = 0, s_i = 0, n_i = 0;
74 read_lock_bh(hinfo->lock);
78 for (i = 0; i < (hinfo->hmask + 1); i++) {
79 p = hinfo->htab[tcf_hash(i, hinfo->hmask)];
81 for (; p; p = p->tcfc_next) {
87 r = (struct nlattr *)skb_tail_pointer(skb);
88 NLA_PUT(skb, a->order, 0, NULL);
89 err = tcf_action_dump_1(skb, a, 0, 0);
95 r->nla_len = skb_tail_pointer(skb) - (u8 *)r;
97 if (n_i >= TCA_ACT_MAX_PRIO)
102 read_unlock_bh(hinfo->lock);
112 static int tcf_del_walker(struct sk_buff *skb, struct tc_action *a,
113 struct tcf_hashinfo *hinfo)
115 struct tcf_common *p, *s_p;
119 r = (struct nlattr *)skb_tail_pointer(skb);
120 NLA_PUT(skb, a->order, 0, NULL);
121 NLA_PUT(skb, TCA_KIND, IFNAMSIZ, a->ops->kind);
122 for (i = 0; i < (hinfo->hmask + 1); i++) {
123 p = hinfo->htab[tcf_hash(i, hinfo->hmask)];
127 if (ACT_P_DELETED == tcf_hash_release(p, 0, hinfo))
128 module_put(a->ops->owner);
133 NLA_PUT(skb, TCA_FCNT, 4, &n_i);
134 r->nla_len = skb_tail_pointer(skb) - (u8 *)r;
142 int tcf_generic_walker(struct sk_buff *skb, struct netlink_callback *cb,
143 int type, struct tc_action *a)
145 struct tcf_hashinfo *hinfo = a->ops->hinfo;
147 if (type == RTM_DELACTION) {
148 return tcf_del_walker(skb, a, hinfo);
149 } else if (type == RTM_GETACTION) {
150 return tcf_dump_walker(skb, cb, a, hinfo);
152 printk("tcf_generic_walker: unknown action %d\n", type);
156 EXPORT_SYMBOL(tcf_generic_walker);
158 struct tcf_common *tcf_hash_lookup(u32 index, struct tcf_hashinfo *hinfo)
160 struct tcf_common *p;
162 read_lock_bh(hinfo->lock);
163 for (p = hinfo->htab[tcf_hash(index, hinfo->hmask)]; p;
165 if (p->tcfc_index == index)
168 read_unlock_bh(hinfo->lock);
172 EXPORT_SYMBOL(tcf_hash_lookup);
174 u32 tcf_hash_new_index(u32 *idx_gen, struct tcf_hashinfo *hinfo)
181 } while (tcf_hash_lookup(val, hinfo));
183 return (*idx_gen = val);
185 EXPORT_SYMBOL(tcf_hash_new_index);
187 int tcf_hash_search(struct tc_action *a, u32 index)
189 struct tcf_hashinfo *hinfo = a->ops->hinfo;
190 struct tcf_common *p = tcf_hash_lookup(index, hinfo);
198 EXPORT_SYMBOL(tcf_hash_search);
200 struct tcf_common *tcf_hash_check(u32 index, struct tc_action *a, int bind,
201 struct tcf_hashinfo *hinfo)
203 struct tcf_common *p = NULL;
204 if (index && (p = tcf_hash_lookup(index, hinfo)) != NULL) {
213 EXPORT_SYMBOL(tcf_hash_check);
215 struct tcf_common *tcf_hash_create(u32 index, struct nlattr *est, struct tc_action *a, int size, int bind, u32 *idx_gen, struct tcf_hashinfo *hinfo)
217 struct tcf_common *p = kzalloc(size, GFP_KERNEL);
225 spin_lock_init(&p->tcfc_lock);
226 p->tcfc_index = index ? index : tcf_hash_new_index(idx_gen, hinfo);
227 p->tcfc_tm.install = jiffies;
228 p->tcfc_tm.lastuse = jiffies;
230 gen_new_estimator(&p->tcfc_bstats, &p->tcfc_rate_est,
232 a->priv = (void *) p;
235 EXPORT_SYMBOL(tcf_hash_create);
237 void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo)
239 unsigned int h = tcf_hash(p->tcfc_index, hinfo->hmask);
241 write_lock_bh(hinfo->lock);
242 p->tcfc_next = hinfo->htab[h];
244 write_unlock_bh(hinfo->lock);
246 EXPORT_SYMBOL(tcf_hash_insert);
248 static struct tc_action_ops *act_base = NULL;
249 static DEFINE_RWLOCK(act_mod_lock);
251 int tcf_register_action(struct tc_action_ops *act)
253 struct tc_action_ops *a, **ap;
255 write_lock(&act_mod_lock);
256 for (ap = &act_base; (a = *ap) != NULL; ap = &a->next) {
257 if (act->type == a->type || (strcmp(act->kind, a->kind) == 0)) {
258 write_unlock(&act_mod_lock);
264 write_unlock(&act_mod_lock);
267 EXPORT_SYMBOL(tcf_register_action);
269 int tcf_unregister_action(struct tc_action_ops *act)
271 struct tc_action_ops *a, **ap;
274 write_lock(&act_mod_lock);
275 for (ap = &act_base; (a = *ap) != NULL; ap = &a->next)
283 write_unlock(&act_mod_lock);
286 EXPORT_SYMBOL(tcf_unregister_action);
289 static struct tc_action_ops *tc_lookup_action_n(char *kind)
291 struct tc_action_ops *a = NULL;
294 read_lock(&act_mod_lock);
295 for (a = act_base; a; a = a->next) {
296 if (strcmp(kind, a->kind) == 0) {
297 if (!try_module_get(a->owner)) {
298 read_unlock(&act_mod_lock);
304 read_unlock(&act_mod_lock);
309 /* lookup by nlattr */
310 static struct tc_action_ops *tc_lookup_action(struct nlattr *kind)
312 struct tc_action_ops *a = NULL;
315 read_lock(&act_mod_lock);
316 for (a = act_base; a; a = a->next) {
317 if (nla_strcmp(kind, a->kind) == 0) {
318 if (!try_module_get(a->owner)) {
319 read_unlock(&act_mod_lock);
325 read_unlock(&act_mod_lock);
332 static struct tc_action_ops *tc_lookup_action_id(u32 type)
334 struct tc_action_ops *a = NULL;
337 read_lock(&act_mod_lock);
338 for (a = act_base; a; a = a->next) {
339 if (a->type == type) {
340 if (!try_module_get(a->owner)) {
341 read_unlock(&act_mod_lock);
347 read_unlock(&act_mod_lock);
353 int tcf_action_exec(struct sk_buff *skb, struct tc_action *act,
354 struct tcf_result *res)
359 if (skb->tc_verd & TC_NCLS) {
360 skb->tc_verd = CLR_TC_NCLS(skb->tc_verd);
364 while ((a = act) != NULL) {
366 if (a->ops && a->ops->act) {
367 ret = a->ops->act(skb, a, res);
368 if (TC_MUNGED & skb->tc_verd) {
369 /* copied already, allow trampling */
370 skb->tc_verd = SET_TC_OK2MUNGE(skb->tc_verd);
371 skb->tc_verd = CLR_TC_MUNGED(skb->tc_verd);
373 if (ret == TC_ACT_REPEAT)
374 goto repeat; /* we need a ttl - JHS */
375 if (ret != TC_ACT_PIPE)
383 EXPORT_SYMBOL(tcf_action_exec);
385 void tcf_action_destroy(struct tc_action *act, int bind)
389 for (a = act; a; a = act) {
390 if (a->ops && a->ops->cleanup) {
391 if (a->ops->cleanup(a, bind) == ACT_P_DELETED)
392 module_put(a->ops->owner);
395 } else { /*FIXME: Remove later - catch insertion bugs*/
396 printk("tcf_action_destroy: BUG? destroying NULL ops\n");
404 tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
408 if (a->ops == NULL || a->ops->dump == NULL)
410 return a->ops->dump(skb, a, bind, ref);
414 tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int bind, int ref)
417 unsigned char *b = skb_tail_pointer(skb);
420 if (a->ops == NULL || a->ops->dump == NULL)
423 NLA_PUT(skb, TCA_KIND, IFNAMSIZ, a->ops->kind);
424 if (tcf_action_copy_stats(skb, a, 0))
425 goto nla_put_failure;
426 r = (struct nlattr *)skb_tail_pointer(skb);
427 NLA_PUT(skb, TCA_OPTIONS, 0, NULL);
428 if ((err = tcf_action_dump_old(skb, a, bind, ref)) > 0) {
429 r->nla_len = skb_tail_pointer(skb) - (u8 *)r;
437 EXPORT_SYMBOL(tcf_action_dump_1);
440 tcf_action_dump(struct sk_buff *skb, struct tc_action *act, int bind, int ref)
444 unsigned char *b = skb_tail_pointer(skb);
447 while ((a = act) != NULL) {
448 r = (struct nlattr *)skb_tail_pointer(skb);
450 NLA_PUT(skb, a->order, 0, NULL);
451 err = tcf_action_dump_1(skb, a, bind, ref);
454 r->nla_len = skb_tail_pointer(skb) - (u8 *)r;
466 struct tc_action *tcf_action_init_1(struct nlattr *nla, struct nlattr *est,
467 char *name, int ovr, int bind)
470 struct tc_action_ops *a_o;
471 char act_name[IFNAMSIZ];
472 struct nlattr *tb[TCA_ACT_MAX+1];
479 if (nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL) < 0)
481 kind = tb[TCA_ACT_KIND];
484 if (nla_strlcpy(act_name, kind, IFNAMSIZ) >= IFNAMSIZ)
487 if (strlcpy(act_name, name, IFNAMSIZ) >= IFNAMSIZ)
491 a_o = tc_lookup_action_n(act_name);
495 request_module("act_%s", act_name);
498 a_o = tc_lookup_action_n(act_name);
500 /* We dropped the RTNL semaphore in order to
501 * perform the module load. So, even if we
502 * succeeded in loading the module we have to
503 * tell the caller to replay the request. We
504 * indicate this using -EAGAIN.
516 a = kzalloc(sizeof(*a), GFP_KERNEL);
520 /* backward compatibility for policer */
522 err = a_o->init(tb[TCA_ACT_OPTIONS], est, a, ovr, bind);
524 err = a_o->init(nla, est, a, ovr, bind);
528 /* module count goes up only when brand new policy is created
529 if it exists and is only bound to in a_o->init() then
530 ACT_P_CREATED is not returned (a zero is).
532 if (err != ACT_P_CREATED)
533 module_put(a_o->owner);
541 module_put(a_o->owner);
546 struct tc_action *tcf_action_init(struct nlattr *nla, struct nlattr *est,
547 char *name, int ovr, int bind)
549 struct nlattr *tb[TCA_ACT_MAX_PRIO+1];
550 struct tc_action *head = NULL, *act, *act_prev = NULL;
553 if (nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL) < 0)
554 return ERR_PTR(-EINVAL);
556 for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) {
557 act = tcf_action_init_1(tb[i], est, name, ovr, bind);
565 act_prev->next = act;
572 tcf_action_destroy(head, bind);
576 int tcf_action_copy_stats(struct sk_buff *skb, struct tc_action *a,
581 struct tcf_act_hdr *h = a->priv;
586 /* compat_mode being true specifies a call that is supposed
587 * to add additional backward compatiblity statistic TLVs.
590 if (a->type == TCA_OLD_COMPAT)
591 err = gnet_stats_start_copy_compat(skb, 0,
592 TCA_STATS, TCA_XSTATS, &h->tcf_lock, &d);
596 err = gnet_stats_start_copy(skb, TCA_ACT_STATS,
602 if (a->ops != NULL && a->ops->get_stats != NULL)
603 if (a->ops->get_stats(skb, a) < 0)
606 if (gnet_stats_copy_basic(&d, &h->tcf_bstats) < 0 ||
607 gnet_stats_copy_rate_est(&d, &h->tcf_rate_est) < 0 ||
608 gnet_stats_copy_queue(&d, &h->tcf_qstats) < 0)
611 if (gnet_stats_finish_copy(&d) < 0)
621 tca_get_fill(struct sk_buff *skb, struct tc_action *a, u32 pid, u32 seq,
622 u16 flags, int event, int bind, int ref)
625 struct nlmsghdr *nlh;
626 unsigned char *b = skb_tail_pointer(skb);
629 nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags);
632 t->tca_family = AF_UNSPEC;
636 x = (struct nlattr *)skb_tail_pointer(skb);
637 NLA_PUT(skb, TCA_ACT_TAB, 0, NULL);
639 if (tcf_action_dump(skb, a, bind, ref) < 0)
640 goto nla_put_failure;
642 x->nla_len = skb_tail_pointer(skb) - (u8 *)x;
644 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
654 act_get_notify(u32 pid, struct nlmsghdr *n, struct tc_action *a, int event)
658 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
661 if (tca_get_fill(skb, a, pid, n->nlmsg_seq, 0, event, 0, 0) <= 0) {
666 return rtnl_unicast(skb, &init_net, pid);
669 static struct tc_action *
670 tcf_action_get_1(struct nlattr *nla, struct nlmsghdr *n, u32 pid)
672 struct nlattr *tb[TCA_ACT_MAX+1];
678 if (nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL) < 0)
681 if (tb[TCA_ACT_INDEX] == NULL ||
682 nla_len(tb[TCA_ACT_INDEX]) < sizeof(index))
684 index = *(int *)nla_data(tb[TCA_ACT_INDEX]);
687 a = kzalloc(sizeof(struct tc_action), GFP_KERNEL);
692 a->ops = tc_lookup_action(tb[TCA_ACT_KIND]);
695 if (a->ops->lookup == NULL)
698 if (a->ops->lookup(a, index) == 0)
701 module_put(a->ops->owner);
705 module_put(a->ops->owner);
712 static void cleanup_a(struct tc_action *act)
716 for (a = act; a; a = act) {
722 static struct tc_action *create_a(int i)
724 struct tc_action *act;
726 act = kzalloc(sizeof(*act), GFP_KERNEL);
728 printk("create_a: failed to alloc!\n");
735 static int tca_action_flush(struct nlattr *nla, struct nlmsghdr *n, u32 pid)
739 struct nlmsghdr *nlh;
741 struct netlink_callback dcb;
743 struct nlattr *tb[TCA_ACT_MAX+1];
745 struct tc_action *a = create_a(0);
749 printk("tca_action_flush: couldnt create tc_action\n");
753 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
755 printk("tca_action_flush: failed skb alloc\n");
760 b = skb_tail_pointer(skb);
762 if (nla_parse_nested(tb, TCA_ACT_MAX, nla, NULL) < 0)
765 kind = tb[TCA_ACT_KIND];
766 a->ops = tc_lookup_action(kind);
770 nlh = NLMSG_PUT(skb, pid, n->nlmsg_seq, RTM_DELACTION, sizeof(*t));
772 t->tca_family = AF_UNSPEC;
776 x = (struct nlattr *)skb_tail_pointer(skb);
777 NLA_PUT(skb, TCA_ACT_TAB, 0, NULL);
779 err = a->ops->walk(skb, &dcb, RTM_DELACTION, a);
781 goto nla_put_failure;
783 x->nla_len = skb_tail_pointer(skb) - (u8 *)x;
785 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
786 nlh->nlmsg_flags |= NLM_F_ROOT;
787 module_put(a->ops->owner);
789 err = rtnetlink_send(skb, &init_net, pid, RTNLGRP_TC, n->nlmsg_flags&NLM_F_ECHO);
797 module_put(a->ops->owner);
805 tca_action_gd(struct nlattr *nla, struct nlmsghdr *n, u32 pid, int event)
808 struct nlattr *tb[TCA_ACT_MAX_PRIO+1];
809 struct tc_action *head = NULL, *act, *act_prev = NULL;
811 if (nla_parse_nested(tb, TCA_ACT_MAX_PRIO, nla, NULL) < 0)
814 if (event == RTM_DELACTION && n->nlmsg_flags&NLM_F_ROOT) {
815 if (tb[0] != NULL && tb[1] == NULL)
816 return tca_action_flush(tb[0], n, pid);
819 for (i = 1; i <= TCA_ACT_MAX_PRIO && tb[i]; i++) {
820 act = tcf_action_get_1(tb[i], n, pid);
830 act_prev->next = act;
834 if (event == RTM_GETACTION)
835 ret = act_get_notify(pid, n, head, event);
839 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
845 if (tca_get_fill(skb, head, pid, n->nlmsg_seq, 0, event,
852 /* now do the delete */
853 tcf_action_destroy(head, 0);
854 ret = rtnetlink_send(skb, &init_net, pid, RTNLGRP_TC,
855 n->nlmsg_flags&NLM_F_ECHO);
865 static int tcf_add_notify(struct tc_action *a, u32 pid, u32 seq, int event,
869 struct nlmsghdr *nlh;
875 skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL);
879 b = skb_tail_pointer(skb);
881 nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*t), flags);
883 t->tca_family = AF_UNSPEC;
887 x = (struct nlattr *)skb_tail_pointer(skb);
888 NLA_PUT(skb, TCA_ACT_TAB, 0, NULL);
890 if (tcf_action_dump(skb, a, 0, 0) < 0)
891 goto nla_put_failure;
893 x->nla_len = skb_tail_pointer(skb) - (u8 *)x;
895 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
896 NETLINK_CB(skb).dst_group = RTNLGRP_TC;
898 err = rtnetlink_send(skb, &init_net, pid, RTNLGRP_TC, flags&NLM_F_ECHO);
911 tcf_action_add(struct nlattr *nla, struct nlmsghdr *n, u32 pid, int ovr)
914 struct tc_action *act;
916 u32 seq = n->nlmsg_seq;
918 act = tcf_action_init(nla, NULL, NULL, ovr, 0);
926 /* dump then free all the actions after update; inserted policy
929 ret = tcf_add_notify(act, pid, seq, RTM_NEWACTION, n->nlmsg_flags);
930 for (a = act; a; a = act) {
938 static int tc_ctl_action(struct sk_buff *skb, struct nlmsghdr *n, void *arg)
940 struct net *net = skb->sk->sk_net;
941 struct nlattr *tca[TCA_ACT_MAX + 1];
942 u32 pid = skb ? NETLINK_CB(skb).pid : 0;
943 int ret = 0, ovr = 0;
945 if (net != &init_net)
948 ret = nlmsg_parse(n, sizeof(struct tcamsg), tca, TCA_ACT_MAX, NULL);
952 if (tca[TCA_ACT_TAB] == NULL) {
953 printk("tc_ctl_action: received NO action attribs\n");
957 /* n->nlmsg_flags&NLM_F_CREATE
959 switch (n->nlmsg_type) {
961 /* we are going to assume all other flags
962 * imply create only if it doesnt exist
963 * Note that CREATE | EXCL implies that
964 * but since we want avoid ambiguity (eg when flags
965 * is zero) then just set this
967 if (n->nlmsg_flags&NLM_F_REPLACE)
970 ret = tcf_action_add(tca[TCA_ACT_TAB], n, pid, ovr);
975 ret = tca_action_gd(tca[TCA_ACT_TAB], n, pid, RTM_DELACTION);
978 ret = tca_action_gd(tca[TCA_ACT_TAB], n, pid, RTM_GETACTION);
987 static struct nlattr *
988 find_dump_kind(struct nlmsghdr *n)
990 struct nlattr *tb1, *tb2[TCA_ACT_MAX+1];
991 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1];
992 struct nlattr *nla[TCAA_MAX + 1];
995 if (nlmsg_parse(n, sizeof(struct tcamsg), nla, TCAA_MAX, NULL) < 0)
997 tb1 = nla[TCA_ACT_TAB];
1001 if (nla_parse(tb, TCA_ACT_MAX_PRIO, nla_data(tb1),
1002 NLMSG_ALIGN(nla_len(tb1)), NULL) < 0)
1007 if (nla_parse(tb2, TCA_ACT_MAX, nla_data(tb[1]),
1008 nla_len(tb[1]), NULL) < 0)
1010 kind = tb2[TCA_ACT_KIND];
1016 tc_dump_action(struct sk_buff *skb, struct netlink_callback *cb)
1018 struct net *net = skb->sk->sk_net;
1019 struct nlmsghdr *nlh;
1020 unsigned char *b = skb_tail_pointer(skb);
1022 struct tc_action_ops *a_o;
1025 struct tcamsg *t = (struct tcamsg *) NLMSG_DATA(cb->nlh);
1026 struct nlattr *kind = find_dump_kind(cb->nlh);
1028 if (net != &init_net)
1032 printk("tc_dump_action: action bad kind\n");
1036 a_o = tc_lookup_action(kind);
1041 memset(&a, 0, sizeof(struct tc_action));
1044 if (a_o->walk == NULL) {
1045 printk("tc_dump_action: %s !capable of dumping table\n", a_o->kind);
1046 goto nla_put_failure;
1049 nlh = NLMSG_PUT(skb, NETLINK_CB(cb->skb).pid, cb->nlh->nlmsg_seq,
1050 cb->nlh->nlmsg_type, sizeof(*t));
1051 t = NLMSG_DATA(nlh);
1052 t->tca_family = AF_UNSPEC;
1056 x = (struct nlattr *)skb_tail_pointer(skb);
1057 NLA_PUT(skb, TCA_ACT_TAB, 0, NULL);
1059 ret = a_o->walk(skb, cb, RTM_GETACTION, &a);
1061 goto nla_put_failure;
1064 x->nla_len = skb_tail_pointer(skb) - (u8 *)x;
1069 nlh->nlmsg_len = skb_tail_pointer(skb) - b;
1070 if (NETLINK_CB(cb->skb).pid && ret)
1071 nlh->nlmsg_flags |= NLM_F_MULTI;
1072 module_put(a_o->owner);
1077 module_put(a_o->owner);
1082 static int __init tc_action_init(void)
1084 rtnl_register(PF_UNSPEC, RTM_NEWACTION, tc_ctl_action, NULL);
1085 rtnl_register(PF_UNSPEC, RTM_DELACTION, tc_ctl_action, NULL);
1086 rtnl_register(PF_UNSPEC, RTM_GETACTION, tc_ctl_action, tc_dump_action);
1091 subsys_initcall(tc_action_init);