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 1AF48A0567; Wed, 11 Mar 2020 02:33:00 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E53781BFFE; Wed, 11 Mar 2020 02:32:59 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 1EE4D1BFFA for ; Wed, 11 Mar 2020 02:32:57 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 18:32:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,539,1574150400"; d="scan'208";a="242520064" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga003.jf.intel.com with ESMTP; 10 Mar 2020 18:32:56 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 10 Mar 2020 18:32:56 -0700 Received: from shsmsx106.ccr.corp.intel.com (10.239.4.159) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 10 Mar 2020 18:32:56 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.43]) by SHSMSX106.ccr.corp.intel.com ([169.254.10.86]) with mapi id 14.03.0439.000; Wed, 11 Mar 2020 09:32:00 +0800 From: "Tu, Lijuan" To: "Han, YingyaX" , "dts@dpdk.org" , "Mo, YufengX" Thread-Topic: [dts][PATCH V1 1/2]framework: fix the error of getting vlan value Thread-Index: AQHV9roopoZwAbsMTk+XjKV3TIwU+KhCmwLg Date: Wed, 11 Mar 2020 01:31:59 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBEB7CB@SHSMSX101.ccr.corp.intel.com> References: <1583831065-152238-1-git-send-email-yingyax.han@intel.com> In-Reply-To: <1583831065-152238-1-git-send-email-yingyax.han@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 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 1/2]framework: fix the error of getting vlan value 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" > -----Original Message----- > From: Han, YingyaX > Sent: Tuesday, March 10, 2020 5:04 PM > To: dts@dpdk.org; Tu, Lijuan > Cc: Han, YingyaX > Subject: [dts][PATCH V1 1/2]framework: fix the error of getting vlan valu= e >=20 > Signed-off-by: hanyingya > --- > framework/pktgen.py | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >=20 > diff --git a/framework/pktgen.py b/framework/pktgen.py index > 889e94a..404f171 100644 > --- a/framework/pktgen.py > +++ b/framework/pktgen.py > @@ -167,7 +167,7 @@ class PacketGeneratorHelper(object): > action =3D config.get('action') or 'default' > range =3D config.get('range') or 64 > # ignore 'L' suffix > - start_vlan =3D int(pcap_fields.get(layer_name)[:-1]) > + start_vlan =3D int(pcap_fields.get(layer_name)) [Lijuan] need consider more, how to deal with w/ or w/o "L" suffix . some s= capy version may have "L" suffix, and the other may not have.=20 > end_vlan =3D start_vlan + range - 1 > fields_config[layer_name][name] =3D {} > fields_config[layer_name][name]['start'] =3D start_vlan = @@ -212,4 > +212,4 @@ def getPacketGenerator(tester, pktgen_type=3DPKTGEN_IXIA): > return CLS(tester) > else: > msg =3D "not support <{0}> packet generator".format(pktgen_type) > - raise Exception(msg) > \ No newline at end of file > + raise Exception(msg) > -- > 2.17.2