From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiaoyu Min Subject: Re: [RFC v2 1/3] ethdev: add flow api actions to modify IP addresses Date: Tue, 18 Sep 2018 15:56:06 +0800 Message-ID: <20180918075606.edfevp3iuibozmsu@MTBC-JACKMIN.mtl.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org, shaguna@chelsio.com, nirranjan@chelsio.com, indranil@chelsio.com To: Rahul Lakkireddy Return-path: Received: from EUR04-VI1-obe.outbound.protection.outlook.com (mail-eopbgr80045.outbound.protection.outlook.com [40.107.8.45]) by dpdk.org (Postfix) with ESMTP id 842981559 for ; Tue, 18 Sep 2018 09:56:32 +0200 (CEST) Content-Disposition: inline In-Reply-To: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > > 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? -Jack