From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 484138E63 for ; Tue, 19 Jan 2016 02:47:24 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 18 Jan 2016 17:47:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.22,315,1449561600"; d="scan'208";a="896050022" Received: from stv-crb-56.sh.intel.com (HELO [10.239.128.116]) ([10.239.128.116]) by fmsmga002.fm.intel.com with ESMTP; 18 Jan 2016 17:47:24 -0800 Message-ID: <569D9625.6020309@intel.com> Date: Tue, 19 Jan 2016 09:49:25 +0800 From: "Liu, Yong" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Lijuan Tu , dts@dpdk.org References: <1453166867-21674-1-git-send-email-lijuanx.a.tu@intel.com> In-Reply-To: <1453166867-21674-1-git-send-email-lijuanx.a.tu@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dts] [PATCH V2]framework/tester.py: create packets length with protocol type 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: , X-List-Received-Date: Tue, 19 Jan 2016 01:47:24 -0000 Applied. Thanks. On 01/19/2016 09:27 AM, Lijuan Tu wrote: > Signed-off-by: Lijuan Tu > --- > framework/tester.py | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/framework/tester.py b/framework/tester.py > index c8cebd6..9906532 100644 > --- a/framework/tester.py > +++ b/framework/tester.py > @@ -485,6 +485,7 @@ class Tester(Crb): > pkts = [] > # packet type random between tcp/udp/ipv6 > random_type = ['TCP', 'UDP', 'IPv6_TCP', 'IPv6_UDP'] > + pkt_minlen = {'TCP': 64, 'UDP': 64, 'IPv6_TCP': 74, 'IPv6_UDP': 64} > # at least wait 2 seconds > timeout = int(pktnum * (interval + 0.01)) + 2 > for txport, rxport in portList: > @@ -494,7 +495,7 @@ class Tester(Crb): > # chose random packet > pkt_type = random.choice(random_type) > pkt = pkt_c(pkt_type=pkt_type, > - pkt_len=random.randint(64, 1514), > + pkt_len=random.randint(pkt_minlen[pkt_type], 1514), > ran_payload=True) > # config packet if has parameters > if params and len(portList) == len(params):