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 BA6AEA0563; Tue, 10 Mar 2020 09:59:03 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 654921C012; Tue, 10 Mar 2020 09:59:03 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id C10321C00E for ; Tue, 10 Mar 2020 09:59:01 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 10 Mar 2020 01:59:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,535,1574150400"; d="scan'208";a="276874670" Received: from unknown (HELO dpdk-wenjielx-dtspatch135.sh.intel.com) ([10.240.176.135]) by fmsmga002.fm.intel.com with ESMTP; 10 Mar 2020 01:58:59 -0700 From: hanyingya To: dts@dpdk.org, lijuan.tu@intel.com Cc: hanyingya Date: Tue, 10 Mar 2020 17:04:25 +0800 Message-Id: <1583831065-152238-1-git-send-email-yingyax.han@intel.com> X-Mailer: git-send-email 1.9.3 Subject: [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" Signed-off-by: hanyingya --- framework/pktgen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 = config.get('action') or 'default' range = config.get('range') or 64 # ignore 'L' suffix - start_vlan = int(pcap_fields.get(layer_name)[:-1]) + start_vlan = int(pcap_fields.get(layer_name)) end_vlan = start_vlan + range - 1 fields_config[layer_name][name] = {} fields_config[layer_name][name]['start'] = start_vlan @@ -212,4 +212,4 @@ def getPacketGenerator(tester, pktgen_type=PKTGEN_IXIA): return CLS(tester) else: msg = "not support <{0}> packet generator".format(pktgen_type) - raise Exception(msg) \ No newline at end of file + raise Exception(msg) -- 2.17.2