From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH 01/10] flow_dissector: add flow_rule and flow_match structures and use them Date: Sat, 17 Nov 2018 20:32:21 -0800 (PST) Message-ID: <20181117.203221.139437189659619548.davem@davemloft.net> References: <20181116014139.25438-1-pablo@netfilter.org> <20181116014139.25438-2-pablo@netfilter.org> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, thomas.lendacky@amd.com, f.fainelli@gmail.com, ariel.elior@cavium.com, michael.chan@broadcom.com, santosh@chelsio.com, madalin.bucur@nxp.com, yisen.zhuang@huawei.com, salil.mehta@huawei.com, jeffrey.t.kirsher@intel.com, tariqt@mellanox.com, saeedm@mellanox.com, jiri@mellanox.com, idosch@mellanox.com, jakub.kicinski@netronome.com, peppe.cavallaro@st.com, grygorii.strashko@ti.com, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, alexandre.torgue@st.com, joabreu@synopsys.com, linux-net-drivers@solarflare.com, ganeshgr@chelsio.com To: pablo@netfilter.org Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:40746 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725864AbeKROvZ (ORCPT ); Sun, 18 Nov 2018 09:51:25 -0500 In-Reply-To: <20181116014139.25438-2-pablo@netfilter.org> Sender: netdev-owner@vger.kernel.org List-ID: From: Pablo Neira Ayuso Date: Fri, 16 Nov 2018 02:41:30 +0100 > static int bnxt_tc_parse_flow(struct bnxt *bp, > struct tc_cls_flower_offload *tc_flow_cmd, > struct bnxt_tc_flow *flow) > { > - struct flow_dissector *dissector = tc_flow_cmd->dissector; > + struct flow_rule *rule = &tc_flow_cmd->rule; > + struct flow_dissector *dissector = rule->match.dissector; This adds a reverse christmas tree violation. Please fix this up. > @@ -255,10 +224,12 @@ static void cxgb4_process_flow_match(struct net_device *dev, > static int cxgb4_validate_flow_match(struct net_device *dev, > struct tc_cls_flower_offload *cls) > { > + struct flow_rule *rule = &cls->rule; > + struct flow_dissector *dissector = rule->match.dissector; > u16 ethtype_mask = 0; > u16 ethtype_key = 0; Likewise. > diff --git a/drivers/net/ethernet/intel/i40e/i40e_main.c b/drivers/net/ethernet/intel/i40e/i40e_main.c > index 21c2688d6308..287cb8665bb3 100644 > --- a/drivers/net/ethernet/intel/i40e/i40e_main.c > +++ b/drivers/net/ethernet/intel/i40e/i40e_main.c > @@ -7166,11 +7166,13 @@ static int i40e_parse_cls_flower(struct i40e_vsi *vsi, > struct tc_cls_flower_offload *f, > struct i40e_cloud_filter *filter) > { > + struct flow_rule *rule = &f->rule; > + struct flow_dissector *dissector = rule->match.dissector; > u16 n_proto_mask = 0, n_proto_key = 0, addr_type = 0; > struct i40e_pf *pf = vsi->back; > u8 field_flags = 0; Likewise. And so on and so forth for your entire submission.