Thu, Mar 03, 2016 at 10:23:19AM CET, a...@vadai.me wrote:
>Introduce the macros tc_no_actions and tc_for_each_action to make code
>clearer.
>

<snip>

>@@ -171,5 +171,16 @@ int tcf_action_dump(struct sk_buff *skb, struct list_head 
>*, int, int);
> int tcf_action_dump_old(struct sk_buff *skb, struct tc_action *a, int, int);
> int tcf_action_dump_1(struct sk_buff *skb, struct tc_action *a, int, int);
> int tcf_action_copy_stats(struct sk_buff *, struct tc_action *, int);
>+
>+#define tc_no_actions(_exts) \
>+      (list_empty(&(_exts)->actions))
>+
>+#define tc_for_each_action(_a, _exts) \
>+      list_for_each_entry(a, &(_exts)->actions, list)
>+#else /* CONFIG_NET_CLS_ACT */
>+
>+#define tc_no_actions(_exts) false

This should be "true".

Reply via email to