From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 870F91B5AC for ; Tue, 26 Jun 2018 14:48:46 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2018 05:48:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,274,1526367600"; d="scan'208";a="52001473" Received: from irsmsx102.ger.corp.intel.com ([163.33.3.155]) by orsmga007.jf.intel.com with ESMTP; 26 Jun 2018 05:48:44 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.139]) by IRSMSX102.ger.corp.intel.com ([169.254.2.146]) with mapi id 14.03.0319.002; Tue, 26 Jun 2018 13:48:43 +0100 From: "Iremonger, Bernard" To: Nelio Laranjeiro , "dev@dpdk.org" , Adrien Mazarguil , "Lu, Wenzhuo" , "Wu, Jingjing" , "Awal, Mohammad Abdul" , Ori Kam , Stephen Hemminger Thread-Topic: [PATCH v4 2/2] app/testpmd: add NVGRE encap/decap support Thread-Index: AQHUCS93taLPOBTr90eYcFKTebSByqRyhF/Q Date: Tue, 26 Jun 2018 12:48:42 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260CB8D2E@IRSMSX108.ger.corp.intel.com> References: In-Reply-To: Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTZmM2VkMjYtZWNmNC00NTZiLWI1MjQtNWRhYzY4NDU2YzgxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNEk4SUlnaHdqc0tUNnBZM1o1RThYaFR6Z2thOXhCWER5d1l3dnpYc3pPcmY0VW5rcnc5XC9hZDQ0U0xmWUVmUWwifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.181] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v4 2/2] app/testpmd: add NVGRE encap/decap support 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: Tue, 26 Jun 2018 12:48:48 -0000 Hi Nelio, > -----Original Message----- > From: Nelio Laranjeiro [mailto:nelio.laranjeiro@6wind.com] > Sent: Thursday, June 21, 2018 8:14 AM > To: dev@dpdk.org; Adrien Mazarguil ; Lu, > Wenzhuo ; Wu, Jingjing ; > Iremonger, Bernard ; Awal, Mohammad Abdul > ; Ori Kam ; > Stephen Hemminger > Subject: [PATCH v4 2/2] app/testpmd: add NVGRE encap/decap support >=20 > Due to the complex NVGRE_ENCAP 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 mak= e the > outer layer of the packet. This same global structure will then be used = by the > flow command line in testpmd when the action nvgre_encap will be parsed, = at > this point, the conversion into such action becomes trivial. >=20 > This global structure is only used for the encap action. >=20 > Signed-off-by: Nelio Laranjeiro > --- > app/test-pmd/cmdline.c | 118 ++++++++++++++++++ > app/test-pmd/cmdline_flow.c | 129 ++++++++++++++++++++ > app/test-pmd/testpmd.c | 15 +++ > app/test-pmd/testpmd.h | 15 +++ > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 37 ++++++ > 5 files changed, 314 insertions(+) > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 2743043d3..17e0fef63 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -1542,6 +1542,14 @@ Configure the outer layer to encapsulate a packet > inside a VXLAN tunnel:: > testpmd> set vxlan ipv4|ipv6 (vni) (udp-src) (udp-dst) (ip-src) (ip-dst= ) (mac-src) > (mac-dst) > testpmd> set vxlan-with-vlan ipv4|ipv6 (vni) (udp-src) (udp-dst) (ip-sr= c) (ip-dst) > (vlan-tci) (mac-src) (mac-dst) >=20 > +Config NVGRE Encap outer layers > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +Configure the outer layer to encapsulate a packet inside a NVGRE tunnel:= : > + > + testpmd> set nvgre ipv4|ipv6 (tni) (ip-src) (ip-dst) (mac-src) > + testpmd> (mac-dst) set nvgre-with-vlan ipv4|ipv6 (tni) (ip-src) > + testpmd> (ip-dst) (vlan-tci) (mac-src) (mac-dst) > + > Port Functions > -------------- >=20 > @@ -3663,6 +3671,12 @@ This section lists supported actions and their > attributes, if any. > - ``vxlan_decap``: Performs a decapsulation action by stripping all head= ers of > the VXLAN tunnel network overlay from the matched flow. >=20 > +- ``nvgre_encap``: Performs a NVGRE encapsulation, outer layer > +configuration > + is done through `Config NVGRE Encap outer layers`_. > + > +- ``nvgre_decap``: Performs a decapsulation action by stripping all > +headers of > + the NVGRE tunnel network overlay from the matched flow. > + > Destroying flow rules > ~~~~~~~~~~~~~~~~~~~~~ >=20 > @@ -3950,6 +3964,29 @@ IPv6 VXLAN outer header:: > testpmd> set vxlan-with-vlan ipv6 4 4 4 ::1 ::2222 34 11:11:11:11:11:1= 1 > 22:22:22:22:22:22 > testpmd> flow create 0 ingress pattern end actions vxlan_encap / queue= index > 0 / end >=20 > +Sample NVGRE encapsulation rule > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +NVGRE encapsulation outer layer has default value pre-configured in > +testpmd source code, those can be changed by using the following command= s:: make doc-guides-html sphinx processing guides-html... dpdk/doc/guides/testpmd_app_ug/testpmd_funcs.rst:3973: WARNING: Literal blo= ck expected; none found. > + > +IPv4 NVGRE outer header:: > + > + testpmd> set nvgre ipv4 4 127.0.0.1 128.0.0.1 11:11:11:11:11:11 > + 22:22:22:22:22:22 testpmd> flow create 0 ingress pattern end actions > + nvgre_encap / queue index 0 / end > + > + testpmd> set nvgre-with-vlan 4 127.0.0.1 128.0.0.1 34 > + 11:11:11:11:11:11 22:22:22:22:22:22 testpmd> flow create 0 ingress > + pattern end actions vxlan_encap / queue index 0 / end > + > +IPv6 NVGRE outer header:: > + > + testpmd> set nvgre ipv6 4 ::1 ::2222 11:11:11:11:11:11 > + 22:22:22:22:22:22 testpmd> flow create 0 ingress pattern end actions > + vxlan_encap / queue index 0 / end > + > + testpmd> set nvgre-with-vlan ipv6 4 ::1 ::2222 34 11:11:11:11:11:11 > + 22:22:22:22:22:22 testpmd> flow create 0 ingress pattern end actions > + vxlan_encap / queue index 0 / end > + > + > BPF Functions > -------------- >=20 > -- > 2.18.0.rc2 Regards, Bernard.