[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160303093807.GA2105@nanopsycho.orion>
Date: Thu, 3 Mar 2016 10:38:07 +0100
From: Jiri Pirko <jiri@...nulli.us>
To: Amir Vadai <amir@...ai.me>
Cc: "David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
John Fastabend <john.r.fastabend@...el.com>,
Jiri Pirko <jiri@...lanox.com>,
Or Gerlitz <ogerlitz@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>,
Hadar Har-Zion <hadarh@...lanox.com>,
Rony Efraim <ronye@...lanox.com>
Subject: Re: [PATCH net-next V1 03/10] net/sched: Macro instead of
CONFIG_NET_CLS_ACT ifdef
Thu, Mar 03, 2016 at 10:23:19AM CET, amir@...ai.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".
Powered by blists - more mailing lists