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 C4F37A04F5; Fri, 19 Jun 2020 05:39:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 679772B9E; Fri, 19 Jun 2020 05:39:16 +0200 (CEST) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 7D15DDE0 for ; Fri, 19 Jun 2020 05:39:14 +0200 (CEST) IronPort-SDR: UOWh+CIYcXUHkAAAwEKpG2SOyNfPFzF/++Cu7qYSskA5NidPFdGL9LhDWCNR2t+dIkZh5uHuzl C/sTdGgSrmVw== X-IronPort-AV: E=McAfee;i="6000,8403,9656"; a="140363863" X-IronPort-AV: E=Sophos;i="5.75,253,1589266800"; d="scan'208";a="140363863" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Jun 2020 20:39:13 -0700 IronPort-SDR: JPJCALlNoB2aO1gk3SUALRWCopoyYIcoAiIpL70g2hf8337ehSpOUz4j+pac5wUHfBv6tqIhg5 hZsoxwNd6oOw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,253,1589266800"; d="scan'208";a="262200170" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga007.fm.intel.com with ESMTP; 18 Jun 2020 20:39:13 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jun 2020 20:39:13 -0700 Received: from shsmsx154.ccr.corp.intel.com (10.239.6.54) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 18 Jun 2020 20:39:12 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.85]) by SHSMSX154.ccr.corp.intel.com ([169.254.7.221]) with mapi id 14.03.0439.000; Fri, 19 Jun 2020 11:39:09 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V2]pvp_vhost_user_reconnect: check perf data in each reconnect loop Thread-Index: AQHWP9MEUiNOGI4HJEGpAknuCn1exqjfVqMg Date: Fri, 19 Jun 2020 03:39:09 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC5FA50@SHSMSX101.ccr.corp.intel.com> References: <1591867353-21547-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1591867353-21547-1-git-send-email-qimaix.xiao@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [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" Applied error, please rework it, thanks. -----Original Message----- From: dts On Behalf Of Xiao Qimai Sent: 2020=1B$BG/=1B(B6=1B$B7n=1B(B11=1B$BF|=1B(B 17:23 To: dts@dpdk.org Cc: Xiao, QimaiX Subject: [dts] [PATCH V2]pvp_vhost_user_reconnect: check perf data in each = reconnect loop * 1.check perf data in each reconnect loop * 2.increase perf descend tolerance from 5% to 15% because of network fluct= uations 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 =3D '1024,1024' =20 - self.reconnect_times =3D 2 + self.reconnect_times =3D 5 self.vm_num =3D 1 self.frame_sizes =3D [64, 1518] self.virtio_ip =3D ["1.1.1.2", "1.1.1.3"] @@ -241,9 +241,9 @@ clas= s 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) =20 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]) < se= lf.before_data[i] * 0.05, 'verify reconnect vm speed failed') + (self.before_data[i] - self.reconnect_data[i]) <=20 + self.before_data[i] * 0.15, 'verify reconnect speed failed') else: self.verify( - (self.before_data - self.vhost_reconnect_data < self.befor= e_data * 0.05, 'verify reconnect vhost speed failed')) - self.verify( - (self.before_data - self.vm_reconnect_data < self.before_d= ata * 0.05, 'verify reconnect vm speed failed')) + (self.before_data - self.reconnect_data) <=20 + self.before_data * 0.15, 'verify reconnect speed failed') =20 def test_perf_split_ring_reconnet_one_vm(self): """ @@ -332,32 +328,21 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle =3D 1 # reconnet from vhost self.logger.info('now reconnect from vhost') - vhost_tmp =3D 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 =3D dict() - for frame_size in self.frame_sizes: - size_value =3D [i[frame_size] for i in vhost_tmp] - self.vhost_reconnect_data[frame_size] =3D sum(size_value)/len(= size_value) + self.reconnect_data =3D self.send_and_verify(vm_cycle, "reconn= et from vhost") + self.check_reconnect_perf() =20 # reconnet from qemu self.logger.info('now reconnect from vm') - vm_tmp =3D 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 =3D dict() - for frame_size in self.frame_sizes: - size_value =3D [i[frame_size] for i in vm_tmp] - self.vm_reconnect_data[frame_size] =3D sum(size_value)/len(siz= e_value) + self.reconnect_data =3D self.send_and_verify(vm_cycle, "reconn= et from VM") + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() =20 def test_perf_split_ring_reconnet_two_vms(self): """ @@ -376,31 +361,21 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle =3D 1 # reconnet from vhost self.logger.info('now reconnect from vhost') - vhost_tmp =3D 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 =3D dict() - for frame_size in self.frame_sizes: - size_value =3D [i[frame_size] for i in vhost_tmp] - self.vhost_reconnect_data[frame_size] =3D sum(size_value) / le= n(size_value) + self.reconnect_data =3D self.send_and_verify(vm_cycle, "reconn= et from vhost") + self.check_reconnect_perf() =20 # reconnet from qemu self.logger.info('now reconnect from vm') - vm_tmp =3D 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 =3D dict() - for frame_size in self.frame_sizes: - size_value =3D [i[frame_size] for i in vm_tmp] - self.vm_reconnect_data[frame_size] =3D sum(size_value)/len(siz= e_value) + self.reconnect_data =3D self.send_and_verify(vm_cycle, "reconn= et from VM") + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() =20 def test_perf_split_ring_vm2vm_virtio_net_reconnet_two_vms(self): """ @@ -419,13 +394,12 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle =3D 1 # reconnet from vhost self.logger.info('now reconnect from vhost') - vhost_tmp =3D 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 =3D sum(vhost_tmp)/len(vhost_tmp) + self.reconnect_data =3D self.iperf_result_verify(vm_cycle, 're= connet from vhost') + self.check_reconnect_perf() =20 # reconnet from VM self.logger.info('now reconnect from vm') @@ -437,10 +411,9 @@ cla= ss TestPVPVhostUserReconnect(TestCase): self.start_vms() self.config_vm_intf() self.start_iperf() - vm_tmp.append(self.iperf_result_verify(vm_cycle, 'reconnet fro= m vm')) - self.vm_reconnect_data =3D sum(vm_tmp)/len(vm_tmp) + self.reconnect_data =3D self.iperf_result_verify(vm_cycle, 're= connet from vm') + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() =20 def test_perf_packed_ring_reconnet_one_vm(self): """ @@ -448,7 +421,6 @@ class TestPVPVhostUserReconnect(TestCase): """ self.header_row =3D ["Mode", "FrameSize(B)", "Throughput(Mpps)", "LineRate(%)", "Cycle", "Queue Number"] - self.res =3D dict().fromkeys(["before_relaunch", "after_relaunch"]= , list()) self.result_table_create(self.header_row) vm_cycle =3D 0 self.vm_num =3D 1 @@ -459,31 +431,22 @@ class TestPVPVhostUserReconnect(TestCase): =20 vm_cycle =3D 1 # reconnet from vhost - vhost_tmp =3D 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 =3D dict() - for frame_size in self.frame_sizes: - size_value =3D [i[frame_size] for i in vhost_tmp] - self.vhost_reconnect_data[frame_size] =3D sum(size_value) / le= n(size_value) + self.reconnect_data =3D self.send_and_verify(vm_cycle, "reconn= et from vhost") + self.check_reconnect_perf() =20 # reconnet from qemu self.logger.info('now reconnect from vm') - vm_tmp =3D list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT qemu-system-x86_64", "# "= ) self.start_vms(packed=3DTrue) self.vm_testpmd_start() - vm_tmp.append(self.send_and_verify(vm_cycle, "reconnet from VM= ")) - self.vm_reconnect_data =3D dict() - for frame_size in self.frame_sizes: - size_value =3D [i[frame_size] for i in vm_tmp] - self.vm_reconnect_data[frame_size] =3D sum(size_value) / len(s= ize_value) + self.reconnect_data =3D self.send_and_verify(vm_cycle, "reconn= et from VM") + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() =20 def test_perf_packed_ring_reconnet_two_vms(self): """ @@ -491,7 +454,6 @@ class TestPVPVhostUserReconnect(TestCase): """ self.header_row =3D ["Mode", "FrameSize(B)", "Throughput(Mpps)", "LineRate(%)", "Cycle", "Queue Number"] - self.res =3D dict().fromkeys(["before_relaunch", "after_relaunch"]= , list()) self.result_table_create(self.header_row) vm_cycle =3D 0 self.vm_num =3D 2 @@ -503,37 +465,26 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle =3D 1 # reconnet from vhost self.logger.info('now reconnect from vhost') - vhost_tmp =3D 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 =3D dict() - for frame_size in self.frame_sizes: - size_value =3D [i[frame_size] for i in vhost_tmp] - self.vhost_reconnect_data[frame_size] =3D sum(size_value) / le= n(size_value) + self.reconnect_data =3D self.send_and_verify(vm_cycle, "reconn= et from vhost") + self.check_reconnect_perf() # reconnet from qemu self.logger.info('now reconnect from vm') - vm_tmp =3D list() for i in range(self.reconnect_times): self.dut.send_expect("killall -s INT qemu-system-x86_64", "# "= ) self.start_vms(packed=3DTrue) self.vm_testpmd_start() - vm_tmp.append(self.send_and_verify(vm_cycle, "reconnet from VM= ")) - self.vm_reconnect_data =3D dict() - for frame_size in self.frame_sizes: - size_value =3D [i[frame_size] for i in vm_tmp] - self.vm_reconnect_data[frame_size] =3D sum(size_value) / len(s= ize_value) + self.reconnect_data =3D self.send_and_verify(vm_cycle, "reconn= et from VM") + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() =20 def test_perf_packed_ring_virtio_net_reconnet_two_vms(self): """ test the iperf traffice can resume after reconnet """ self.header_row =3D ["Mode", "[M|G]bits/sec", "Cycle"] - self.res =3D dict().fromkeys(["before_relaunch", "after_relaunch"]= , list()) self.result_table_create(self.header_row) self.vm_num =3D 2 vm_cycle =3D 0 @@ -546,17 +497,15 @@ class TestPVPVhostUserReconnect(TestCase): vm_cycle =3D 1 # reconnet from vhost self.logger.info('now reconnect from vhost') - vhost_tmp =3D 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 =3D sum(vhost_tmp)/len(vhost_tmp) + self.reconnect_data =3D self.iperf_result_verify(vm_cycle, 're= connet from vhost') + self.check_reconnect_perf() =20 # reconnet from VM self.logger.info('now reconnect from vm') - vm_tmp =3D 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=3DTrue) self.config_vm_intf() self.start_iperf() - vm_tmp.append(self.iperf_result_verify(vm_cycle, 'reconnet fro= m vm')) - self.vm_reconnect_data =3D sum(vm_tmp)/len(vm_tmp) + self.reconnect_data =3D self.iperf_result_verify(vm_cycle, 're= connet from vm') + self.check_reconnect_perf() self.result_table_print() - self.check_reconnect_perf() =20 def tear_down(self): # -- 1.8.3.1