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 4881B326C for ; Wed, 19 Sep 2018 17:16:28 +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 w8JFGLPm021153; Wed, 19 Sep 2018 08:16:26 -0700 Date: Wed, 19 Sep 2018 20:46:10 +0530 From: Rahul Lakkireddy To: Xiaoyu Min Cc: "dev@dpdk.org" Message-ID: <20180919151609.GB6366@chelsio.com> References: <88ca7476616ac1a339eb7c6494b93f627b335b93.1534166371.git.rahul.lakkireddy@chelsio.com> <20180918092910.igibtq2ahsllizx5@MTBC-JACKMIN.mtl.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180918092910.igibtq2ahsllizx5@MTBC-JACKMIN.mtl.com> User-Agent: Mutt/1.5.24 (2015-08-30) Subject: Re: [dpdk-dev] [RFC v2 2/3] ethdev: add flow api actions to modify TCP/UDP port numbers 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:16:28 -0000 On Tuesday, September 09/18/18, 2018 at 14:59:10 +0530, Xiaoyu Min wrote: > > > > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > index 638331c17..f60be0862 100644 > > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > > @@ -3713,6 +3713,14 @@ This section lists supported actions and their > > attributes, if any. > > > > - ``ipv6_addr``: New IPv6 destination address. > > > > +- ``of_set_tp_src``: Set a new TCP/UDP source port number. > should be set_tp_src :-) > > + > > + - ``port``: New TCP/UDP source port number. > > + > > +- ``of_set_tp_dst``: Set a new TCP/UDP destination port number. > set_tp_dst > > + - ``port``: New TCP/UDP destination port number. > > + > > Destroying flow rules > > ~~~~~~~~~~~~~~~~~~~~~ > > > > > > static int > > diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h > > index 48c3c606e..c80771b25 100644 > > --- a/lib/librte_ethdev/rte_flow.h > > +++ b/lib/librte_ethdev/rte_flow.h > > @@ -1533,6 +1533,20 @@ enum rte_flow_action_type { > > * See struct rte_flow_action_set_ipv6. > > */ > > RTE_FLOW_ACTION_TYPE_SET_IPV6_DST, > > + > > + /** > > + * Modify source port in TCP/UDP packets. > > + * > > + * See struct rte_flow_action_set_tp. > > + */ > > + RTE_FLOW_ACTION_TYPE_SET_TP_SRC, > > + > > + /** > > + * Modify destination port in TCP/UDP packets. > > + * > > + * See struct rte_flow_action_set_tp. > > + */ > > + RTE_FLOW_ACTION_TYPE_SET_TP_DST, > > }; > > > We need to state the corresponding RTE_FLOW_ITEM_TYPE_(UDP|TCP) should be in pattern > Ok. Will update the comment and doc. Thanks, Rahul