From mboxrd@z Thu Jan 1 00:00:00 1970 From: Amir Vadai Subject: Re: [PATCH net-next V2 03/10] net/sched: Macro instead of CONFIG_NET_CLS_ACT ifdef Date: Sun, 6 Mar 2016 10:54:18 +0200 Message-ID: <20160306085418.GA3246@office.Home> References: <1457016960-27832-1-git-send-email-amir@vadai.me> <1457016960-27832-4-git-send-email-amir@vadai.me> <20160303195141.GA15037@office.Home> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "David S. Miller" , Linux Kernel Network Developers , John Fastabend , Jiri Pirko , Or Gerlitz , Saeed Mahameed , Hadar Har-Zion , Rony Efraim To: Cong Wang Return-path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:34945 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbcCFIur (ORCPT ); Sun, 6 Mar 2016 03:50:47 -0500 Received: by mail-wm0-f65.google.com with SMTP id 1so5714909wmg.2 for ; Sun, 06 Mar 2016 00:50:47 -0800 (PST) Content-Disposition: inline In-Reply-To: Sender: netdev-owner@vger.kernel.org List-ID: On Fri, Mar 04, 2016 at 10:20:18AM -0800, Cong Wang wrote: > On Thu, Mar 3, 2016 at 11:51 AM, Amir Vadai 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/