From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Rybchenko Subject: Re: [PATCH v3 16/16] ethdev: add port ID item and action to flow API Date: Wed, 11 Apr 2018 16:02:08 +0300 Message-ID: References: <20180406131736.19145-1-adrien.mazarguil@6wind.com> <20180410162022.9101-1-adrien.mazarguil@6wind.com> <20180410162022.9101-17-adrien.mazarguil@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Cc: "Zhang, Qi Z" , Declan Doherty To: Adrien Mazarguil , Thomas Monjalon , Ferruh Yigit , Return-path: Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id A01DE1B770 for ; Wed, 11 Apr 2018 15:02:19 +0200 (CEST) In-Reply-To: <20180410162022.9101-17-adrien.mazarguil@6wind.com> Content-Language: en-GB 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 04/10/2018 07:37 PM, Adrien Mazarguil wrote: > RTE_FLOW_ACTION_TYPE_PORT_ID brings the ability to inject matching traffic > into a different device, as identified by its DPDK port ID. > > This is normally only supported when the target port ID has some kind of > relationship with the port ID the flow rule is created against, such as > being exposed by a common physical device (e.g. a different port of an > Ethernet switch). > > The converse pattern item, RTE_FLOW_ITEM_TYPE_PORT_ID, makes the resulting > flow rule match traffic whose origin is the specified port ID. Note that > specifying a port ID that differs from the one the flow rule is created > against is normally meaningless (if even accepted), but can make sense if > combined with the transfer attribute. > > These must not be confused with their PHY_PORT counterparts, which refer to > physical ports using device-specific indices, but unlike PORT_ID are not > necessarily tied to DPDK port IDs. > > This breaks ABI compatibility for the following public functions: > > - rte_flow_copy() > - rte_flow_create() > - rte_flow_query() > - rte_flow_validate() > > Signed-off-by: Adrien Mazarguil > Reviewed-by: Qi Zhang > Cc: "Zhang, Qi Z" > Cc: Declan Doherty > > --- > > This patch provides the same functionality and supersedes Qi Zhang's > "ether: add flow action to redirect packet to a port" [1]. > > The main differences are: > > - Action is named PORT_ID instead of PORT. > - Addition of a PORT_ID pattern item. > - More extensive documentation. > - Testpmd support. > - rte_flow_copy() support. > > [1] http://dpdk.org/ml/archives/dev/2018-April/094648.html > --- > app/test-pmd/cmdline_flow.c | 57 ++++++++++++++++++++++++ > app/test-pmd/config.c | 2 + > doc/guides/prog_guide/rte_flow.rst | 48 ++++++++++++++++++++ > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 9 ++++ > lib/librte_ether/rte_flow.c | 2 + > lib/librte_ether/rte_flow.h | 56 +++++++++++++++++++++++ > 6 files changed, 174 insertions(+) Acked-by: Andrew Rybchenko