From mboxrd@z Thu Jan 1 00:00:00 1970 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) X-Virus-Scanned: Proofpoint Essentials engine Received: from webmail.solarflare.com (uk.solarflare.com [193.34.186.16]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 1EC9440018C; Wed, 11 Apr 2018 13:02:18 +0000 (UTC) Received: from [192.168.38.17] (84.52.114.114) by ukex01.SolarFlarecom.com (10.17.10.4) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Wed, 11 Apr 2018 14:02:12 +0100 To: Adrien Mazarguil , Thomas Monjalon , Ferruh Yigit , CC: "Zhang, Qi Z" , Declan Doherty References: <20180406131736.19145-1-adrien.mazarguil@6wind.com> <20180410162022.9101-1-adrien.mazarguil@6wind.com> <20180410162022.9101-17-adrien.mazarguil@6wind.com> From: Andrew Rybchenko Message-ID: Date: Wed, 11 Apr 2018 16:02:08 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <20180410162022.9101-17-adrien.mazarguil@6wind.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-GB X-Originating-IP: [84.52.114.114] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ukex01.SolarFlarecom.com (10.17.10.4) X-TM-AS-Product-Ver: SMEX-11.0.0.1191-8.100.1062-23776.003 X-TM-AS-Result: No--13.246300-0.000000-31 X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-MDID: 1523451738-se5la+JSI1nV Subject: Re: [dpdk-dev] [PATCH v3 16/16] ethdev: add port ID item and action to flow API 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, 11 Apr 2018 13:02:20 -0000 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