From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 745F8A046B for ; Tue, 23 Jul 2019 11:13:54 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 65C2F1BFD6; Tue, 23 Jul 2019 11:13:54 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 85D801BFC5 for ; Tue, 23 Jul 2019 11:13:52 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2019 02:13:51 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,298,1559545200"; d="scan'208";a="177240655" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 23 Jul 2019 02:13:51 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 23 Jul 2019 02:13:51 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 23 Jul 2019 02:13:51 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.134]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.55]) with mapi id 14.03.0439.000; Tue, 23 Jul 2019 17:13:49 +0800 From: "Zhu, ShuaiX" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Ma, LihongX" , "Zhu, ShuaiX" Thread-Topic: [dts] [PATCH V1 2/3][scapy vxlan] framework: update vxlan name from Vxlan to VXLAN Thread-Index: AQHVQS8WnZjj7ygoGEeEjo4aQWYLf6bX62rw Date: Tue, 23 Jul 2019 09:13:48 +0000 Message-ID: <4DC48DF9BDA3E54A836D2D3C057DEC6F0B1C4436@SHSMSX101.ccr.corp.intel.com> References: <1563843053-30184-1-git-send-email-lihongx.ma@intel.com> <1563843053-30184-2-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1563843053-30184-2-git-send-email-lihongx.ma@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1 2/3][scapy vxlan] framework: update vxlan name from Vxlan to VXLAN X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" Tested-by: Zhu, ShuaiX > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong > Sent: Tuesday, July 23, 2019 8:51 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts] [PATCH V1 2/3][scapy vxlan] framework: update vxlan name f= rom > Vxlan to VXLAN >=20 > depend on dep/vxlan.py, update Vxlan to VXLAN >=20 > Signed-off-by: lihong > --- > framework/etgen.py | 12 ++++++------ > framework/packet.py | 4 ++-- > framework/pktgen_ixia.py | 14 +++++++------- > 3 files changed, 15 insertions(+), 15 deletions(-) >=20 > diff --git a/framework/etgen.py b/framework/etgen.py index cd6829d..212b9= c2 > 100644 > --- a/framework/etgen.py > +++ b/framework/etgen.py > @@ -238,19 +238,19 @@ class IxiaPacketGenerator(SSHConnection): > def parse_pcap(self, fpcap): > dump_str1 =3D "cmds =3D []\n" > dump_str2 =3D "for i in rdpcap('%s', -1):\n" % fpcap > - dump_str3 =3D " if 'Vxlan' in i.command():\n" + \ > + dump_str3 =3D " if 'VXLAN' in i.command():\n" + \ > " vxlan_str =3D ''\n" + \ > - " l =3D len(i[Vxlan])\n" + \ > - " vxlan =3D str(i[Vxlan])\n" + \ > + " l =3D len(i[VXLAN])\n" + \ > + " vxlan =3D str(i[VXLAN])\n" + \ > " first =3D True\n" + \ > " for j in range(l):\n" + \ > " if first:\n" + \ > - " vxlan_str +=3D > \"Vxlan(hexval=3D'%02X\" %ord(vxlan[j])\n" + \ > + " vxlan_str +=3D > \"VXLAN(hexval=3D'%02X\" %ord(vxlan[j])\n" + \ > " first =3D False\n" + \ > " else:\n" + \ > " vxlan_str +=3D > \" %02X\" %ord(vxlan[j])\n" + \ > " vxlan_str +=3D \"\')\"\n" + \ > - " command =3D re.sub(r\"Vxlan(.*)\", vxlan_st= r, > i.command())\n" + \ > + " command =3D re.sub(r\"VXLAN(.*)\", vxlan_st= r, > i.command())\n" + \ > " else:\n" + \ > " command =3D i.command()\n" + \ > " cmds.append(command)\n" + \ > @@ -375,7 +375,7 @@ class IxiaPacketGenerator(SSHConnection): > match =3D pat.match(header) > params =3D eval('dict(%s)' % match.group(2)) > method_name =3D match.group(1) > - if method_name =3D=3D 'Vxlan': > + if method_name =3D=3D 'VXLAN': > method =3D getattr(self, method_name.lower()) > method(txport, **params) > break > diff --git a/framework/packet.py b/framework/packet.py index d39479f..502= d85c > 100755 > --- a/framework/packet.py > +++ b/framework/packet.py > @@ -65,7 +65,7 @@ DTS_PATH =3D exec_file.replace('/framework/packet.py', = '') > DEP_FOLDER =3D DTS_PATH + '/dep' > sys.path.append(DEP_FOLDER) >=20 > -from vxlan import Vxlan > +from vxlan import VXLAN > from nvgre import NVGRE, IPPROTO_NVGRE > from lldp import LLDP, LLDPManagementAddress from Dot1BR import Dot1BR > @@ -123,7 +123,7 @@ class scapy(object): > 'icmp': ICMP(), > 'gre': GRE(), > 'raw': Raw(), > - 'vxlan': Vxlan(), > + 'vxlan': VXLAN(), >=20 > 'inner_mac': Ether(), > 'inner_vlan': Dot1Q(), > diff --git a/framework/pktgen_ixia.py b/framework/pktgen_ixia.py index > 80481fe..2895c6b 100644 > --- a/framework/pktgen_ixia.py > +++ b/framework/pktgen_ixia.py > @@ -141,19 +141,19 @@ class Ixia(SSHConnection): >=20 > dump_str1 =3D "cmds =3D []\n" > dump_str2 =3D "for i in rdpcap('%s', -1):\n" % pcap_path > - dump_str3 =3D " if 'Vxlan' in i.command():\n" + \ > + dump_str3 =3D " if 'VXLAN' in i.command():\n" + \ > " vxlan_str =3D ''\n" + \ > - " l =3D len(i[Vxlan])\n" + \ > - " vxlan =3D str(i[Vxlan])\n" + \ > + " l =3D len(i[VXLAN])\n" + \ > + " vxlan =3D str(i[VXLAN])\n" + \ > " first =3D True\n" + \ > " for j in range(l):\n" + \ > " if first:\n" + \ > - " vxlan_str +=3D > \"Vxlan(hexval=3D'%02X\" %ord(vxlan[j])\n" + \ > + " vxlan_str +=3D > \"VXLAN(hexval=3D'%02X\" %ord(vxlan[j])\n" + \ > " first =3D False\n" + \ > " else:\n" + \ > " vxlan_str +=3D > \" %02X\" %ord(vxlan[j])\n" + \ > " vxlan_str +=3D \"\')\"\n" + \ > - " command =3D re.sub(r\"Vxlan(.*)\", vxlan_st= r, > i.command())\n" + \ > + " command =3D re.sub(r\"VXLAN(.*)\", vxlan_st= r, > i.command())\n" + \ > " else:\n" + \ > " command =3D i.command()\n" + \ > " cmds.append(command)\n" + \ > @@ -502,7 +502,7 @@ class Ixia(SSHConnection): > match =3D pat.match(header) > params =3D eval('dict(%s)' % match.group(2)) > method_name =3D match.group(1) > - if method_name =3D=3D 'Vxlan': > + if method_name =3D=3D 'VXLAN': > method =3D getattr(self, method_name.lower()) > method(ixia_port, vm.get('fields_config', {}), **par= ams) > break > @@ -1747,4 +1747,4 @@ class IxiaPacketGenerator(PacketGenerator): > ''' close ixia session ''' > if self._conn is not None: > self._disconnect() > - return > \ No newline at end of file > + return > -- > 2.7.4