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 C14ECA046B for ; Tue, 20 Aug 2019 10:50:59 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 85BD81BE95; Tue, 20 Aug 2019 10:50:59 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id BE1CB27D for ; Tue, 20 Aug 2019 10:50:57 +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; 20 Aug 2019 01:50:56 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,408,1559545200"; d="scan'208";a="185851804" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by FMSMGA003.fm.intel.com with ESMTP; 20 Aug 2019 01:50:56 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 20 Aug 2019 01:50:56 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 20 Aug 2019 01:50:56 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.19]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0439.000; Tue, 20 Aug 2019 16:50:54 +0800 From: "Han, YingyaX" To: "Mo, YufengX" , "dts@dpdk.org" , "Tu, Lijuan" , "Chen, Zhaoyan" Thread-Topic: [dts][PATCH V1]framework/pktgen_base: fix rfc2544 return value missing zero Thread-Index: AQHVVyt1R5RucaOhLkCqPFiO1mk0WacDui+A Date: Tue, 20 Aug 2019 08:50:53 +0000 Message-ID: <9AC1400278453341942179604C2BF1260C331220@shsmsx102.ccr.corp.intel.com> References: <1566287278-25897-1-git-send-email-yufengx.mo@intel.com> <1566287278-25897-2-git-send-email-yufengx.mo@intel.com> In-Reply-To: <1566287278-25897-2-git-send-email-yufengx.mo@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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/pktgen_base: fix rfc2544 return value missing zero 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: Han, YingyaX -----Original Message----- From: Mo, YufengX=20 Sent: Tuesday, August 20, 2019 3:48 PM To: dts@dpdk.org; Tu, Lijuan ; Han, YingyaX ; Chen, Zhaoyan Cc: Mo, YufengX Subject: [dts][PATCH V1]framework/pktgen_base: fix rfc2544 return value mis= sing zero loss rate fix rfc2544 return value missing zero loss rate. Signed-off-by: yufengmx --- framework/pktgen_base.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/pktgen_base.py b/framework/pktgen_base.py index e9d3= fcb..4bb2afb 100644 --- a/framework/pktgen_base.py +++ b/framework/pktgen_base.py @@ -269,7 +269,8 @@ class PacketGenerator(object): # return data is the same with dts/etgen format # In fact, multiple link peer have multiple loss rate value, # here only pick one - return result.values()[0] + tx_num, rx_num =3D result.values()[0][1:] + return rate_percent, tx_num, rx_num _options =3D deepcopy(options) while not status and rate_percent > 0: rate_percent =3D rate_percent - rate_step @@ -288,7 +289,10 @@= class PacketGenerator(object): # use last result as return data to keep the same with dts/etgen f= ormat # In fact, multiple link peer have multiple loss rate value, # here only pick one - return loss_rate_table[-1][1].values()[0] + last_result =3D loss_rate_table[-1] + rate_percent =3D last_result[0] + tx_num, rx_num =3D last_result[1].values()[0][1:] + return rate_percent, tx_num, rx_num =20 def measure_rfc2544_with_pps(self, stream_ids=3D[], options=3D{}): """ -- 1.9.3