From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 0E1201B581 for ; Tue, 26 Jun 2018 14:44:00 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 26 Jun 2018 05:43:59 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,274,1526367600"; d="scan'208";a="52993934" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by orsmga006.jf.intel.com with ESMTP; 26 Jun 2018 05:43:58 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.139]) by IRSMSX151.ger.corp.intel.com ([169.254.4.216]) with mapi id 14.03.0319.002; Tue, 26 Jun 2018 13:43:57 +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 1/2] app/testpmd: add VXLAN encap/decap support Thread-Index: AQHUCS966DUl6hjngEGXL+W10CGcSaRygn4g Date: Tue, 26 Jun 2018 12:43:56 +0000 Message-ID: <8CEF83825BEC744B83065625E567D7C260CB8D1A@IRSMSX108.ger.corp.intel.com> References: <1182e18718fee65dd8a00de19c66f2f0abd82ce0.1529420040.git.nelio.laranjeiro@6wind.com> In-Reply-To: <1182e18718fee65dd8a00de19c66f2f0abd82ce0.1529420040.git.nelio.laranjeiro@6wind.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYWZhNWE1MjEtZGFlMy00NWE4LWFlZGMtMjEwODc2NGE3YWYyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiejZPczZNakNjSFNBb0VBaENPQmdqbndBZkN3XC9rd3N3R3JIZjhrUjJjd3kyNkdteUdQWFhUaUF1dENLcTZJNkgifQ== 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 1/2] app/testpmd: add VXLAN 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:44:01 -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 1/2] app/testpmd: add VXLAN encap/decap support >=20 > Due to the complex VXLAN_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 vxlan_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 > --- > diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > index 0d6fd50ca..2743043d3 100644 > --- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst > +++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst > @@ -1534,6 +1534,13 @@ Enable or disable a per queue Tx offloading only o= n > a specific Tx queue:: >=20 > This command should be run when the port is stopped, or else it will fai= l. >=20 > +Config VXLAN Encap outer layers > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +Configure the outer layer to encapsulate a packet inside a VXLAN tunnel:= : > + > + testpmd> set vxlan ipv4|ipv6 (vni) (udp-src) (udp-dst) (ip-src) > + testpmd> (ip-dst) (mac-src) (mac-dst) set vxlan-with-vlan ipv4|ipv6 > + testpmd> (vni) (udp-src) (udp-dst) (ip-src) (ip-dst) (vlan-tci) > + testpmd> (mac-src) (mac-dst) >=20 > Port Functions > -------------- > @@ -3650,6 +3657,12 @@ This section lists supported actions and their > attributes, if any. >=20 > - ``ethertype``: Ethertype. >=20 > +- ``vxlan_encap``: Performs a VXLAN encapsulation, outer layer > +configuration > + is done through `Config VXLAN Encap outer layers`_. > + > +- ``vxlan_decap``: Performs a decapsulation action by stripping all > +headers of > + the VXLAN tunnel network overlay from the matched flow. > + > Destroying flow rules > ~~~~~~~~~~~~~~~~~~~~~ >=20 > @@ -3915,6 +3928,28 @@ Validate and create a QinQ rule on port 0 to steer > traffic to a queue on the hos > 0 0 0 i- ETH VLAN VLAN=3D>VF QUEUE > 1 0 0 i- ETH VLAN VLAN=3D>PF QUEUE >=20 > +Sample VXLAN encapsulation rule > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > + > +VXLAN 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:3951: WARNING: Literal blo= ck expected; none found. > + > +IPv4 VXLAN outer header:: > + > + testpmd> set vxlan ipv4 4 4 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 > + vxlan_encap / queue index 0 / end > + > + testpmd> set vxlan-with-vlan ipv4 4 4 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 VXLAN outer header:: > + > + testpmd> set vxlan ipv6 4 4 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 vxlan-with-vlan ipv6 4 4 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.