From patchwork Fri Jul 31 08:05:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yufen.Mo" X-Patchwork-Id: 75098 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 12942A052B; Fri, 31 Jul 2020 10:07:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EF8CB1C023; Fri, 31 Jul 2020 10:07:43 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id AB8C52862 for ; Fri, 31 Jul 2020 10:07:40 +0200 (CEST) IronPort-SDR: N4JLSrrBXVyIkK8kHD03MXDnN6pHs1kpR7pszGfMMEtZlSPgCImI9ngwQTmJv9SDd55Wb0CUVg SK40R+UpDYzw== X-IronPort-AV: E=McAfee;i="6000,8403,9698"; a="131815964" X-IronPort-AV: E=Sophos;i="5.75,417,1589266800"; d="scan'208";a="131815964" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jul 2020 01:07:40 -0700 IronPort-SDR: piSDl67/9FCkkhpJT/oUM4s6SRR4ed9WNQgnO/HEZI9wNzKHKwS6ytTmowqfOSJmPyPln9sp9R drc7E4gL5Dfg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,417,1589266800"; d="scan'208";a="490945453" Received: from dpdk-moyufen06.sh.intel.com ([10.67.116.208]) by fmsmga006.fm.intel.com with ESMTP; 31 Jul 2020 01:07:39 -0700 From: yufengmx To: dts@dpdk.org Cc: yufengmx Date: Fri, 31 Jul 2020 16:05:20 +0800 Message-Id: <20200731080520.43732-2-yufengx.mo@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20200731080520.43732-1-yufengx.mo@intel.com> References: <20200731080520.43732-1-yufengx.mo@intel.com> MIME-Version: 1.0 Subject: [dts] [PATCH V2 1/1] l3fwd: update rfc2544/throughput json and display 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" update rfc2544/throughput json and display. Signed-off-by: yufengmx --- tests/l3fwd_base.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/l3fwd_base.py b/tests/l3fwd_base.py index a6e26b0..6eddde0 100644 --- a/tests/l3fwd_base.py +++ b/tests/l3fwd_base.py @@ -827,11 +827,12 @@ class L3fwdBase(object): expected, pps, round(gap, 2)) self.logger.error(msg) else: + expected = pps msg = ('{0} {1} expected throughput value is not set, ' 'ignore check').format(config, frame_size) self.logger.warning(msg) status = 'pass' - js_results.append([status, [pps, linerate - pps], percentage, config, frame_size]) + js_results.append([status, [pps, pps - expected], percentage, config, frame_size]) # save data with json format self.__save_throughput_result(self.__cur_case, js_results) # display result table @@ -861,6 +862,7 @@ class L3fwdBase(object): self.__cur_case, {}).get(self.__nic_name, {}).get( config, {}).get(str(frame_size), {}) zero_loss_rate, tx_pkts, rx_pkts, pps = result if result else [None] * 3 + zero_loss_rate = zero_loss_rate or 0 mpps = pps / 1000000.0 # expected line rate _frame_size = self.__get_frame_size(stm_name, frame_size) @@ -880,22 +882,32 @@ class L3fwdBase(object): ]) # check data with expected values expected_rate = float(expected_cfg.get('rate') or 100.0) + gap = 100 * (zero_loss_rate - expected_rate) / expected_rate status = 'pass' \ - if zero_loss_rate and zero_loss_rate > expected_rate \ + if abs(gap) < bias \ else 'failed' js_results.append( [status, - [mpps, linerate - mpps], actual_rate_percent, + [mpps, zero_loss_rate - expected_rate], actual_rate_percent, config, frame_size]) # save data in json file self.__save_rfc2544_result(self.__cur_case, js_results) # display result table + # Total Cores/Threads/Queues per port + # Frame Size + # Mode: LPM/EM + # Expected LineRate % : which config in l3fwd_lpm_ipv4_rfc2544.cfg + # Actual LineRate % : actual run zero loss rate + # Expected Throughput (Mpps) : Max linerate throughput value * 'Expected LineRate %' + # Actual Throughput (Mpps) : actual run throughput value on the zero loss rate + # tx_pkts : send pkts num + # rx_pkts : received pkts num title = [ 'Total Cores/Threads/Queues per port', "Frame Size", "Mode", 'Expected Throughput (Mpps)', - 'Actual line rate (Mpps) ', + 'Actual Throughput (Mpps) ', '{} Mode config line rate % '.format(mode.upper()), '{} Mode actual line rate % '.format(mode.upper()), 'tx_pkts',