From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Iremonger, Bernard" Subject: Re: [PATCH v4 1/2] app/testpmd: add VXLAN encap/decap support 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> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable To: Nelio Laranjeiro , "dev@dpdk.org" , Adrien Mazarguil , "Lu, Wenzhuo" , "Wu, Jingjing" , "Awal, Mohammad Abdul" , Ori Kam , Stephen Hemminger 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) In-Reply-To: <1182e18718fee65dd8a00de19c66f2f0abd82ce0.1529420040.git.nelio.laranjeiro@6wind.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" 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.