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 46E32A046B for ; Tue, 20 Aug 2019 09:47:01 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7A4221BEBC; Tue, 20 Aug 2019 09:47:00 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 95D311BEB4 for ; Tue, 20 Aug 2019 09:46:58 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Aug 2019 00:46:57 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,408,1559545200"; d="scan'208";a="378471402" Received: from dpdk-moyufen01.sh.intel.com ([10.67.111.77]) by fmsmga006.fm.intel.com with ESMTP; 20 Aug 2019 00:46:56 -0700 From: yufengmx To: dts@dpdk.org, lijuan.tu@intel.com, yingyax.han@intel.com, zhaoyan.chen@intel.com Cc: yufengmx Date: Tue, 20 Aug 2019 15:47:58 +0800 Message-Id: <1566287278-25897-2-git-send-email-yufengx.mo@intel.com> X-Mailer: git-send-email 1.9.3 In-Reply-To: <1566287278-25897-1-git-send-email-yufengx.mo@intel.com> References: <1566287278-25897-1-git-send-email-yufengx.mo@intel.com> Subject: [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" 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 e9d3fcb..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 = result.values()[0][1:] + return rate_percent, tx_num, rx_num _options = deepcopy(options) while not status and rate_percent > 0: rate_percent = rate_percent - rate_step @@ -288,7 +289,10 @@ class PacketGenerator(object): # use last result as return data to keep the same with dts/etgen format # In fact, multiple link peer have multiple loss rate value, # here only pick one - return loss_rate_table[-1][1].values()[0] + last_result = loss_rate_table[-1] + rate_percent = last_result[0] + tx_num, rx_num = last_result[1].values()[0][1:] + return rate_percent, tx_num, rx_num def measure_rfc2544_with_pps(self, stream_ids=[], options={}): """ -- 1.9.3