From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rahul Lakkireddy Subject: Re: [RFC v2 1/3] ethdev: add flow api actions to modify IP addresses Date: Wed, 19 Sep 2018 20:44:14 +0530 Message-ID: <20180919151412.GA6366@chelsio.com> References: <20180918075606.edfevp3iuibozmsu@MTBC-JACKMIN.mtl.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" , Shagun Agarwal , Nirranjan Kirubaharan , Indranil Choudhury To: Xiaoyu Min 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) Content-Disposition: inline In-Reply-To: <20180918075606.edfevp3iuibozmsu@MTBC-JACKMIN.mtl.com> 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 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