diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2013-12-15 23:15:05 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-18 12:52:07 -0500 |
commit | 33be627159913b094bb578e83e9a7fdc66c10208 (patch) | |
tree | 387945e9391082d0b78890b176111a53b8897bf3 /include/net/act_api.h | |
parent | d84231d3a2b20bea26327d9b83c8bd8ba55dc68c (diff) |
net_sched: act: use standard struct list_head
Currently actions are chained by a singly linked list,
therefore it is a bit hard to add and remove a specific
entry. Convert it to struct list_head so that in the
latter patch we can remove an action without finding
its head.
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r-- | include/net/act_api.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index 04c6825e172b..a72642610790 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -60,7 +60,7 @@ struct tc_action { | |||
60 | const struct tc_action_ops *ops; | 60 | const struct tc_action_ops *ops; |
61 | __u32 type; /* for backward compat(TCA_OLD_COMPAT) */ | 61 | __u32 type; /* for backward compat(TCA_OLD_COMPAT) */ |
62 | __u32 order; | 62 | __u32 order; |
63 | struct tc_action *next; | 63 | struct list_head list; |
64 | }; | 64 | }; |
65 | 65 | ||
66 | #define TCA_CAP_NONE 0 | 66 | #define TCA_CAP_NONE 0 |
@@ -99,16 +99,16 @@ void tcf_hash_insert(struct tcf_common *p, struct tcf_hashinfo *hinfo); | |||
99 | 99 | ||
100 | int tcf_register_action(struct tc_action_ops *a); | 100 | int tcf_register_action(struct tc_action_ops *a); |
101 | int tcf_unregister_action(struct tc_action_ops *a); | 101 | int tcf_unregister_action(struct tc_action_ops *a); |
102 | void tcf_action_destroy(struct tc_action *a, int bind); | 102 | void tcf_action_destroy(struct list_head *actions, int bind); |
103 | int tcf_action_exec(struct sk_buff *skb, const struct tc_action *a, | 103 | int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions, |
104 | struct tcf_result *res); | 104 | struct tcf_result *res); |
105 | struct tc_action *tcf_action_init(struct net *net, struct nlattr *nla, | 105 | int tcf_action_init(struct net *net, struct nlattr *nla, |
106 | struct nlattr *est, char *n, int ovr, | 106 | struct nlattr *est, char *n, int ovr, |
107 | int bind); | 107 | int bind, struct list_head *); |
108 | struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla, | 108 | struct tc_action *tcf_action_init_1(struct net *net, struct nlattr *nla, |
109 | struct nlattr *est, char *n, int ovr, | 109 | struct nlattr *est, char *n, int ovr, |
110 | int bind); | 110 | int bind); |
111 | int tcf_action_dump(struct sk_buff *skb, struct tc_action *a, int, int); | 111 | int tcf_action_dump(struct sk_buff *skb, struct list_head *, int, int); |
112 | int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int); | 112 | int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int); |
113 | int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); | 113 | int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); |
114 | int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int); | 114 | int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int); |