From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id C3C376D45 for ; Fri, 22 Sep 2017 07:51:10 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 21 Sep 2017 22:51:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,427,1500966000"; d="scan'208";a="131245431" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga004.jf.intel.com with ESMTP; 21 Sep 2017 22:51:09 -0700 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 21 Sep 2017 22:51:08 -0700 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 21 Sep 2017 22:51:08 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.152]) with mapi id 14.03.0319.002; Fri, 22 Sep 2017 13:51:07 +0800 From: "Liu, Yong" To: "Wang, FeiX Y" , "dts@dpdk.org" CC: "Wang, FeiX Y" Thread-Topic: [dts] [Patch V1] framework/tester.py : add this function to support ixia to send fixed number of packets during certain period it is only for test_suite nic_single_core_perf, not for common use Thread-Index: AQHTMfcg5T0LYwrFW0S8IWCaMNj49aLAaDUw Date: Fri, 22 Sep 2017 05:51:06 +0000 Message-ID: <86228AFD5BCD8E4EBFD2B90117B5E81E62EC98E9@SHSMSX103.ccr.corp.intel.com> References: <1505910675-50844-1-git-send-email-feix.y.wang@intel.com> In-Reply-To: <1505910675-50844-1-git-send-email-feix.y.wang@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.0.0.116 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] framework/tester.py : add this function to support ixia to send fixed number of packets during certain period it is only for test_suite nic_single_core_perf, not for common use 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: Fri, 22 Sep 2017 05:51:11 -0000 Fei, Please make sure your code align to pep style. I still has question for parameter "runTime", this value is depend on rate,= total number and link rate. I think the only value for this parameter is to make sure all packets trans= mitted. Why not just check how many packets emitted and return when equal to parame= ter "packetNum". Thanks, Marvin > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of wang fei > Sent: Wednesday, September 20, 2017 8:31 PM > To: dts@dpdk.org > Cc: Wang, FeiX Y > Subject: [dts] [Patch V1] framework/tester.py : add this function to > support ixia to send fixed number of packets during certain period it is > only for test_suite nic_single_core_perf, not for common use >=20 > Signed-off-by: wang fei > --- > framework/tester.py | 11 +++++++++++ > 1 file changed, 11 insertions(+) >=20 > diff --git a/framework/tester.py b/framework/tester.py > index e7fb6bc..78202d0 100644 > --- a/framework/tester.py > +++ b/framework/tester.py > @@ -491,6 +491,17 @@ class Tester(Crb): >=20 > return out.rpartition('[')[0] >=20 > + def > traffic_generator_send_packets(self,portList,ratePercent,packetNum,delay= =3D5 > ,runTime=3D60): > + """ > + send fixed number of packets on specified ports during runTime > time. > + Be note that this function is only used for nic_single_core_perf > test case, not for common use > + """ > + if self.check_port_list(portList, 'ixia'): > + return self.ixia_packet_gen.send_packets(portList, > ratePercent, packetNum,delay,runTime) > + if not self.check_port_list(portList): > + self.logger.warning("exception by mixed port types") > + return None > + > def traffic_generator_throughput(self, portList, rate_percent=3D100, > delay=3D5): > """ > Run throughput performance test on specified ports. > -- > 2.7.4