From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v3 3/3] net/cxgbe: add flow actions to modify IP and TCP/UDP port address Date: Tue, 9 Oct 2018 13:25:09 +0100 Message-ID: <116b5edc-0fcf-8853-a1a3-e702b919f090@intel.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: indranil@chelsio.com, nirranjan@chelsio.com To: Rahul Lakkireddy , dev@dpdk.org Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id A3B5A1B47B for ; Tue, 9 Oct 2018 14:25:38 +0200 (CEST) In-Reply-To: Content-Language: en-US List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. [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: