From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: Re: [PATCH v6 3/3] app/testpmd: add MPLSoGRE encapsulation Date: Tue, 23 Oct 2018 10:56:08 +0100 Message-ID: References: <1539796072-111646-1-git-send-email-orika@mellanox.com> <1540229891-112870-1-git-send-email-orika@mellanox.com> <1540229891-112870-4-git-send-email-orika@mellanox.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org, dekelp@mellanox.com, thomas@monjalon.net, nelio.laranjeiro@6wind.com, yskoh@mellanox.com, shahafs@mellanox.com To: Ori Kam , wenzhuo.lu@intel.com, jingjing.wu@intel.com, bernard.iremonger@intel.com, arybchenko@solarflare.com, stephen@networkplumber.org, adrien.mazarguil@6wind.com Return-path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id 863DC1B471 for ; Tue, 23 Oct 2018 11:56:13 +0200 (CEST) In-Reply-To: <1540229891-112870-4-git-send-email-orika@mellanox.com> Content-Language: en-US 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 10/22/2018 6:38 PM, Ori Kam wrote: > Example for MPLSoGRE tunnel: > ETH / IPV4 / GRE / MPLS / IP / L4..L7 > > In order to encapsulate such a tunnel there is a need to remove L2 of > the inner packet and encap the remaining tunnel, this is done by > applying 2 rte flow commands l2_decap followed by mplsogre_encap. > Both commands must appear in the same flow, and from the point of the > packet it both actions are applyed at the same time. (There is no part > where a packet doesn't have L2 header). > > Decapsulating such a tunnel works the other way, first we need to decap > the outer tunnel header and then apply the new L2. > So the commands will be mplsogre_decap / l2_encap > > Due to the complex encapsulation of MPLSoGRE flow action and > based on the fact testpmd does not allocate memory, this patch adds a > new command in testpmd to initialise a global structure containing the > necessary information to make the outer layer of the packet. This same > global structures will then be used by the flow commands in testpmd when > the action mplsogre_encap, mplsogre_decap, will be parsed, at this point, > the conversion into such action becomes trivial. > > Signed-off-by: Ori Kam Reviewed-by: Ferruh Yigit