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 6C02BA00C5; Thu, 11 Jun 2020 11:30:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 300B71BE88; Thu, 11 Jun 2020 11:30:16 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 477B21BE3D for ; Thu, 11 Jun 2020 11:30:14 +0200 (CEST) IronPort-SDR: rgjIX9Q4P2i1ugUKpJRJvvbEhBvaQD657FVLNx4p3zEOl9kfNK7UcBl5F1YhqSn5vGTWZHwThj eHoiN1YMvBOA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jun 2020 02:30:13 -0700 IronPort-SDR: GcrSJ6RLqG16WmDpCQVpXnD4nCkbCEqCF7v3HQecc8znvm5vaILQyPVDcv1iAaUxBNqEKdpPLJ 017Ddf2QJPKA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,499,1583222400"; d="scan'208";a="289488899" Received: from ubuntu.sh.intel.com (HELO xqm-virtio_tester.localdomain) ([10.240.183.52]) by orsmga002.jf.intel.com with ESMTP; 11 Jun 2020 02:30:11 -0700 From: Xiao Qimai To: dts@dpdk.org Cc: Xiao Qimai Date: Thu, 11 Jun 2020 17:22:33 +0800 Message-Id: <1591867353-21547-1-git-send-email-qimaix.xiao@intel.com> X-Mailer: git-send-email 1.8.3.1 Subject: [dts] [PATCH V2]pvp_vhost_user_reconnect: check perf data in each reconnect loop 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" * 1.check perf data in each reconnect loop * 2.increase perf descend tolerance from 5% to 15% because of network fluctuations Signed-off-by: Xiao Qimai --- tests/TestSuite_pvp_vhost_user_reconnect.py | 110 ++++++++-------------------- 1 file changed, 29 insertions(+), 81 deletions(-) diff --git a/tests/TestSuite_pvp_vhost_user_reconnect.py b/tests/TestSuite_pvp_vhost_user_reconnect.py index fa86d02..b609115 100644 --- a/tests/TestSuite_pvp_vhost_user_reconnect.py +++ b/tests/TestSuite_pvp_vhost_user_reconnect.py @@ -66,7 +66,7 @@ class TestPVPVhostUserReconnect(TestCase): else: self.socket_mem = '1024,1024' - self.reconnect_times = 2 + self.reconnect_times = 5 self.vm_num = 1 self.frame_sizes = [64, 1518] self.virtio_ip = ["1.1.1.2", "1.1.1.3"] @@ -241,9 +241,9 @@ class TestPVPVhostUserReconnect(TestCase): self.vm_dut[0].send_expect( 'iperf -s -p 12345 -i 1 > iperf_server.log &', '', 10) self.vm_dut[1].send_expect( - 'iperf -c %s -p 12345 -i 1 -t 5 > iperf_client.log &' % + 'iperf -c %s -p 12345 -i 1 -t 10 > iperf_client.log &' % self.virtio_ip[0], '', 60) - time.sleep(20) + time.sleep(15) def iperf_result_verify(self, cycle, tinfo): """ @@ -306,14 +306,10 @@ class TestPVPVhostUserReconnect(TestCase): if isinstance(self.before_data, dict): for i in self.frame_sizes: self.verify( - (self.before_data[i] - self.vhost_reconnect_data[i]) < self.before_data[i] * 0.05, 'verify reconnect vhost speed failed') - self.verify( - (self.before_data[i] - self.vm_reconnect_data[i]) < self.before_data[i] * 0.05, 'verify reconnect vm speed failed') + (self.before_data[i] - self.reconnect_data[i]) < self.before_data[i] * 0.15, 'verify reconnect speed failed') else: self.verify( - (self.before_data - self.vhost_reconnect_data < self.before_data * 0.05, 'verify reconnect vhost speed failed')) - self.verify( - (self.before_data - self.vm_reconnect_data < self.before_data * 0.05, 'verify reconnect vm speed failed')) + (self.before_data - self.reconnect_data) < self.before_data * 0.15, 'verify reconnect speed failed') def test_perf_split_ring_reconnet_one_vm(self): """ @@ -332,32 +328,21 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle = 1 # reconnet from vhost self.logger.info('now reconnect from vhost') - vhost_tmp = list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT testpmd", "# ") self.launch_testpmd_as_vhost_user() - vhost_tmp.append(self.send_and_verify(vm_cycle, "reconnet from vhost")) - - self.vhost_reconnect_data = dict() - for frame_size in self.frame_sizes: - size_value = [i[frame_size] for i in vhost_tmp] - self.vhost_reconnect_data[frame_size] = sum(size_value)/len(size_value) + self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from vhost") + self.check_reconnect_perf() # reconnet from qemu self.logger.info('now reconnect from vm') - vm_tmp = list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ") self.start_vms() self.vm_testpmd_start() - vm_tmp.append(self.send_and_verify(vm_cycle, "reconnet from VM")) - - self.vm_reconnect_data = dict() - for frame_size in self.frame_sizes: - size_value = [i[frame_size] for i in vm_tmp] - self.vm_reconnect_data[frame_size] = sum(size_value)/len(size_value) + self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from VM") + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() def test_perf_split_ring_reconnet_two_vms(self): """ @@ -376,31 +361,21 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle = 1 # reconnet from vhost self.logger.info('now reconnect from vhost') - vhost_tmp = list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT testpmd", "# ") self.launch_testpmd_as_vhost_user() - vhost_tmp.append(self.send_and_verify(vm_cycle, "reconnet from vhost")) - self.vhost_reconnect_data = dict() - for frame_size in self.frame_sizes: - size_value = [i[frame_size] for i in vhost_tmp] - self.vhost_reconnect_data[frame_size] = sum(size_value) / len(size_value) + self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from vhost") + self.check_reconnect_perf() # reconnet from qemu self.logger.info('now reconnect from vm') - vm_tmp = list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ") self.start_vms() self.vm_testpmd_start() - vm_tmp.append(self.send_and_verify(vm_cycle, "reconnet from VM")) - - self.vm_reconnect_data = dict() - for frame_size in self.frame_sizes: - size_value = [i[frame_size] for i in vm_tmp] - self.vm_reconnect_data[frame_size] = sum(size_value)/len(size_value) + self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from VM") + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() def test_perf_split_ring_vm2vm_virtio_net_reconnet_two_vms(self): """ @@ -419,13 +394,12 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle = 1 # reconnet from vhost self.logger.info('now reconnect from vhost') - vhost_tmp = list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT testpmd", "# ") self.launch_testpmd_as_vhost_user_with_no_pci() self.start_iperf() - vhost_tmp.append(self.iperf_result_verify(vm_cycle, 'reconnet from vhost')) - self.vhost_reconnect_data = sum(vhost_tmp)/len(vhost_tmp) + self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vhost') + self.check_reconnect_perf() # reconnet from VM self.logger.info('now reconnect from vm') @@ -437,10 +411,9 @@ class TestPVPVhostUserReconnect(TestCase): self.start_vms() self.config_vm_intf() self.start_iperf() - vm_tmp.append(self.iperf_result_verify(vm_cycle, 'reconnet from vm')) - self.vm_reconnect_data = sum(vm_tmp)/len(vm_tmp) + self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vm') + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() def test_perf_packed_ring_reconnet_one_vm(self): """ @@ -448,7 +421,6 @@ class TestPVPVhostUserReconnect(TestCase): """ self.header_row = ["Mode", "FrameSize(B)", "Throughput(Mpps)", "LineRate(%)", "Cycle", "Queue Number"] - self.res = dict().fromkeys(["before_relaunch", "after_relaunch"], list()) self.result_table_create(self.header_row) vm_cycle = 0 self.vm_num = 1 @@ -459,31 +431,22 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle = 1 # reconnet from vhost - vhost_tmp = list() self.logger.info('now reconnect from vhost') for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT testpmd", "# ") self.launch_testpmd_as_vhost_user() - vhost_tmp.append(self.send_and_verify(vm_cycle, "reconnet from vhost")) - self.vhost_reconnect_data = dict() - for frame_size in self.frame_sizes: - size_value = [i[frame_size] for i in vhost_tmp] - self.vhost_reconnect_data[frame_size] = sum(size_value) / len(size_value) + self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from vhost") + self.check_reconnect_perf() # reconnet from qemu self.logger.info('now reconnect from vm') - vm_tmp = list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ") self.start_vms(packed=True) self.vm_testpmd_start() - vm_tmp.append(self.send_and_verify(vm_cycle, "reconnet from VM")) - self.vm_reconnect_data = dict() - for frame_size in self.frame_sizes: - size_value = [i[frame_size] for i in vm_tmp] - self.vm_reconnect_data[frame_size] = sum(size_value) / len(size_value) + self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from VM") + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() def test_perf_packed_ring_reconnet_two_vms(self): """ @@ -491,7 +454,6 @@ class TestPVPVhostUserReconnect(TestCase): """ self.header_row = ["Mode", "FrameSize(B)", "Throughput(Mpps)", "LineRate(%)", "Cycle", "Queue Number"] - self.res = dict().fromkeys(["before_relaunch", "after_relaunch"], list()) self.result_table_create(self.header_row) vm_cycle = 0 self.vm_num = 2 @@ -503,37 +465,26 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle = 1 # reconnet from vhost self.logger.info('now reconnect from vhost') - vhost_tmp = list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT testpmd", "# ") self.launch_testpmd_as_vhost_user() - vhost_tmp.append(self.send_and_verify(vm_cycle, "reconnet from vhost")) - - self.vhost_reconnect_data = dict() - for frame_size in self.frame_sizes: - size_value = [i[frame_size] for i in vhost_tmp] - self.vhost_reconnect_data[frame_size] = sum(size_value) / len(size_value) + self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from vhost") + self.check_reconnect_perf() # reconnet from qemu self.logger.info('now reconnect from vm') - vm_tmp = list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT qemu-system-x86_64", "# ") self.start_vms(packed=True) self.vm_testpmd_start() - vm_tmp.append(self.send_and_verify(vm_cycle, "reconnet from VM")) - self.vm_reconnect_data = dict() - for frame_size in self.frame_sizes: - size_value = [i[frame_size] for i in vm_tmp] - self.vm_reconnect_data[frame_size] = sum(size_value) / len(size_value) + self.reconnect_data = self.send_and_verify(vm_cycle, "reconnet from VM") + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() def test_perf_packed_ring_virtio_net_reconnet_two_vms(self): """ test the iperf traffice can resume after reconnet """ self.header_row = ["Mode", "[M|G]bits/sec", "Cycle"] - self.res = dict().fromkeys(["before_relaunch", "after_relaunch"], list()) self.result_table_create(self.header_row) self.vm_num = 2 vm_cycle = 0 @@ -546,17 +497,15 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle = 1 # reconnet from vhost self.logger.info('now reconnect from vhost') - vhost_tmp = list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT testpmd", "# ") self.launch_testpmd_as_vhost_user_with_no_pci() self.start_iperf() - vhost_tmp.append(self.iperf_result_verify(vm_cycle, 'reconnet from vhost')) - self.vhost_reconnect_data = sum(vhost_tmp)/len(vhost_tmp) + self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vhost') + self.check_reconnect_perf() # reconnet from VM self.logger.info('now reconnect from vm') - vm_tmp = list() for i in range(self.reconnect_times): self.vm_dut[0].send_expect('rm iperf_server.log', '# ', 10) self.vm_dut[1].send_expect('rm iperf_client.log', '# ', 10) @@ -564,10 +513,9 @@ class TestPVPVhostUserReconnect(TestCase): self.start_vms(packed=True) self.config_vm_intf() self.start_iperf() - vm_tmp.append(self.iperf_result_verify(vm_cycle, 'reconnet from vm')) - self.vm_reconnect_data = sum(vm_tmp)/len(vm_tmp) + self.reconnect_data = self.iperf_result_verify(vm_cycle, 'reconnet from vm') + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() def tear_down(self): # -- 1.8.3.1