From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from stargate.chelsio.com (stargate.chelsio.com [12.32.117.8]) by dpdk.org (Postfix) with ESMTP id 27A951B46C for ; Tue, 9 Oct 2018 14:39:39 +0200 (CEST) Received: from localhost (scalar.blr.asicdesigners.com [10.193.185.94]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id w99CdVXX022616; Tue, 9 Oct 2018 05:39:32 -0700 Date: Tue, 9 Oct 2018 18:09:17 +0530 From: Rahul Lakkireddy To: Ferruh Yigit Cc: "dev@dpdk.org" , Indranil Choudhury , Nirranjan Kirubaharan Message-ID: <20181009123915.GA16696@chelsio.com> References: <116b5edc-0fcf-8853-a1a3-e702b919f090@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <116b5edc-0fcf-8853-a1a3-e702b919f090@intel.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [PATCH v3 3/3] net/cxgbe: add flow actions to modify IP and TCP/UDP port address X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 09 Oct 2018 12:39:40 -0000 On Tuesday, October 10/09/18, 2018 at 17:55:09 +0530, Ferruh Yigit wrote: > On 10/9/2018 9:44 AM, Rahul Lakkireddy wrote: > > Query firmware for the new filter work request to offload flows with > > actions to modify IP and TCP/UDP port addresses. When available, > > translate IP and TCP/UDP port address modify actions to internal > > hardware specification and offload the flow to hardware. > > > > Original work by Shagun Agrawal > > > > Signed-off-by: Rahul Lakkireddy > > <...> > > > @@ -458,6 +611,16 @@ cxgbe_rtef_parse_actions(struct rte_flow *flow, > > case RTE_FLOW_ACTION_TYPE_OF_PUSH_VLAN: > > case RTE_FLOW_ACTION_TYPE_OF_POP_VLAN: > > case RTE_FLOW_ACTION_TYPE_PHY_PORT: > > + case RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC: > > + case RTE_FLOW_ACTION_TYPE_SET_IPV4_DST: > > + nat_ipv4++; > > + goto action_switch; > > + case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC: > > + case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST: > > + nat_ipv6++; > > + case RTE_FLOW_ACTION_TYPE_SET_TP_SRC: > > + case RTE_FLOW_ACTION_TYPE_SET_TP_DST: > > This is causing build error [1], fall through seems OK/intended, I will add [2] > while merging to clarify it. Please shout if you prefer another fix. > Yes, fall through is intended here. I'm fine with [2]. Thanks for fixing it. > [1] > .../drivers/net/cxgbe/cxgbe_flow.c: In function ‘cxgbe_rtef_parse_actions’: > .../drivers/net/cxgbe/cxgbe_flow.c:620:12: error: this statement may fall > through [-Werror=implicit-fallthrough=] > nat_ipv6++; > ~~~~~~~~^~ > .../drivers/net/cxgbe/cxgbe_flow.c:621:3: note: here > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC: > ^~~~ > > > [2] > diff --git a/drivers/net/cxgbe/cxgbe_flow.c b/drivers/net/cxgbe/cxgbe_flow.c > index 52cb3bdf4..3e4acf333 100644 > --- a/drivers/net/cxgbe/cxgbe_flow.c > +++ b/drivers/net/cxgbe/cxgbe_flow.c > @@ -618,6 +618,7 @@ cxgbe_rtef_parse_actions(struct rte_flow *flow, > case RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC: > case RTE_FLOW_ACTION_TYPE_SET_IPV6_DST: > nat_ipv6++; > + goto action_switch; > case RTE_FLOW_ACTION_TYPE_SET_TP_SRC: > case RTE_FLOW_ACTION_TYPE_SET_TP_DST: > action_switch: Thanks, Rahul