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 43994A00E6 for ; Wed, 7 Aug 2019 08:32:02 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F340E375B; Wed, 7 Aug 2019 08:32:01 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id AB0BF3576 for ; Wed, 7 Aug 2019 08:31:59 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Aug 2019 23:31:58 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,356,1559545200"; d="scan'208";a="198555690" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga004.fm.intel.com with ESMTP; 06 Aug 2019 23:31:58 -0700 Received: from fmsmsx157.amr.corp.intel.com (10.18.116.73) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 6 Aug 2019 23:31:58 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by FMSMSX157.amr.corp.intel.com (10.18.116.73) with Microsoft SMTP Server (TLS) id 14.3.439.0; Tue, 6 Aug 2019 23:31:57 -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 14:31:55 +0800 From: "Tu, Lijuan" To: "Ma, LihongX" , "dts@dpdk.org" CC: "Ma, LihongX" Thread-Topic: [dts] [PATCH V1] tests/loopback_multi_queues: update according to test plan Thread-Index: AQHVPH2yunBS8OzuKkKkv19RzvVxSabvWpRg Date: Wed, 7 Aug 2019 06:31:54 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAFEE9B@SHSMSX101.ccr.corp.intel.com> References: <1563327291-8026-1-git-send-email-lihongx.ma@intel.com> In-Reply-To: <1563327291-8026-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGNmZTY0YjItOTZmOC00MTFhLTk1MTEtNDFiM2E2NjA0MTllIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoibUQ0YWJMOVU1Wm9zdUdaXC9taklVckU3TGxjUDcwS05rUGJrRDU5NFJvTUNpZ1g0RmlxMGZMQ0lJSTdrVlwvQnhiIn0= 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_multi_queues: update according to test plan 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: Wednesday, July 17, 2019 9:35 AM > To: dts@dpdk.org > Cc: Ma, LihongX > Subject: [dts] [PATCH V1] tests/loopback_multi_queues: update according t= o > test plan >=20 > 1. remove test case of virtio1.1 inorder path 2. add 8 queues to all case= s and > check the performance value is eight times to 1 queue 3. optimization cod= e >=20 > Signed-off-by: lihong > --- > tests/TestSuite_loopback_multi_queues.py | 196 ++++++++++++++++++------- > ------ > 1 file changed, 116 insertions(+), 80 deletions(-) >=20 > diff --git a/tests/TestSuite_loopback_multi_queues.py > b/tests/TestSuite_loopback_multi_queues.py > index 5ab17fd..b6c3d25 100644 > --- a/tests/TestSuite_loopback_multi_queues.py > +++ b/tests/TestSuite_loopback_multi_queues.py > @@ -31,10 +31,9 @@ >=20 > """ > DPDK Test suite. > -Test vhost/virtio-user loopback multi-queues on 8 tx/rx path. > +Test vhost/virtio-user loopback multi-queues on 7 tx/rx path. > Includes Mergeable, Normal, Vector_RX, Inorder mergeable, -Inorder no- > mergeable, Virtio 1.1 mergeable, Virtio 1.1 no-mergeable Path, -Virtio 1.= 1 > inorder no-mergeable Path. > +Inorder no-mergeable, Virtio 1.1 mergeable, Virtio 1.1 no-mergeable Path= . > """ >=20 > import utils > @@ -50,19 +49,20 @@ class TestLoopbackMultiQueues(TestCase): > Run at the start of each test suite. > """ > self.frame_sizes =3D [64, 128, 256, 512, 1024, 1518] > - self.core_config =3D "1S/18C/1T" > - self.nb_cores =3D 2 > - self.queue_number =3D 2 > + self.verify_queue =3D [1, 8] > self.cores_num =3D len([n for n in self.dut.cores if int(n['sock= et']) =3D=3D 0]) > - self.verify(self.cores_num >=3D 18, > - "There has not enought cores to test this case") > - self.core_list =3D self.dut.get_core_list(self.core_config) > self.logger.info("you can config packet_size in file %s.cfg," % > self.suite_name + \ > "in region 'suite' like packet_sizes=3D[64, 128,= 256]") > # get the frame_sizes from cfg file > if 'packet_sizes' in self.get_suite_cfg(): > self.frame_sizes =3D self.get_suite_cfg()['packet_sizes'] >=20 > + # set diff arg about mem_socket base on socket number > + if len(set([int(core['socket']) for core in self.dut.cores])) = =3D=3D 1: > + self.socket_mem =3D '1024' > + else: > + self.socket_mem =3D '1024,1024' > + > def set_up(self): > """ > Run before each test case. > @@ -70,8 +70,9 @@ class TestLoopbackMultiQueues(TestCase): > # Prepare the result table > self.dut.send_expect("rm -rf ./vhost-net*", "#") > self.dut.send_expect("killall -s INT testpmd", "#") > - self.table_header =3D ["Frame", "Mode", "Throughput(Mpps)"] > + self.table_header =3D ["Frame", "Mode", "Throughput(Mpps)", > + "Queue Number"] > self.result_table_create(self.table_header) > + self.data_verify =3D {} >=20 > self.vhost =3D self.dut.new_session(suite=3D"vhost") > self.virtio_user =3D self.dut.new_session(suite=3D"virtio-user") > @@ -80,6 +81,11 @@ class TestLoopbackMultiQueues(TestCase): > """ > get the coremask about vhost and virito depend on the queue numb= er > """ > + self.core_config =3D "1S/%dC/1T" % (2*self.nb_cores+2) > + self.verify(self.cores_num >=3D (2*self.nb_cores+2), > + "There has not enought cores to test this case %= s" % > + self.running_case) > + self.core_list =3D self.dut.get_core_list(self.core_config) > self.core_list_user =3D self.core_list[0:self.nb_cores + 1] > self.core_list_host =3D self.core_list[self.nb_cores + 1:2 * sel= f.nb_cores + 2] > self.core_mask_user =3D utils.create_mask(self.core_list_user) > @@ -89,13 +95,13 @@ class TestLoopbackMultiQueues(TestCase): > """ > start testpmd on vhost > """ > - command_line_client =3D self.dut.target + "/app/testpmd -n %d -c= %s -- > socket-mem 1024,1024" + \ > + command_line_client =3D self.dut.target + "/app/testpmd -n %d -c > + %s --socket-mem %s" + \ > " --legacy-mem --no-pci --file-prefix=3Dvh= ost --vdev " + \ > "'net_vhost0,iface=3Dvhost-net,queues=3D%d= ' -- -i --nb- > cores=3D%d " + \ > "--rxq=3D%d --txq=3D%d --txd=3D1024 --rxd= =3D1024" > command_line_client =3D command_line_client % ( > - self.dut.get_memory_channels(), self.core_mask_host, > self.queue_number, > - self.nb_cores, self.queue_number, self.queue_number) > + self.dut.get_memory_channels(), self.core_mask_host, > self.socket_mem, > + self.queue_number, self.nb_cores, self.queue_number, > + self.queue_number) > self.vhost.send_expect(command_line_client, "testpmd> ", 120) > self.vhost.send_expect("set fwd mac", "testpmd> ", 120) >=20 > @@ -104,12 +110,13 @@ class TestLoopbackMultiQueues(TestCase): > start testpmd on virtio > """ > command_line_user =3D self.dut.target + "/app/testpmd -n %d -c %= s " + \ > - " --socket-mem 1024,1024 --legacy-mem --no-p= ci --file- > prefix=3Dvirtio " + \ > + " --socket-mem %s --legacy-mem --no-pci > + --file-prefix=3Dvirtio " + \ > "-- > vdev=3Dnet_virtio_user0,mac=3D00:01:02:03:04:05,path=3D./vhost- > net,queues=3D%d,%s " + \ > "-- -i %s --rss-ip --nb-cores=3D%d --rxq=3D%= d --txq=3D%d --txd=3D1024 > --rxd=3D1024" > command_line_user =3D command_line_user % ( > - self.dut.get_memory_channels(), self.core_mask_user, > self.queue_number, > - args["version"], args["path"], self.nb_cores, self.queue_num= ber, > self.queue_number) > + self.dut.get_memory_channels(), self.core_mask_user, > self.socket_mem, > + self.queue_number, args["version"], args["path"], self.nb_co= res, > + 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) > self.virtio_user.send_expect("start", "testpmd> ", 120) @@ -134,= 8 > +141,13 @@ class TestLoopbackMultiQueues(TestCase): > results_row =3D [frame_size] > results_row.append(case_info) > results_row.append(Mpps) > + results_row.append(self.queue_number) > self.result_table_add(results_row) >=20 > + # recording the value of 64 packet_size > + if frame_size =3D=3D 64: > + self.data_verify['queue%d-64' % self.queue_number] =3D Mpps > + > def check_packets_of_each_queue(self, frame_size): > """ > check each queue has receive packets @@ -165,8 +177,18 @@ class > TestLoopbackMultiQueues(TestCase): > self.vhost.send_expect("start tx_first 32", "testpmd> ", 30) > Mpps =3D self.calculate_avg_throughput() > self.update_result_table(frame_size, case_info, Mpps) > - self.check_packets_of_each_queue(frame_size) > - self.result_table_print() > + if self.queue_number > 1: > + self.check_packets_of_each_queue(frame_size) > + > + def verify_liner_for_multi_queue(self): > + """ > + verify the Mpps of 8 queues is eight times of 1 queue > + and allow 0.1 drop for 8 queues > + """ > + if self.data_verify: > + drop =3D self.data_verify['queue1-64']*8*(0.1) > + self.verify(self.data_verify['queue8-64'] >=3D self.data_ver= ify['queue1- > 64']*8 - drop, > + 'The data of multiqueue is not linear for %s' % > + self.running_case) >=20 > def close_all_testpmd(self): > """ > @@ -188,13 +210,17 @@ class TestLoopbackMultiQueues(TestCase): > """ > virtio_pmd_arg =3D {"version": "in_order=3D0,packed_vq=3D1,mrg_r= xbuf=3D1", > "path": "--tx-offloads=3D0x0 --enable-hw-vla= n-strip"} > - self.nb_cores =3D 2 > - self.queue_number =3D 2 > - self.get_core_mask() > - self.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virtio_1.1 mergeable on") > - self.close_all_testpmd() > + for i in self.verify_queue: > + self.nb_cores =3D i > + self.queue_number =3D i > + self.get_core_mask() > + self.start_vhost_testpmd() > + self.start_virtio_testpmd(virtio_pmd_arg) > + self.send_and_verify("virtio_1.1 mergeable on") > + self.close_all_testpmd() > + > + self.result_table_print() > + self.verify_liner_for_multi_queue() >=20 > def test_loopback_multi_queue_virtio11_normal(self): > """ > @@ -202,27 +228,17 @@ class TestLoopbackMultiQueues(TestCase): > """ > virtio_pmd_arg =3D {"version": "in_order=3D0,packed_vq=3D1,mrg_r= xbuf=3D0", > "path": "--tx-offloads=3D0x0 --enable-hw-vla= n-strip"} > - self.nb_cores =3D 2 > - self.queue_number =3D 2 > - self.get_core_mask() > - self.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virtio_1.1 normal") > - self.close_all_testpmd() > + for i in self.verify_queue: > + self.nb_cores =3D i > + self.queue_number =3D i > + self.get_core_mask() > + self.start_vhost_testpmd() > + self.start_virtio_testpmd(virtio_pmd_arg) > + self.send_and_verify("virtio_1.1 normal") > + self.close_all_testpmd() >=20 > - def test_loopback_multi_queue_virtio11_inorder(self): > - """ > - performance for Vhost PVP virtio1.1 inorder Path. > - """ > - virtio_pmd_arg =3D {"version": "in_order=3D1,packed_vq=3D1,mrg_r= xbuf=3D0", > - "path": "--tx-offloads=3D0x0 --enable-hw-vla= n-strip"} > - self.nb_cores =3D 2 > - self.queue_number =3D 2 > - self.get_core_mask() > - self.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virtio_1.1 inorder") > - self.close_all_testpmd() > + self.result_table_print() > + self.verify_liner_for_multi_queue() >=20 > def test_loopback_multi_queue_inorder_mergeable(self): > """ > @@ -230,13 +246,17 @@ class TestLoopbackMultiQueues(TestCase): > """ > virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D1,mrg_r= xbuf=3D1", > "path": "--tx-offloads=3D0x0 --enable-hw-vla= n-strip"} > - self.nb_cores =3D 2 > - self.queue_number =3D 2 > - self.get_core_mask() > - self.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("inoder mergeable on") > - self.close_all_testpmd() > + for i in self.verify_queue: > + self.nb_cores =3D i > + self.queue_number =3D i > + self.get_core_mask() > + self.start_vhost_testpmd() > + self.start_virtio_testpmd(virtio_pmd_arg) > + self.send_and_verify("inoder mergeable on") > + self.close_all_testpmd() > + > + self.result_table_print() > + self.verify_liner_for_multi_queue() >=20 > def test_loopback_multi_queue_inorder_no_mergeable(self): > """ > @@ -244,13 +264,17 @@ class TestLoopbackMultiQueues(TestCase): > """ > virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D1,mrg_r= xbuf=3D0", > "path": "--tx-offloads=3D0x0 --enable-hw-vlan-st= rip"} > - self.nb_cores =3D 2 > - self.queue_number =3D 2 > - self.get_core_mask() > - self.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("inoder mergeable off") > - self.close_all_testpmd() > + for i in self.verify_queue: > + self.nb_cores =3D i > + self.queue_number =3D i > + self.get_core_mask() > + self.start_vhost_testpmd() > + self.start_virtio_testpmd(virtio_pmd_arg) > + self.send_and_verify("inoder mergeable off") > + self.close_all_testpmd() > + > + self.result_table_print() > + self.verify_liner_for_multi_queue() >=20 > def test_loopback_mulit_queue_mergeable(self): > """ > @@ -258,13 +282,17 @@ class TestLoopbackMultiQueues(TestCase): > """ > virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D0,mrg_r= xbuf=3D1", > "path": "--tx-offloads=3D0x0 --enable-hw-vla= n-strip"} > - self.nb_cores =3D 8 > - self.queue_number =3D 8 > - self.get_core_mask() > - self.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virito mergeable") > - self.close_all_testpmd() > + for i in self.verify_queue: > + self.nb_cores =3D i > + self.queue_number =3D i > + self.get_core_mask() > + self.start_vhost_testpmd() > + self.start_virtio_testpmd(virtio_pmd_arg) > + self.send_and_verify("virito mergeable") > + self.close_all_testpmd() > + > + self.result_table_print() > + self.verify_liner_for_multi_queue() >=20 > def test_loopback_multi_queue_normal(self): > """ > @@ -272,13 +300,17 @@ class TestLoopbackMultiQueues(TestCase): > """ > virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D0,mrg_r= xbuf=3D0", > "path": "--tx-offloads=3D0x0 --enable-hw-vla= n-strip"} > - self.nb_cores =3D 8 > - self.queue_number =3D 8 > - self.get_core_mask() > - self.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virtio normal") > - self.close_all_testpmd() > + for i in self.verify_queue: > + self.nb_cores =3D i > + self.queue_number =3D i > + self.get_core_mask() > + self.start_vhost_testpmd() > + self.start_virtio_testpmd(virtio_pmd_arg) > + self.send_and_verify("virtio normal") > + self.close_all_testpmd() > + > + self.result_table_print() > + self.verify_liner_for_multi_queue() >=20 > def test_loopback_multi_queue_vector_rx(self): > """ > @@ -286,13 +318,17 @@ class TestLoopbackMultiQueues(TestCase): > """ > virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D0,mrg_r= xbuf=3D0", > "path": "--tx-offloads=3D0x0"} > - self.nb_cores =3D 8 > - self.queue_number =3D 8 > - self.get_core_mask() > - self.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virito vector rx") > - self.close_all_testpmd() > + for i in self.verify_queue: > + self.nb_cores =3D i > + self.queue_number =3D i > + self.get_core_mask() > + self.start_vhost_testpmd() > + self.start_virtio_testpmd(virtio_pmd_arg) > + self.send_and_verify("virito vector rx") > + self.close_all_testpmd() > + > + self.result_table_print() > + self.verify_liner_for_multi_queue() >=20 > def tear_down(self): > """ > -- > 2.7.4