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 7516AA00E6 for ; Wed, 7 Aug 2019 05:38:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6CD1A4C91; Wed, 7 Aug 2019 05:38:04 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 25D894C88 for ; Wed, 7 Aug 2019 05:38:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2019 20:38:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,356,1559545200"; d="scan'208";a="258230012" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga001.jf.intel.com with ESMTP; 06 Aug 2019 20:38:01 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 6 Aug 2019 20:38:01 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX126.amr.corp.intel.com (10.18.125.43) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 6 Aug 2019 20:38:00 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.80]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.139]) with mapi id 14.03.0439.000; Wed, 7 Aug 2019 11:37:59 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] tests/loopback_virtio_user_server_mode: update cases according to testplan Thread-Index: AQHVOuv2cluz5RhljUWf834df/jZuKbvLR9Q Date: Wed, 7 Aug 2019 03:37:58 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAFEC4D@SHSMSX101.ccr.corp.intel.com> References: <1563154750-2532-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1563154750-2532-1-git-send-email-lihongx.ma@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-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYmZlOTYyMWQtYTQ4Yi00YjIwLWE0MjItZjdiYmJiMjU4N2YyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiWGUzS3VPYkI5RTl5NVhnTktCWXMxVGVNeUJFZTc4dHJCYUtSaWs1Q3VSQW9OYWdwNXdYWkhyVFJ5TWFIaEFFQyJ9 x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/loopback_virtio_user_server_mode: update cases according to testplan 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, thanks > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of lihong > Sent: Monday, July 15, 2019 9:39 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts] [PATCH V1] tests/loopback_virtio_user_server_mode: update > cases according to testplan >=20 > 1. add path for virtio user server mode > 2. all reconnet case add behavior of reconnet from vhost, reconnet from > virtio and port restart >=20 > Signed-off-by: lihong > --- > .../TestSuite_loopback_virtio_user_server_mode.py | 235 > ++++++++++++++++++--- > 1 file changed, 200 insertions(+), 35 deletions(-) >=20 > diff --git a/tests/TestSuite_loopback_virtio_user_server_mode.py > b/tests/TestSuite_loopback_virtio_user_server_mode.py > index d6bff6a..fd4b807 100644 > --- a/tests/TestSuite_loopback_virtio_user_server_mode.py > +++ b/tests/TestSuite_loopback_virtio_user_server_mode.py > @@ -68,7 +68,8 @@ class TestLoopbackVirtioUserServerMode(TestCase): > self.dut.send_expect("rm -rf ./vhost-net*", "#") > self.dut.send_expect("killall -s INT testpmd", "#") > # Prepare the result table > - self.table_header =3D ["Mode", "Throughput(Mpps)", "Cycle"] > + self.table_header =3D ["Mode", "Pkt_size", "Throughput(Mpps)", > + "Queue Number", "Cycle"] > self.result_table_create(self.table_header) >=20 > self.vhost =3D self.dut.new_session(suite=3D"vhost") > @@ -115,10 +116,10 @@ class > TestLoopbackVirtioUserServerMode(TestCase): > command_line_user =3D self.dut.target + "/app/testpmd -n %d -c %= s -- > socket-mem 1024,1024 " + \ > "--legacy-mem --no-pci --file-prefix=3Dvirti= o " + \ > "-- > vdev=3Dnet_virtio_user0,mac=3D00:01:02:03:04:05,path=3Dvhost- > net,server=3D1,queues=3D%d,%s " + \ > - " -- -i --tx-offloads=3D0x0 --enable-hw-vlan= -strip --rss-ip --nb- > cores=3D%d --rxq=3D%d --txq=3D%d %s" > + " -- -i %s --nb-cores=3D%d --rxq=3D%d --txq= =3D%d" > command_line_user =3D command_line_user % > (self.dut.get_memory_channels(), > - self.core_mask_user, self.queue_number, mode= , > self.nb_cores, > - self.queue_number, self.queue_number, extern= _params) > + self.core_mask_user, self.queue_number, mode= , > extern_params, > + self.nb_cores, self.queue_number, > + self.queue_number) > self.virtio_user.send_expect(command_line_user, "testpmd> ", 120= ) > self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120) >=20 > @@ -202,7 +203,9 @@ class TestLoopbackVirtioUserServerMode(TestCase): > self.verify(Mpps > 0, "port can not receive packets") >=20 > results_row.append(case_info) > + results_row.append('64') > results_row.append(Mpps) > + results_row.append(self.queue_number) > results_row.append(cycle) > self.result_table_add(results_row) >=20 > @@ -262,85 +265,247 @@ class > TestLoopbackVirtioUserServerMode(TestCase): > self.result_table_print() > self.close_all_testpmd() >=20 > - def > test_server_mode_multi_queue_reconnect_from_vhost_side_with_virtio11(s > elf): > + def test_server_mode_reconnect_with_virtio11_mergeable_path(self): > """ > - reconnect virtio-user from the vhost side with multi_queues > + reconnect test with virtio 1.1 mergeable path and server mode > """ > self.queue_number =3D 2 > self.nb_cores =3D 2 > + case_info =3D 'virtio1.1 mergeable path' > mode =3D "packed_vq=3D1,in_order=3D0,mrg_rxbuf=3D1" > + extern_params =3D '--tx-offloads=3D0x0 --enable-hw-vlan-strip --= rss-ip' > self.lanuch_vhost_testpmd_with_multi_queue() > - self.lanuch_virtio_user_testpmd_with_multi_queue(mode=3Dmode) > + self.lanuch_virtio_user_testpmd_with_multi_queue(mode=3Dmode, > + extern_params=3Dextern_params) > self.start_to_send_packets(self.vhost, self.virtio_user) > - self.calculate_avg_throughput("reconnet from vhost with virtio1.= 1", > - "before reconnet") > + self.calculate_avg_throughput(case_info, "before reconnet") >=20 > + # reconnect from vhost > + self.logger.info('now reconnet from vhost') > self.relanuch_vhost_testpmd_with_multi_queue() > self.start_to_send_packets(self.virtio_user, self.vhost) > - self.calculate_avg_throughput("reconnet from vhost with virtio1.= 1", > - "after reconnet") > + self.calculate_avg_throughput(case_info, "reconnet from vhost") > + > + # reconnet from virtio > + self.logger.info('now reconnet from virtio_user') > + self.relanuch_virtio_testpmd_with_multi_queue(mode=3Dmode, > extern_params=3Dextern_params) > + self.start_to_send_packets(self.vhost, self.virtio_user) > + self.calculate_avg_throughput(case_info, "reconnet from virtio > + user") > + > + # port restart > + self.logger.info('now vhost port restart') > + self.port_restart() > + self.calculate_avg_throughput(case_info, "after port restart") > + > self.result_table_print() > self.check_packets_of_each_queue() > self.close_all_testpmd() >=20 > - def > test_server_mode_multi_queue_reconnect_from_vhost_side_with_virtio10(s > elf): > + def test_server_mode_reconnect_with_virtio11_normal_path(self): > """ > - reconnect virtio-user from the vhost side with multi_queues > + reconnect test with virtio 1.1 normal path and server mode > """ > self.queue_number =3D 2 > self.nb_cores =3D 2 > - mode =3D "packed_vq=3D0,in_order=3D1,mrg_rxbuf=3D1" > + case_info =3D 'virtio1.1 normal path' > + mode =3D "packed_vq=3D1,in_order=3D0,mrg_rxbuf=3D0" > + extern_params =3D '--tx-offloads=3D0x0 --enable-hw-vlan-strip --= rss-ip' > self.lanuch_vhost_testpmd_with_multi_queue() > - self.lanuch_virtio_user_testpmd_with_multi_queue(mode=3Dmode) > + self.lanuch_virtio_user_testpmd_with_multi_queue(mode=3Dmode, > + extern_params=3Dextern_params) > self.start_to_send_packets(self.vhost, self.virtio_user) > - self.calculate_avg_throughput("reconnet from vhost with virtio1.= 0", > - "before reconnet") > + self.calculate_avg_throughput(case_info, "before reconnet") >=20 > + # reconnect from vhost > + self.logger.info('now reconnet from vhost') > self.relanuch_vhost_testpmd_with_multi_queue() > self.start_to_send_packets(self.virtio_user, self.vhost) > - self.calculate_avg_throughput("reconnet from vhost with virtio1.= 0", > - "after reconnet") > + self.calculate_avg_throughput(case_info, "reconnet from vhost") > + > + # reconnet from virtio > + self.logger.info('now reconnet from virtio_user') > + self.relanuch_virtio_testpmd_with_multi_queue(mode=3Dmode, > extern_params=3Dextern_params) > + self.start_to_send_packets(self.vhost, self.virtio_user) > + self.calculate_avg_throughput(case_info, "reconnet from > + virtio_user") > + > + # port restart > + self.logger.info('now vhost port restart') > + self.port_restart() > + self.calculate_avg_throughput(case_info, "after port restart") > + > self.result_table_print() > self.check_packets_of_each_queue() > self.close_all_testpmd() >=20 > - def > test_server_mode_multi_queue_reconnect_from_virito_side_with_virtio10(s > elf): > + def > test_server_mode_reconnect_with_virtio10_inorder_mergeable_path(self): > """ > - reconnect vhost-user from the virtio side with vhost/virtio1.0 l= oopback > multi_queues > + reconnect test with virtio 1.0 inorder mergeable path and > + server mode > """ > self.queue_number =3D 2 > self.nb_cores =3D 2 > - mode =3D "packed_vq=3D0,in_order=3D1,mrg_rxbuf=3D1" > + case_info =3D 'virtio1.0 inorder mergeable path' > + mode =3D "in_order=3D1,mrg_rxbuf=3D1" > + extern_params =3D '--tx-offloads=3D0x0 --enable-hw-vlan-strip --= rss-ip' > self.lanuch_vhost_testpmd_with_multi_queue() > - self.lanuch_virtio_user_testpmd_with_multi_queue(mode=3Dmode) > + self.lanuch_virtio_user_testpmd_with_multi_queue(mode=3Dmode, > + extern_params=3Dextern_params) > self.start_to_send_packets(self.vhost, self.virtio_user) > - self.calculate_avg_throughput("reconnet from virito with virtio1= .0", > - "before reconnet") > + self.calculate_avg_throughput(case_info, "before reconnet") >=20 > - self.relanuch_virtio_testpmd_with_multi_queue(mode=3Dmode) > + # reconnet from vhost > + self.logger.info('now reconnet from vhost') > + self.relanuch_vhost_testpmd_with_multi_queue() > + self.start_to_send_packets(self.virtio_user, self.vhost) > + self.calculate_avg_throughput(case_info, "reconnet from vhost") > + > + # reconnet from virtio > + self.logger.info('now reconnet from virtio_user') > + self.relanuch_virtio_testpmd_with_multi_queue(mode=3Dmode, > + extern_params=3Dextern_params) > self.start_to_send_packets(self.vhost, self.virtio_user) > - self.calculate_avg_throughput("reconnet from virito with virtio1= .0", > - "after reconnet") > + self.calculate_avg_throughput(case_info, "reconnet from > + virtio_user") > + > + # port restart > + self.logger.info('now vhost port restart') > + self.port_restart() > + self.calculate_avg_throughput(case_info, "after port restart") > + > self.result_table_print() > + self.check_packets_of_each_queue() > self.close_all_testpmd() >=20 > - def test_server_mode_port_start_stop_at_vhost(self): > + def > test_server_mode_reconnect_with_virtio10_inorder_no_mergeable_path(sel > f): > """ > - port start/stop at vhost side with server mode multi queues > + reconnect test with virtio 1.0 inorder no_mergeable path and > + server mode > """ > self.queue_number =3D 2 > self.nb_cores =3D 2 > - mode =3D "packed_vq=3D1,in_order=3D0,mrg_rxbuf=3D1" > - extern_params =3D "--txd=3D1024 --rxd=3D1024" > - > self.lanuch_vhost_testpmd_with_multi_queue(extern_params=3Dextern_para > ms) > + case_info =3D 'virtio1.0 inorder no_mergeable path' > + mode =3D "in_order=3D1,mrg_rxbuf=3D0" > + extern_params =3D '--tx-offloads=3D0x0 --enable-hw-vlan-strip --= rss-ip' > + self.lanuch_vhost_testpmd_with_multi_queue() > self.lanuch_virtio_user_testpmd_with_multi_queue(mode=3Dmode, > extern_params=3Dextern_params) > self.start_to_send_packets(self.vhost, self.virtio_user) > - self.calculate_avg_throughput("vhost port restart", "before rest= art") > + self.calculate_avg_throughput(case_info, "before reconnet") > + > + # reconnet from vhost > + self.logger.info('now reconnet from vhost') > + self.relanuch_vhost_testpmd_with_multi_queue() > + self.start_to_send_packets(self.virtio_user, self.vhost) > + self.calculate_avg_throughput(case_info, "reconnet from vhost") >=20 > + # reconnet from virtio > + self.logger.info('now reconnet from virtio_user') > + self.relanuch_virtio_testpmd_with_multi_queue(mode=3Dmode, > extern_params=3Dextern_params) > + self.start_to_send_packets(self.vhost, self.virtio_user) > + self.calculate_avg_throughput(case_info, "reconnet from > + virtio_user") > + > + # port restart > + self.logger.info('now vhost port restart') > self.port_restart() > - self.calculate_avg_throughput("vhost port restart", "after resta= rt") > + self.calculate_avg_throughput(case_info, "after port restart") > + > self.result_table_print() > + self.check_packets_of_each_queue() > + self.close_all_testpmd() > + > + def test_server_mode_reconnect_with_virtio10_mergeable_path(self): > + """ > + reconnect test with virtio 1.0 mergeable path and server mode > + """ > + self.queue_number =3D 2 > + self.nb_cores =3D 2 > + case_info =3D 'virtio1.0 mergeable path' > + mode =3D "in_order=3D0,mrg_rxbuf=3D1" > + extern_params =3D '--tx-offloads=3D0x0 --enable-hw-vlan-strip --= rss-ip' > + self.lanuch_vhost_testpmd_with_multi_queue() > + self.lanuch_virtio_user_testpmd_with_multi_queue(mode=3Dmode, > extern_params=3Dextern_params) > + self.start_to_send_packets(self.vhost, self.virtio_user) > + self.calculate_avg_throughput(case_info, "before reconnet") > + > + # reconnet from vhost > + self.logger.info('now reconnet from vhost') > + self.relanuch_vhost_testpmd_with_multi_queue() > + self.start_to_send_packets(self.virtio_user, self.vhost) > + self.calculate_avg_throughput(case_info, "reconnet from vhost") >=20 > + # reconnet from virtio > + self.logger.info('now reconnet from virtio_user') > + self.relanuch_virtio_testpmd_with_multi_queue(mode=3Dmode, > extern_params=3Dextern_params) > + self.start_to_send_packets(self.vhost, self.virtio_user) > + self.calculate_avg_throughput(case_info, "reconnet from > + virtio_user") > + > + # port restart > + self.logger.info('now vhost port restart') > + self.port_restart() > + self.calculate_avg_throughput(case_info, "after port restart") > + > + self.result_table_print() > + self.check_packets_of_each_queue() > + self.close_all_testpmd() > + > + def test_server_mode_reconnect_with_virtio10_normal_path(self): > + """ > + reconnect test with virtio 1.0 normal path and server mode > + """ > + self.queue_number =3D 2 > + self.nb_cores =3D 2 > + case_info =3D 'virtio1.0 normal path' > + mode =3D "in_order=3D0,mrg_rxbuf=3D0" > + extern_params =3D '--tx-offloads=3D0x0 --enable-hw-vlan-strip --= rss-ip' > + self.lanuch_vhost_testpmd_with_multi_queue() > + self.lanuch_virtio_user_testpmd_with_multi_queue(mode=3Dmode, > extern_params=3Dextern_params) > + self.start_to_send_packets(self.vhost, self.virtio_user) > + self.calculate_avg_throughput(case_info, "before reconnet") > + > + # reconnet from vhost > + self.logger.info('now reconnet from vhost') > + self.relanuch_vhost_testpmd_with_multi_queue() > + self.start_to_send_packets(self.virtio_user, self.vhost) > + self.calculate_avg_throughput(case_info, "reconnet from vhost") > + > + # reconnet from virtio > + self.logger.info('now reconnet from virtio_user') > + self.relanuch_virtio_testpmd_with_multi_queue(mode=3Dmode, > extern_params=3Dextern_params) > + self.start_to_send_packets(self.vhost, self.virtio_user) > + self.calculate_avg_throughput(case_info, "reconnet from > + virtio_user") > + > + # port restart > + self.logger.info('now vhost port restart') > + self.port_restart() > + self.calculate_avg_throughput(case_info, "after port restart") > + > + self.result_table_print() > + self.check_packets_of_each_queue() > + self.close_all_testpmd() > + > + def test_server_mode_reconnect_with_virtio10_vector_rx_path(self): > + """ > + reconnect test with virtio 1.0 vector_rx path and server mode > + """ > + self.queue_number =3D 2 > + self.nb_cores =3D 2 > + case_info =3D 'virtio1.0 vector_rx path' > + mode =3D "in_order=3D0,mrg_rxbuf=3D0" > + self.lanuch_vhost_testpmd_with_multi_queue() > + self.lanuch_virtio_user_testpmd_with_multi_queue(mode=3Dmode) > + self.start_to_send_packets(self.vhost, self.virtio_user) > + self.calculate_avg_throughput(case_info, "before reconnet") > + > + # reconnet from vhost > + self.logger.info('now reconnet from vhost') > + self.relanuch_vhost_testpmd_with_multi_queue() > + self.start_to_send_packets(self.virtio_user, self.vhost) > + self.calculate_avg_throughput(case_info, "reconnet from vhost") > + > + # reconnet from virtio > + self.logger.info('now reconnet from virtio_user') > + self.relanuch_virtio_testpmd_with_multi_queue(mode=3Dmode) > + self.start_to_send_packets(self.vhost, self.virtio_user) > + self.calculate_avg_throughput(case_info, "reconnet from > + virtio_user") > + > + # port restart > + self.logger.info('now vhost port restart') > + self.port_restart() > + self.calculate_avg_throughput(case_info, "after port restart") > + > + self.result_table_print() > self.check_packets_of_each_queue() > self.close_all_testpmd() >=20 > -- > 2.7.4