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 CC579A00C4; Fri, 5 Jun 2020 11:27:03 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C44EE1D618; Fri, 5 Jun 2020 11:27:03 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9DB3C1D62E for ; Fri, 5 Jun 2020 11:27:01 +0200 (CEST) IronPort-SDR: nk6Ghn/QLc64rlOMW/0gAi9897Vm6tzSHNWXt3W7/iO8/ZJYmOK/rS53uNOd9gpM36FIhlYBJt pyjNZiFt3Ylw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jun 2020 02:27:01 -0700 IronPort-SDR: 6IjnRaFOCXczpoBhziGGURyFKH0rgXS8zO56G6dD5/u7ah/JiLfUUZZGq2Y8JU1XZd+Y1ow6SB NPoKQLgcl0CA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,475,1583222400"; d="scan'208";a="287677067" Received: from unknown (HELO xqm-virtio_tester.sh.intel.com) ([10.240.183.52]) by orsmga002.jf.intel.com with ESMTP; 05 Jun 2020 02:27:00 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Fri, 5 Jun 2020 17:18:21 +0800 Message-Id: <1591348704-433901-15-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1591348704-433901-1-git-send-email-qimaix.xiao@intel.com> References: <1591348704-433901-1-git-send-email-qimaix.xiao@intel.com> Subject: [dts] [PATCH V2 14/17]vhost_multi_queue_qemu: update mpps value to check perf 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" Signed-off-by: Xiao Qimai --- tests/TestSuite_vhost_multi_queue_qemu.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_vhost_multi_queue_qemu.py b/tests/TestSuite_vhost_multi_queue_qemu.py index c111846..88524d0 100644 --- a/tests/TestSuite_vhost_multi_queue_qemu.py +++ b/tests/TestSuite_vhost_multi_queue_qemu.py @@ -58,7 +58,7 @@ class TestVhostMultiQueueQemu(TestCase): self.cores = self.dut.get_core_list("1S/3C/1T", socket=self.socket) self.verify(len(self.cores) >= 3, "Insufficient cores for speed testing") self.pci_info = self.dut.ports_info[0]['pci'] - + self.frame_sizes = [64, 128, 256, 512, 1024, 1500] self.queue_number = 2 # Using file to save the vhost sample output since in jumboframe case, # there will be lots of output @@ -87,8 +87,6 @@ class TestVhostMultiQueueQemu(TestCase): self.dut.send_expect("rm -rf ./vhost.out", "#") self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#") self.dut.send_expect("killall -s INT testpmd", "#") - - self.frame_sizes = [64, 128, 256, 512, 1024, 1500] self.vm_testpmd_vector = self.target + "/app/testpmd -c %s -n 3" + \ " -- -i --tx-offloads=0x0 " + \ " --rxq=%d --txq=%d --rss-ip --nb-cores=2" % (self.queue_number, self.queue_number) @@ -137,6 +135,15 @@ class TestVhostMultiQueueQemu(TestCase): self.verify(len(cores) >= 3, "Insufficient cores for speed testing, add the cpu number in cfg file.") self.vm_coremask = utils.create_mask(cores) + @property + def check_value(self): + check_dict = dict.fromkeys(self.frame_sizes) + linerate = {64: 0.09, 128: 0.15, 256: 0.25, 512: 0.40, 1024: 0.50, 1280: 0.55, 1500: 0.60} + for size in self.frame_sizes: + speed = self.wirespeed(self.nic, size, self.number_of_ports) + check_dict[size] = round(speed * linerate[size], 2) + return check_dict + def vhost_performance(self): """ Verify the testpmd can receive and forward the data @@ -168,7 +175,9 @@ class TestVhostMultiQueueQemu(TestCase): self.number_of_ports)) data_row = [frame_size, str(Mpps), str(pct), "Mergeable Multiqueue Performance"] self.result_table_add(data_row) - self.verify(Mpps != 0, "The receive data of frame-size: %d is 0" % frame_size) + self.verify(Mpps > self.check_value[frame_size], + "%s of frame size %d speed verify failed, expect %s, result %s" % ( + self.running_case, frame_size, self.check_value[frame_size], Mpps)) self.result_table_print() def send_and_verify(self, verify_type): -- 1.8.3.1