diff options
Diffstat (limited to 'include/net/act_api.h')
-rw-r--r-- | include/net/act_api.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/include/net/act_api.h b/include/net/act_api.h index 41e6a24a44b9..82f3c912a5b1 100644 --- a/include/net/act_api.h +++ b/include/net/act_api.h | |||
@@ -176,8 +176,8 @@ int tcf_register_action(struct tc_action_ops *a, struct pernet_operations *ops); | |||
176 | int tcf_unregister_action(struct tc_action_ops *a, | 176 | int tcf_unregister_action(struct tc_action_ops *a, |
177 | struct pernet_operations *ops); | 177 | struct pernet_operations *ops); |
178 | int tcf_action_destroy(struct list_head *actions, int bind); | 178 | int tcf_action_destroy(struct list_head *actions, int bind); |
179 | int tcf_action_exec(struct sk_buff *skb, const struct list_head *actions, | 179 | int tcf_action_exec(struct sk_buff *skb, struct tc_action **actions, |
180 | struct tcf_result *res); | 180 | int nr_actions, struct tcf_result *res); |
181 | int tcf_action_init(struct net *net, struct nlattr *nla, | 181 | int tcf_action_init(struct net *net, struct nlattr *nla, |
182 | struct nlattr *est, char *n, int ovr, | 182 | struct nlattr *est, char *n, int ovr, |
183 | int bind, struct list_head *); | 183 | int bind, struct list_head *); |
@@ -189,30 +189,17 @@ int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int); | |||
189 | int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); | 189 | int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int); |
190 | int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int); | 190 | int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int); |
191 | 191 | ||
192 | #define tc_no_actions(_exts) \ | 192 | #endif /* CONFIG_NET_CLS_ACT */ |
193 | (list_empty(&(_exts)->actions)) | ||
194 | |||
195 | #define tc_for_each_action(_a, _exts) \ | ||
196 | list_for_each_entry(a, &(_exts)->actions, list) | ||
197 | |||
198 | #define tc_single_action(_exts) \ | ||
199 | (list_is_singular(&(_exts)->actions)) | ||
200 | 193 | ||
201 | static inline void tcf_action_stats_update(struct tc_action *a, u64 bytes, | 194 | static inline void tcf_action_stats_update(struct tc_action *a, u64 bytes, |
202 | u64 packets, u64 lastuse) | 195 | u64 packets, u64 lastuse) |
203 | { | 196 | { |
197 | #ifdef CONFIG_NET_CLS_ACT | ||
204 | if (!a->ops->stats_update) | 198 | if (!a->ops->stats_update) |
205 | return; | 199 | return; |
206 | 200 | ||
207 | a->ops->stats_update(a, bytes, packets, lastuse); | 201 | a->ops->stats_update(a, bytes, packets, lastuse); |
202 | #endif | ||
208 | } | 203 | } |
209 | 204 | ||
210 | #else /* CONFIG_NET_CLS_ACT */ | ||
211 | |||
212 | #define tc_no_actions(_exts) true | ||
213 | #define tc_for_each_action(_a, _exts) while ((void)(_a), 0) | ||
214 | #define tc_single_action(_exts) false | ||
215 | #define tcf_action_stats_update(a, bytes, packets, lastuse) | ||
216 | |||
217 | #endif /* CONFIG_NET_CLS_ACT */ | ||
218 | #endif | 205 | #endif |