From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 7D6C2DE0 for ; Tue, 26 Jun 2018 17:15:33 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id e16-v6so2390897wmd.0 for ; Tue, 26 Jun 2018 08:15:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=k4W0FRNiGqleYYTLBkzBgmHOM8Ip058i4I5MeZhZfVg=; b=NF4r46+equ9kws11kGQF2N7pKQFWFfK7DpnRKEwn0F3zaXUW7Vl3qX3TE5QGe8gHqO ol5OJBnPPsSiQP9OiuNnBKmSrRDRuCTQ8aJyzpYvTqEOv1lEBDHf5uoRC4g2PVCeDn2u mmGMT30Y77judVMLqyXzdaYgJQcVJDo/j2vOL/T/0XBAyiXOdHyYYQlObkjwtd7JK7zk jMf5uFRfIYEqvE89vDBoGfiVd1j4NdjMTRwoAyOLd4tC0u6S5Sz2+UybvwFO+yT6UKxo kWRSMGBTxT7QeAgdfMEgJ7kpHuh64gy7TgZEy4xGIOPwMWFAfdtz/0JVfy8LrEHKr+dt wvdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=k4W0FRNiGqleYYTLBkzBgmHOM8Ip058i4I5MeZhZfVg=; b=cLwWwmOtLP1KokJCoIFQ6THt+RsbOwf1K4uWASWOssBVCXLGD/KD7Fd853CTg/FmRr hlvsMqjgZSgf2WLOMaUautDkYA9POHH9u4TGzeCiOV9cnbi5dkyE8q3i24LAHdUdmU6t 1aZ1pOEcIbWXsILzUika6R0fkMV2qMPXuPKv+sAqgU64yBEe+i39aLWbrOo71ZrClqvm qSoI7Qog3C2VgSsOGSA33K7GK3b+NTBtBWihm96L7xQQV/BIop+qV/jf0y9WZYBShE01 DWmW7nIUT5lfGvnEL1fhA2RdIzeoKamLW0xTRRzkL+IF79QVExrKXSt+o/6ik9R02n/P S2ZA== X-Gm-Message-State: APt69E1TDctNP2W5f3ZNeFogND+WF4jv+j8fW53e+cHNrZYz2LFrxVTL A511FAcKMIC4qsDRadOkox72 X-Google-Smtp-Source: AAOMgpfwfhCw3VqCjomNMh9rw3EYF+1z/qPMOVFhYOycYKUqWGJ+MKRX7eLLCBAxofA7P6rVuaPZkg== X-Received: by 2002:a1c:f513:: with SMTP id t19-v6mr2107990wmh.50.1530026133212; Tue, 26 Jun 2018 08:15:33 -0700 (PDT) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 139-v6sm2670810wmu.47.2018.06.26.08.15.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Jun 2018 08:15:32 -0700 (PDT) Date: Tue, 26 Jun 2018 17:15:58 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: "Iremonger, Bernard" Cc: "dev@dpdk.org" , Adrien Mazarguil , "Lu, Wenzhuo" , "Wu, Jingjing" , "Awal, Mohammad Abdul" , Ori Kam , Stephen Hemminger Message-ID: <20180626151558.lprhaemmg2plnqmb@laranjeiro-vm.dev.6wind.com> References: <8CEF83825BEC744B83065625E567D7C260CB8D2E@IRSMSX108.ger.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <8CEF83825BEC744B83065625E567D7C260CB8D2E@IRSMSX108.ger.corp.intel.com> User-Agent: NeoMutt/20170113 (1.7.2) 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 15:15:33 -0000 Hi, On Tue, Jun 26, 2018 at 12:48:42PM +0000, Iremonger, Bernard wrote: > 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 > > > > 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 make 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. > > > > This global structure is only used for the encap action. > > > > 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-src) (ip-dst) > > (vlan-tci) (mac-src) (mac-dst) > > > > +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 > > -------------- > > > > @@ -3663,6 +3671,12 @@ This section lists supported actions and their > > attributes, if any. > > - ``vxlan_decap``: Performs a decapsulation action by stripping all headers of > > the VXLAN tunnel network overlay from the matched flow. > > > > +- ``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 > > ~~~~~~~~~~~~~~~~~~~~~ > > > > @@ -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:11 > > 22:22:22:22:22:22 > > testpmd> flow create 0 ingress pattern end actions vxlan_encap / queue index > > 0 / end > > > > +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 commands:: > > make doc-guides-html > sphinx processing guides-html... > dpdk/doc/guides/testpmd_app_ug/testpmd_funcs.rst:3973: WARNING: Literal block expected; none found. I will fix it in the v5 among with the VXLAN issue you pointed out in the second patch. > > > + > > +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 > > -------------- > > > > -- > > 2.18.0.rc2 > > Regards, > > Bernard. > Thanks, -- Nélio Laranjeiro 6WIND