From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6FBD1A0C4B; Mon, 12 Jul 2021 07:06:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37A1540685; Mon, 12 Jul 2021 07:06:15 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id C6CF44003C for ; Mon, 12 Jul 2021 07:06:11 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10042"; a="271036030" X-IronPort-AV: E=Sophos;i="5.84,232,1620716400"; d="scan'208";a="271036030" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jul 2021 22:06:06 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,232,1620716400"; d="scan'208";a="451241395" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga007.jf.intel.com with ESMTP; 11 Jul 2021 22:06:06 -0700 Received: from shsmsx606.ccr.corp.intel.com (10.109.6.216) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Sun, 11 Jul 2021 22:06:05 -0700 Received: from shsmsx601.ccr.corp.intel.com (10.109.6.141) by SHSMSX606.ccr.corp.intel.com (10.109.6.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.10; Mon, 12 Jul 2021 13:06:03 +0800 Received: from shsmsx601.ccr.corp.intel.com ([10.109.6.141]) by SHSMSX601.ccr.corp.intel.com ([10.109.6.141]) with mapi id 15.01.2242.010; Mon, 12 Jul 2021 13:06:03 +0800 From: "Tu, Lijuan" To: "Yang, LeweiX" , "dts@dpdk.org" CC: "Yang, LeweiX" Thread-Topic: [dts] [PATCH V1] tests/TestSuite_vhost_cbdma:change cases about cbdma Thread-Index: AQHXckqEhq5Wb9Zw50uYFNL24i3Maqs+0K8A Date: Mon, 12 Jul 2021 05:06:03 +0000 Message-ID: <60225eaa331845aaa1914383f5d532cc@intel.com> References: <20210706181100.4374-1-leweix.yang@intel.com> In-Reply-To: <20210706181100.4374-1-leweix.yang@intel.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.5.1.3 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dts] [PATCH V1] tests/TestSuite_vhost_cbdma:change cases about cbdma X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 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" > -----Original Message----- > From: dts On Behalf Of Yang Lewei > Sent: 2021=1B$BG/=1B(B7=1B$B7n=1B(B7=1B$BF|=1B(B 2:11 > To: dts@dpdk.org > Cc: Yang, LeweiX > Subject: [dts] [PATCH V1] tests/TestSuite_vhost_cbdma:change cases about > cbdma >=20 > From: YangLewei >=20 > 1. change cases using imix pkts for better coverage: > - test_perf_dynamic_queue_number_cbdma_vhost_enqueue_operations > - > test_perf_packed_dynamic_queue_number_cbdma_vhost_enqueue_operations > 2. add one cbdma performance case: > - test_perf_compare_pvp_split_ring_performance >=20 > Signed-off-by: YangLewei > --- > tests/TestSuite_vhost_cbdma.py | 212 +++++++++++++++++++-------------- > 1 file changed, 125 insertions(+), 87 deletions(-) >=20 > diff --git a/tests/TestSuite_vhost_cbdma.py b/tests/TestSuite_vhost_cbdma= .py > index 6bd5919b..3523c4b3 100644 > --- a/tests/TestSuite_vhost_cbdma.py > +++ b/tests/TestSuite_vhost_cbdma.py > @@ -183,11 +183,13 @@ class TestVirTioVhostCbdma(TestCase): > self.result_secondary =3D re.findall(r'TX-packets: (\w+)', out) > self.verify(int(self.result_first[0]) > 1 and int(self.result_se= condary[0]) > 1, > "forward packets no correctly") >=20 > + > @property > def check_2m_env(self): > out =3D self.dut.send_expect("cat /proc/meminfo |grep Hugepagesi= ze|awk > '{print($2)}'", "# ") > return True if out =3D=3D '2048' else False >=20 > + > def launch_testpmd_as_vhost_user(self, command, cores=3D"Default", d= ev=3D"", > ports =3D ""): > self.pmdout_vhost_user.start_testpmd(cores=3Dcores, param=3Dcomm= and, > vdevs=3D[dev], ports=3Dports, prefix=3D"vhost") > self.vhost_user.send_expect('set fwd mac', 'testpmd> ', 120) @@ = -271,62 > +273,49 @@ class TestVirTioVhostCbdma(TestCase): > """ > self.test_target =3D self.running_case > self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > - used_cbdma_num =3D 4 > - queue =3D 2 > + used_cbdma_num =3D 8 > + queue =3D 8 > txd_rxd =3D 1024 > dmathr =3D 1024 > nb_cores =3D 1 > virtio_path =3D "/tmp/s0" > path_mode =3D 'mrg_rxbuf=3D1,in_order=3D1' > self.get_cbdma_ports_info_and_bind_to_dpdk(used_cbdma_num) > - vhost_dmas =3D > f"dmas=3D[txq0@{self.used_cbdma[0]};txq1@{self.used_cbdma[1]}],dmathr=3D{= dm > athr}" > - eal_params =3D " --nb-cores=3D%d --txd=3D%d --rxd=3D%d --txq=3D%= d --rxq=3D%d " % > (nb_cores, txd_rxd, txd_rxd, queue, queue) > - dynamic_queue_number_cbdma_virtio_params =3D f" --tx-offloads= =3D0x0 -- > enable-hw-vlan-strip {eal_params}" > + eal_params =3D " --nb-cores=3D1 --txd=3D1024 --rxd=3D1024 --txq= =3D%d --rxq=3D%d " > + dynamic_queue_number_cbdma_virtio_params =3D f" --tx-offloads= =3D0x0 -- > enable-hw-vlan-strip {eal_params % (queue,queue)}" > virtio_dev =3D > f"net_virtio_user0,mac=3D{self.virtio_mac},path=3D{virtio_path},{path_mod= e},queu > es=3D{queue},server=3D1" > - vhost_dev =3D > f"'net_vhost0,iface=3D{virtio_path},queues=3D{queue},client=3D1,%s'" > + vhost_dev =3D f"'net_vhost0,iface=3D{virtio_path},queues=3D%d,cl= ient=3D1,%s'" > # launch vhost testpmd > allow_pci =3D [self.dut.ports_info[0]['pci']] > for index in range(used_cbdma_num): > - if index < used_cbdma_num / 2: > - allow_pci.append(self.cbdma_dev_infos[index]) > - self.launch_testpmd_as_vhost_user(eal_params, self.cores[0:2], > dev=3Dvhost_dev % vhost_dmas, ports=3Dallow_pci) > - # queue 2 start virtio testpmd, check perforamnce and RX/TX > - mode =3D "dynamic_queue2" > + allow_pci.append(self.cbdma_dev_infos[index]) > + > + # no cbdma to launch vhost > + self.launch_testpmd_as_vhost_user(eal_params % (queue,queue), > self.cores[0:2], dev=3Dvhost_dev % (queue,''), ports=3D[allow_pci[0]]) > + mode =3D "no_cbdma" > self.mode_list.append(mode) >=20 > self.launch_testpmd_as_virtio_user(dynamic_queue_number_cbdma_virtio_par > ams, self.cores[2:4], dev=3Dvirtio_dev) > self.send_and_verify(mode, queue_list=3Drange(queue)) > - # On virtio-user side, dynamic change rx/tx queue numbers from 2= queue to > 1 queues > - self.vhost_or_virtio_set_one_queue(self.virtio_user) > - self.send_and_verify("virtio_user_" + mode + "_change_to_1", > queue_list=3D[0]) > - self.mode_list.append("virtio_user_" + mode + "_change_to_1") > - self.virtio_user.send_expect("stop", "testpmd> ") > - self.virtio_user.send_expect("quit", "# ") > + self.vhost_user.send_expect("quit", "#") > + > + # used 4 cbdma_num and 4 queue to launch vhost > + > + vhost_dmas =3D > f"dmas=3D[txq0@{self.used_cbdma[0]};txq1@{self.used_cbdma[1]};txq2@{self.= us > ed_cbdma[2]};txq3@{self.used_cbdma[3]}],dmathr=3D{dmathr}" > + self.launch_testpmd_as_vhost_user(eal_params % (queue/2,queue/2)= , > self.cores[0:2], dev=3Dvhost_dev % (int(queue/2),vhost_dmas), > ports=3Dallow_pci[:5]) > + self.send_and_verify("used_4_cbdma_num", > queue_list=3Drange(int(queue/2))) > + self.mode_list.append("used_4_cbdma_num") > + self.vhost_user.send_expect("quit", "#") > + > + #used 8 cbdma_num to launch vhost > + vhost_dmas =3D > f"dmas=3D[txq0@{self.used_cbdma[0]};txq1@{self.used_cbdma[1]};txq2@{self.= us > ed_cbdma[2]};txq3@{self.used_cbdma[3]};txq4@{self.used_cbdma[4]};txq5@{s > elf.used_cbdma[5]};txq6@{self.used_cbdma[6]};txq7@{self.used_cbdma[7]}],d > mathr=3D{dmathr}" > + self.launch_testpmd_as_vhost_user(eal_params % (queue, queue), > self.cores[0:2], > + dev=3Dvhost_dev % (queue,vhost= _dmas), ports=3Dallow_pci) > + self.send_and_verify("used_8_cbdma_num", queue_list=3Drange(queu= e)) > + self.mode_list.append("used_8_cbdma_num") > + self.send_and_verify("used_8_cbdma_num_1", queue_list=3Drange(qu= eue)) > + self.mode_list.append("used_8_cbdma_num_1") > + self.virtio_user.send_expect("stop", "testpmd> ", 60) > time.sleep(5) > - self.dut.send_expect(f"rm -rf {virtio_path}", "#") > - # queue 2 start virtio testpmd, check perforamnce and RX/TX > - > self.launch_testpmd_as_virtio_user(dynamic_queue_number_cbdma_virtio_par > ams, self.cores[2:4], dev=3Dvirtio_dev) > - mode =3D "Relaunch_dynamic_queue2" > - self.mode_list.append(mode) > - self.send_and_verify(mode, queue_list=3Drange(queue)) > - # On vhost side, dynamic change rx queue numbers from 2 queue to= 1 > queues > - self.vhost_or_virtio_set_one_queue(self.vhost_user) > - self.send_and_verify("vhost_user" + mode + "_change_to_1") > - self.mode_list.append("vhost_user" + mode + "_change_to_1") > - self.vhost_user.send_expect("quit", "# ") > - time.sleep(2) > - # Relaunch vhost with another two cbdma channels > - mode =3D "Relaunch_vhost_2_cbdma" > - self.mode_list.append(mode) > - dmathr =3D 512 > - vhost_dmas =3D > f"dmas=3D[txq0@{self.used_cbdma[2]};txq1@{self.used_cbdma[3]}],dmathr=3D{= dm > athr}" > - allow_pci =3D [self.dut.ports_info[0]['pci']] > - for index in range(used_cbdma_num): > - if index >=3D used_cbdma_num / 2: > - allow_pci.append(self.cbdma_dev_infos[index]) > - self.launch_testpmd_as_vhost_user(eal_params, self.cores[0:2], > dev=3Dvhost_dev % vhost_dmas, ports=3Dallow_pci) > - self.virtio_user.send_expect("clear port stats all", "testpmd> "= , 30) > - self.send_and_verify(mode, queue_list=3Drange(queue)) > - self.check_port_stats_result(self.virtio_user) > self.virtio_user.send_expect("quit", "# ") > self.vhost_user.send_expect("quit", "# ") > self.result_table_print() > @@ -427,8 +416,8 @@ class TestVirTioVhostCbdma(TestCase): > """ > self.test_target =3D self.running_case > self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > - used_cbdma_num =3D 4 > - queue =3D 2 > + used_cbdma_num =3D 8 > + queue =3D 8 > txd_rxd =3D 1024 > dmathr =3D 1024 > nb_cores =3D 1 > @@ -436,53 +425,41 @@ class TestVirTioVhostCbdma(TestCase): > path_mode =3D 'mrg_rxbuf=3D1,in_order=3D1,packed_vq=3D1' > self.get_cbdma_ports_info_and_bind_to_dpdk(used_cbdma_num) > vhost_dmas =3D > f"dmas=3D[txq0@{self.used_cbdma[0]};txq1@{self.used_cbdma[1]}],dmathr=3D{= dm > athr}" > - eal_params =3D " --nb-cores=3D%d --txd=3D%d --rxd=3D%d --txq=3D%= d --rxq=3D%d " % > (nb_cores, txd_rxd, txd_rxd, queue, queue) > - dynamic_queue_number_cbdma_virtio_params =3D f" --tx-offloads= =3D0x0 -- > enable-hw-vlan-strip {eal_params}" > + eal_params =3D " --nb-cores=3D1 --txd=3D1024 --rxd=3D1024 --txq= =3D%d --rxq=3D%d " > + dynamic_queue_number_cbdma_virtio_params =3D f" --tx-offloads= =3D0x0 -- > enable-hw-vlan-strip {eal_params % (queue, queue)}" > virtio_dev =3D > f"net_virtio_user0,mac=3D{self.virtio_mac},path=3D{virtio_path},{path_mod= e},queu > es=3D{queue},server=3D1" > - vhost_dev =3D > f"'net_vhost0,iface=3D{virtio_path},queues=3D{queue},client=3D1,%s'" > + vhost_dev =3D f"'net_vhost0,iface=3D{virtio_path},queues=3D%s,cl= ient=3D1,%s'" > # launch vhost testpmd > allow_pci =3D [self.dut.ports_info[0]['pci']] > for index in range(used_cbdma_num): > - if index < used_cbdma_num / 2: > - allow_pci.append(self.cbdma_dev_infos[index]) > - self.launch_testpmd_as_vhost_user(eal_params, self.cores[0:2], > dev=3Dvhost_dev % vhost_dmas, ports=3Dallow_pci) > - # queue 2 start virtio testpmd, check perforamnce and RX/TX > - mode =3D "dynamic_queue2" > + allow_pci.append(self.cbdma_dev_infos[index]) > + > + # no cbdma to launch vhost > + self.launch_testpmd_as_vhost_user(eal_params % (queue,queue), > self.cores[0:2], dev=3Dvhost_dev % (queue,''), ports=3D [allow_pci[0]]) > + mode =3D "no_cbdma" > self.mode_list.append(mode) >=20 > self.launch_testpmd_as_virtio_user(dynamic_queue_number_cbdma_virtio_par > ams, self.cores[2:4], dev=3Dvirtio_dev) > self.send_and_verify(mode, queue_list=3Drange(queue)) > - # On virtio-user side, dynamic change rx/tx queue numbers from 2= queue to > 1 queues > - self.vhost_or_virtio_set_one_queue(self.virtio_user) > - self.send_and_verify("virtio_user_" + mode + "_change_to_1", > queue_list=3D[0]) > - self.mode_list.append("virtio_user_" + mode + "_change_to_1") > - self.virtio_user.send_expect("stop", "testpmd> ") > - self.virtio_user.send_expect("quit", "# ") > + self.vhost_user.send_expect("quit", "#") > + > + # used 4 cbdma_num and 4 queue to launch vhost > + vhost_dmas =3D > f"dmas=3D[txq0@{self.used_cbdma[0]};txq1@{self.used_cbdma[1]};txq2@{self.= us > ed_cbdma[2]};txq3@{self.used_cbdma[3]}],dmathr=3D{dmathr}" > + self.launch_testpmd_as_vhost_user(eal_params % (queue/2,queue/2)= , > self.cores[0:2], > + dev=3Dvhost_dev % (int(queue/2),vhost_dmas), ports=3Dall= ow_pci[:5]) > + self.send_and_verify("used_4_cbdma_num", > queue_list=3Drange(int(queue/2))) > + self.mode_list.append("used_4_cbdma_num") > + self.vhost_user.send_expect("quit", "#") > + > + #used 8 cbdma_num to launch vhost > + vhost_dmas =3D > f"dmas=3D[txq0@{self.used_cbdma[0]};txq1@{self.used_cbdma[1]};txq2@{self.= us > ed_cbdma[2]};txq3@{self.used_cbdma[3]};txq4@{self.used_cbdma[4]};txq5@{s > elf.used_cbdma[5]};txq6@{self.used_cbdma[6]};txq7@{self.used_cbdma[7]}],d > mathr=3D{dmathr}" > + self.launch_testpmd_as_vhost_user(eal_params % (queue, queue), > self.cores[0:2], > + dev=3Dvhost_dev % (queue,vhost= _dmas), ports=3Dallow_pci) > + self.send_and_verify("used_8_cbdma_num", queue_list=3Drange(queu= e)) > + self.mode_list.append("used_8_cbdma_num") > + self.send_and_verify("used_8_cbdma_num_1", queue_list=3Drange(qu= eue)) > + self.mode_list.append("used_8_cbdma_num_1") > + self.virtio_user.send_expect("stop", "testpmd> ", 60) > time.sleep(5) > - self.dut.send_expect(f"rm -rf {virtio_path}", "#") > - # queue 2 start virtio testpmd, check perforamnce and RX/TX > - > self.launch_testpmd_as_virtio_user(dynamic_queue_number_cbdma_virtio_par > ams, self.cores[2:4], dev=3Dvirtio_dev) > - mode =3D "Relaunch_dynamic_queue2" > - self.mode_list.append(mode) > - self.send_and_verify(mode, queue_list=3Drange(queue)) > - # On vhost side, dynamic change rx queue numbers from 2 queue to= 1 > queues > - self.vhost_or_virtio_set_one_queue(self.vhost_user) > - self.send_and_verify("vhost_user" + mode + "_change_to_1") > - self.mode_list.append("vhost_user" + mode + "_change_to_1") > - self.vhost_user.send_expect("quit", "# ") > - time.sleep(2) > - # Relaunch vhost with another two cbdma channels > - mode =3D "Relaunch_vhost_2_cbdma" > - self.mode_list.append(mode) > - dmathr =3D 512 > - vhost_dmas =3D > f"dmas=3D[txq0@{self.used_cbdma[2]};txq1@{self.used_cbdma[3]}],dmathr=3D{= dm > athr}" > - allow_pci =3D [self.dut.ports_info[0]['pci']] > - for index in range(used_cbdma_num): > - if index >=3D used_cbdma_num / 2: > - allow_pci.append(self.cbdma_dev_infos[index]) > - self.launch_testpmd_as_vhost_user(eal_params, self.cores[0:2], > dev=3Dvhost_dev % vhost_dmas, ports=3Dallow_pci) > - self.virtio_user.send_expect("clear port stats all", "testpmd> "= , 30) > - self.send_and_verify(mode, queue_list=3Drange(queue)) > - self.check_port_stats_result(self.virtio_user) > self.virtio_user.send_expect("quit", "# ") > self.vhost_user.send_expect("quit", "# ") > self.result_table_print() > @@ -491,6 +468,67 @@ class TestVirTioVhostCbdma(TestCase): > self.handle_expected(mode_list=3Dself.mode_list) > self.handle_results(mode_list=3Dself.mode_list) >=20 > + > + > + def test_perf_compare_pvp_split_ring_performance(self): > + """ > + Test Case6: Compare PVP split ring performance between CPU copy, > CBDMA copy and Sync copy > + """ > + used_cbdma_num =3D 1 > + queue =3D 1 > + txd_rxd =3D 1024 > + eal_tx_rxd =3D ' --nb-cores=3D%d --txd=3D%d --rxd=3D%d' > + path_mode =3D 'mrg_rxbuf=3D1,in_order=3D1,server=3D1' > + allow_pci =3D [self.dut.ports_info[0]['pci']] > + self.get_cbdma_ports_info_and_bind_to_dpdk(used_cbdma_num) > + for index in range(used_cbdma_num): > + allow_pci.append(self.cbdma_dev_infos[index]) > + path_mode =3D 'mrg_rxbuf=3D1,in_order=3D1' > + vhost_vdevs =3D > f"'net_vhost0,iface=3D/tmp/s0,queues=3D%d,client=3D1,dmas=3D[txq0@{self.d= evice_str} > ],%s'" > + compare_pvp_split_ring_performance =3D "--tx-offloads=3D0x0 --en= able-hw- > vlan-strip --nb-cores=3D%d --txd=3D%d --rxd=3D%d" % (queue, txd_rxd, txd_= rxd) > + dev_path_mode_mapper =3D { > + "sync_cbdma": ['dmathr=3D1024', 'dmathr=3D2000'], > + "cpu": 'dmathr=3D0', > + } > + for key,dma_mode in dev_path_mode_mapper.items(): > + if key =3D=3D "cpu": > + vhost_vdevs =3D f"'net_vhost0,iface=3D/tmp/s0,queues=3D1= '" > + self.launch_testpmd_as_vhost_user(eal_tx_rxd % (queue, t= xd_rxd, > txd_rxd), self.cores[0:2], dev=3Dvhost_vdevs, ports=3D[allow_pci[0]]) > + vdevs =3D > f"'net_virtio_user0,mac=3D{self.virtio_mac},path=3D/tmp/s0,{path_mode},qu= eues=3D > %d'" % queue > + > self.launch_testpmd_as_virtio_user(compare_pvp_split_ring_performance, > self.cores[2:4], dev=3Dvdevs) > + mode =3D "cpu_copy_64" > + self.mode_list.append(mode) > + self.send_and_verify(mode, frame_sizes=3D[64], > pkt_length_mode=3DNone) > + perf_cpu_copy_64 =3D self.throughput[mode][64][self.nb_d= esc] > + self.virtio_user.send_expect('show port stats all', 'tes= tpmd> ', 10) > + self.virtio_user.send_expect("quit", "# ") > + self.vhost_user.send_expect("quit", "# ") > + else: > + self.launch_testpmd_as_vhost_user(eal_tx_rxd % (queue, t= xd_rxd, > txd_rxd), self.cores[0:2],dev=3Dvhost_vdevs % (queue, dma_mode[0]), > ports=3Dallow_pci) > + vdevs =3D > f"'net_virtio_user0,mac=3D{self.virtio_mac},path=3D/tmp/s0,{path_mode},qu= eues=3D > %d,server=3D1'" % queue > + > self.launch_testpmd_as_virtio_user(compare_pvp_split_ring_performance, > self.cores[2:4],dev=3Dvdevs) > + mode =3D "sync_copy_64" > + self.mode_list.append(mode) > + self.send_and_verify(mode,frame_sizes=3D[64],pkt_length_= mode=3DNone) > + perf_sync_copy_64 =3D self.throughput[mode][64][self.nb_= desc] > + mode =3D "cbdma_copy_1518" > + self.mode_list.append(mode) > + > self.send_and_verify(mode,frame_sizes=3D[1518],pkt_length_mode=3DNone) > + perf_cbdma_copy_1518 =3D self.throughput[mode][1518][sel= f.nb_desc] > + self.virtio_user.send_expect('show port stats all', 'tes= tpmd> ', 10) > + self.vhost_user.send_expect("quit", "# ") > + time.sleep(3) > + self.launch_testpmd_as_vhost_user(eal_tx_rxd % (queue, t= xd_rxd, > txd_rxd), self.cores[0:2],dev=3Dvhost_vdevs % (queue, dma_mode[1]), > ports=3Dallow_pci) > + mode =3D "sync_copy_1518" > + self.mode_list.append(mode) > + > self.send_and_verify(mode,frame_sizes=3D[1518],pkt_length_mode=3DNone) > + perf_sync_copy_1518 =3D self.throughput[mode][1518][self= .nb_desc] > + self.check_port_stats_result(self.virtio_user) > + self.virtio_user.send_expect("quit", "# ") > + self.vhost_user.send_expect("quit", "# ") > + self.result_table_print() > + self.verify(abs(perf_cbdma_copy_1518 - > + perf_sync_copy_1518)/perf_sync_copy_1518 > 0.05 and > + abs(perf_sync_copy_64 - perf_cpu_copy_64)/perf_sync_copy_64 < 0.1, > + "sync_copy_64 vs. cpu_copy_64 delta > 10% or cbdma_copy_1518 vs > + sync_copy_1518 delta < 5%" ) > + > @staticmethod > def vhost_or_virtio_set_one_queue(session): > session.send_expect('stop', 'testpmd> ', 120) @@ -556,16 +594,16= @@ > class TestVirTioVhostCbdma(TestCase): > # check RX/TX can work normally in each queues > self.check_packets_of_each_queue(queue_list=3Dqueue_list) >=20 > - def send_and_verify(self, mode, multiple_queue=3DTrue, queue_list=3D= []): > + def send_and_verify(self, mode, multiple_queue=3DTrue, queue_list=3D= [], > frame_sizes=3D[],pkt_length_mode=3D'imix'): > """ > - Send packet with packet generator and verify > + Send packet with packet generator and verif > """ > - if self.pkt_length_mode =3D=3D 'imix': > + if self.pkt_length_mode =3D=3D pkt_length_mode: > self.send_imix_and_verify(mode, multiple_queue, queue_list) > return According to "self.pkt_length_mode =3D (suite_cfg or {}).get('pkt_length_mo= de') or 'fixed'", we know self.pkt_length_mode Is got from suite configurat= ion. What's your purpose of " self.pkt_length_mode =3D=3D pkt_length_mode ", is = it checking pkt_length_mode Is 'imix', if that, what will happen, if set se= lf.pkt_length_mode to "None" ? What the usage of pkt_length_mode is in suite_cfg should be considered. >=20 > self.throughput[mode] =3D dict() > - for frame_size in self.frame_sizes: > + for frame_size in frame_sizes: > self.throughput[mode][frame_size] =3D dict() > payload_size =3D frame_size - self.headers_size > tgenInput =3D [] > -- > 2.32.0