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 70E1F326C for ; Wed, 19 Sep 2018 17:14:44 +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 w8JFEK2g021140; Wed, 19 Sep 2018 08:14:21 -0700 Date: Wed, 19 Sep 2018 20:44:14 +0530 From: Rahul Lakkireddy To: Xiaoyu Min Cc: "dev@dpdk.org" , Shagun Agarwal , Nirranjan Kirubaharan , Indranil Choudhury Message-ID: <20180919151412.GA6366@chelsio.com> References: <20180918075606.edfevp3iuibozmsu@MTBC-JACKMIN.mtl.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180918075606.edfevp3iuibozmsu@MTBC-JACKMIN.mtl.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [RFC v2 1/3] ethdev: add flow api actions to modify IP addresses 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: Wed, 19 Sep 2018 15:14:44 -0000 On Tuesday, September 09/18/18, 2018 at 13:26:06 +0530, Xiaoyu Min wrote: > > > > static int > > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h > > index f8ba71cdb..48c3c606e 100644 > > --- a/lib/librte_ethdev/rte_flow.h > > +++ b/lib/librte_ethdev/rte_flow.h > > @@ -1505,6 +1505,34 @@ enum rte_flow_action_type { > > * error. > > */ > > RTE_FLOW_ACTION_TYPE_NVGRE_DECAP, > > + > > + /** > > + * Modify IPv4 source address > > + * > > + * See struct rte_flow_action_set_ipv4. > > + */ > > + RTE_FLOW_ACTION_TYPE_SET_IPV4_SRC, > > + > > + /** > > + * Modify IPv4 destination address > > + * > > + * See struct rte_flow_action_set_ipv4. > > + */ > > + RTE_FLOW_ACTION_TYPE_SET_IPV4_DST, > > + > > + /** > > + * Modify IPv6 source address > > + * > > + * See struct rte_flow_action_set_ipv6. > > + */ > > + RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC, > > + > > + /** > > + * Modify IPv6 destination address > > + * > > + * See struct rte_flow_action_set_ipv6. > > + */ > > + RTE_FLOW_ACTION_TYPE_SET_IPV6_DST, > > }; > Hey Rahul, > > Sorry for the late response. Just a small comment: > > We would need the corresponding RTE_FLOW_ITEM_TYPE_* specified in pattern. > i.e RTE_FLOW_ITEM_TYPE_IPV6 must be in pattern for action RTE_FLOW_ACTION_TYPE_SET_IPV6_SRC > otherwise RTE_FLOW_ERROR_TYPE_ACTION return. > Would be better to document this in comments and __rte_flow.rst__ > > What do you think? > Ok. Will update the comment and doc. Thanks, Rahul