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 C2F69A0567; Fri, 13 Mar 2020 07:29:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B5E701C02A; Fri, 13 Mar 2020 07:29:50 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 187801C01E for ; Fri, 13 Mar 2020 07:29:48 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Mar 2020 23:29:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,547,1574150400"; d="scan'208";a="322705562" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga001.jf.intel.com with ESMTP; 12 Mar 2020 23:29:47 -0700 Received: from fmsmsx122.amr.corp.intel.com (10.18.125.37) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Mar 2020 23:29:47 -0700 Received: from shsmsx152.ccr.corp.intel.com (10.239.6.52) by fmsmsx122.amr.corp.intel.com (10.18.125.37) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 12 Mar 2020 23:29:47 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.43]) by SHSMSX152.ccr.corp.intel.com ([169.254.6.155]) with mapi id 14.03.0439.000; Fri, 13 Mar 2020 14:29:44 +0800 From: "Tu, Lijuan" To: "Wang, Yinan" , "dts@dpdk.org" CC: "Wang, Yinan" Thread-Topic: [dts] [PATCH v1] tests: add packed ring test for loopback_virtio_user_server_mode Thread-Index: AQHV8qzgG9QQRb4TNEqCvSRF8WZVz6hGHDSg Date: Fri, 13 Mar 2020 06:29:44 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBEC705@SHSMSX101.ccr.corp.intel.com> References: <20200304220804.8520-1-yinan.wang@intel.com> In-Reply-To: <20200304220804.8520-1-yinan.wang@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="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH v1] tests: add packed ring test for loopback_virtio_user_server_mode 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 Yinan > Sent: Thursday, March 5, 2020 6:08 AM > To: dts@dpdk.org > Cc: Wang, Yinan > Subject: [dts] [PATCH v1] tests: add packed ring test for > loopback_virtio_user_server_mode >=20 > From: Wang Yinan >=20 > Signed-off-by: Wang Yinan > --- > ...tSuite_loopback_virtio_user_server_mode.py | 110 +++++++++++++++--- > 1 file changed, 92 insertions(+), 18 deletions(-) >=20 > diff --git a/tests/TestSuite_loopback_virtio_user_server_mode.py > b/tests/TestSuite_loopback_virtio_user_server_mode.py > index ec4dfc1..b3a73af 100644 > --- a/tests/TestSuite_loopback_virtio_user_server_mode.py > +++ b/tests/TestSuite_loopback_virtio_user_server_mode.py > @@ -82,11 +82,11 @@ class TestLoopbackVirtioUserServerMode(TestCase): > self.vhost.send_expect(command_line_client, "testpmd> ", 120) > self.vhost.send_expect("set fwd mac", "testpmd> ", 120) >=20 > - def lanuch_virtio_user_testpmd(self): > + def lanuch_virtio_user_testpmd(self, args): > """ > start testpmd of vhost user > """ > - eal_param =3D self.dut.create_eal_parameters(cores=3Dself.core_l= ist_user, > prefix=3D'virtio', no_pci=3DTrue, > vdevs=3D['net_virtio_user0,mac=3D00:01:02:03:04:05,path=3Dvhost- > net,server=3D1,queues=3D1']) > + eal_param =3D > + self.dut.create_eal_parameters(cores=3Dself.core_list_user, > + prefix=3D'virtio', no_pci=3DTrue, > + vdevs=3D['net_virtio_user0,mac=3D00:01:02:03:04:05,path=3Dvhost-net,ser= ver=3D1 > + ,queues=3D1,%s' % args["version"]]) > command_line_user =3D self.dut.target + "/app/testpmd " + eal_pa= ram + " > -- -i --rxq=3D1 --txq=3D1 --no-numa" > self.virtio_user.send_expect(command_line_user, "testpmd> ", 120= ) > self.virtio_user.send_expect("set fwd mac", "testpmd> ", 120) @@= - > 222,26 +222,30 @@ class TestLoopbackVirtioUserServerMode(TestCase): > self.dut.close_session(self.vhost) > self.dut.close_session(self.virtio_user) >=20 > - def test_server_mode_launch_vhost_first(self): > + def test_server_mode_launch_virtio_first(self): > """ > - basic test for virtio-user server mode, launch vhost first > + basic test for virtio-user server mode, launch virtio-user > + first > """ > self.queue_number =3D 1 > self.nb_cores =3D 1 > + virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D0,mrg_r= xbuf=3D1", > + "path": "--tx-offloads=3D0x0 --enable-hw-vlan-= strip"} > + self.lanuch_virtio_user_testpmd(virtio_pmd_arg) > self.lanuch_vhost_testpmd() > - self.lanuch_virtio_user_testpmd() > - self.start_to_send_packets(self.vhost, self.virtio_user) > - self.calculate_avg_throughput("lanuch vhost first", "") > + self.start_to_send_packets(self.virtio_user, self.vhost) > + self.calculate_avg_throughput("lanuch virtio first", "") > self.result_table_print() > self.close_all_testpmd() >=20 > - def test_server_mode_launch_virtio_first(self): > + def test_server_mode_launch_virtio11_first(self): > """ > basic test for virtio-user server mode, launch virtio-user first > """ > self.queue_number =3D 1 > self.nb_cores =3D 1 > - self.lanuch_virtio_user_testpmd() > + virtio_pmd_arg =3D {"version": "packed_vq=3D1,in_order=3D0,mrg_r= xbuf=3D1", > + "path": "--tx-offloads=3D0x0 --enable-hw-vlan-= strip"} > + self.lanuch_virtio_user_testpmd(virtio_pmd_arg) > self.lanuch_vhost_testpmd() > self.start_to_send_packets(self.virtio_user, self.vhost) > self.calculate_avg_throughput("lanuch virtio first", "") @@ -283= ,13 > +287,13 @@ class TestLoopbackVirtioUserServerMode(TestCase): > self.check_packets_of_each_queue() > self.close_all_testpmd() >=20 > - def test_server_mode_reconnect_with_virtio11_normal_path(self): > + def > test_server_mode_reconnect_with_virtio11_non_mergeable_path(self): > """ > - reconnect test with virtio 1.1 normal path and server mode > + reconnect test with virtio 1.1 non_mergeable path and server > + mode > """ > self.queue_number =3D 2 > self.nb_cores =3D 2 > - case_info =3D 'virtio1.1 normal path' > + case_info =3D 'virtio1.1 non_mergeable 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() > @@ -318,6 +322,76 @@ class TestLoopbackVirtioUserServerMode(TestCase): > self.check_packets_of_each_queue() > self.close_all_testpmd() >=20 > + def > test_server_mode_reconnect_with_virtio11_inorder_mergeable_path(self): > + """ > + reconnect test with virtio 1.1 inorder mergeable path and server= mode > + """ > + self.queue_number =3D 2 > + self.nb_cores =3D 2 > + case_info =3D 'virtio1.1 inorder mergeable path' > + mode =3D "packed_vq=3D1,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, > extern_params=3Dextern_params) > + self.start_to_send_packets(self.vhost, self.virtio_user) > + self.calculate_avg_throughput(case_info, "before reconnet") > + > + # 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(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_virtio11_inorder_non_mergeable_path(s > elf): > + """ > + reconnect test with virtio 1.1 inorder non_mergeable path and se= rver > mode > + """ > + self.queue_number =3D 2 > + self.nb_cores =3D 2 > + case_info =3D 'virtio1.1 non_mergeable path' > + mode =3D "packed_vq=3D1,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(case_info, "before reconnet") > + > + # 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(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_inorder_mergeable_path(self): > """ > reconnect test with virtio 1.0 inorder mergeable path and server= mode > @@ -353,13 +427,13 @@ class > TestLoopbackVirtioUserServerMode(TestCase): > self.check_packets_of_each_queue() > self.close_all_testpmd() >=20 > - def > test_server_mode_reconnect_with_virtio10_inorder_no_mergeable_path(se > lf): > + def > test_server_mode_reconnect_with_virtio10_inorder_non_mergeable_path(s > elf): > """ > - reconnect test with virtio 1.0 inorder no_mergeable path and ser= ver > mode > + reconnect test with virtio 1.0 inorder non_mergeable path and > + server mode > """ > self.queue_number =3D 2 > self.nb_cores =3D 2 > - case_info =3D 'virtio1.0 inorder no_mergeable path' > + case_info =3D 'virtio1.0 inorder non_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() > @@ -423,13 +497,13 @@ class > TestLoopbackVirtioUserServerMode(TestCase): > self.check_packets_of_each_queue() > self.close_all_testpmd() >=20 > - def test_server_mode_reconnect_with_virtio10_normal_path(self): > + def > test_server_mode_reconnect_with_virtio10_non_mergeable_path(self): > """ > - reconnect test with virtio 1.0 normal path and server mode > + reconnect test with virtio 1.0 non_mergeable path and server > + mode > """ > self.queue_number =3D 2 > self.nb_cores =3D 2 > - case_info =3D 'virtio1.0 normal path' > + case_info =3D 'virtio1.0 non_mergeable 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() > -- > 2.17.1