[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160306085418.GA3246@office.Home>
Date: Sun, 6 Mar 2016 10:54:18 +0200
From: Amir Vadai <amir@...ai.me>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Linux Kernel Network Developers <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 V2 03/10] net/sched: Macro instead of
CONFIG_NET_CLS_ACT ifdef
On Fri, Mar 04, 2016 at 10:20:18AM -0800, Cong Wang wrote:
> On Thu, Mar 3, 2016 at 11:51 AM, Amir Vadai <amir@...ai.me> wrote:
> > On Thu, Mar 03, 2016 at 09:45:28AM -0800, Cong Wang wrote:
> >>
> >> So why?
> > The struct will not be used, and without exposing it, the compiler will
> > complain on code like I have in patch 9/10 ("net/mlx5e: Support offload
> > cls_flower with drop action"):
> >
> > static int parse_tc_actions(struct mlx5e_priv *priv, struct tcf_exts *exts,
> > u32 *action, u32 *flow_tag)
>
> Why not make this a nop when CONFIG_NET_CLS_ACT is not set?
In V0 I did make it a nop. Jiri has suggested [1] that I will replace
the ifdefs with the macro's tc_for_each_action and is_tcf_gact_shot. And
I do think it looks more elegant.
Why do you think it is a problem to expose truct tc_action?
Thanks for your review,
Amir
[1] - https://patchwork.ozlabs.org/patch/590550/
Powered by blists - more mailing lists