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 7F643A0352; Thu, 16 Jan 2020 06:58:49 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 74C441C021; Thu, 16 Jan 2020 06:58:49 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 8070B1BFB4 for ; Thu, 16 Jan 2020 06:58:47 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Jan 2020 21:58:46 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,325,1574150400"; d="scan'208";a="218408831" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 15 Jan 2020 21:58:46 -0800 Received: from fmsmsx163.amr.corp.intel.com (10.18.125.72) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 Jan 2020 21:58:46 -0800 Received: from shsmsx105.ccr.corp.intel.com (10.239.4.158) by fmsmsx163.amr.corp.intel.com (10.18.125.72) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 15 Jan 2020 21:58:45 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.30]) by SHSMSX105.ccr.corp.intel.com ([169.254.11.28]) with mapi id 14.03.0439.000; Thu, 16 Jan 2020 13:58:44 +0800 From: "Tu, Lijuan" To: "Wang, Yinan" , "dts@dpdk.org" CC: "Wang, Yinan" Thread-Topic: [dts] [PATCH v1] tests/perf_virtio_user_loopback: add virtio user loopback cases for performance check Thread-Index: AQHVy0hnM3Hv5YVOQku3a3rX2xKUc6fszW0A Date: Thu, 16 Jan 2020 05:58:43 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BBAB513@SHSMSX101.ccr.corp.intel.com> References: <20200114190107.5634-1-yinan.wang@intel.com> In-Reply-To: <20200114190107.5634-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/perf_virtio_user_loopback: add virtio user loopback cases for performance check 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 > -----Original Message----- > From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Yinan > Sent: Wednesday, January 15, 2020 3:01 AM > To: dts@dpdk.org > Cc: Wang, Yinan > Subject: [dts] [PATCH v1] tests/perf_virtio_user_loopback: add virtio use= r > loopback cases for performance check >=20 > From: Wang Yinan >=20 > Signed-off-by: Wang Yinan > --- > conf/perf_virtio_user_loopback.cfg | 7 + > tests/TestSuite_perf_virtio_user_loopback.py | 433 +++++++++++++++++++ > 2 files changed, 440 insertions(+) > create mode 100644 conf/perf_virtio_user_loopback.cfg > create mode 100644 tests/TestSuite_perf_virtio_user_loopback.py >=20 > diff --git a/conf/perf_virtio_user_loopback.cfg > b/conf/perf_virtio_user_loopback.cfg > new file mode 100644 > index 0000000..ff4290a > --- /dev/null > +++ b/conf/perf_virtio_user_loopback.cfg > @@ -0,0 +1,7 @@ > +[suite] > +update_expected =3D True > +test_parameters =3D {64: [1024], 1518: [1024]} test_duration =3D 60 > +accepted_tolerance =3D 1 expected_throughput =3D > +{'split_ring_inorder_non-mergeable': {64: {1024: 0.00}, 1518: {1024: > +0.00}}, 'split_ring_inorder_mergeable': {64: {1024: 0.00}, 1518: {1024: > +0.00}}, 'split_ring_mergeable': {64: {1024: 0.00}, 1518: {1024: 0.00}}, > +'split_ring_vector_rx': {64: {1024: 0.00}, 1518: {1024: 0.00}}, > +'packed_ring_non-mergeable': {64: {1024: 0.00}, 1518: {1024: 0.00}}, > +'packed_ring_inorder_non-mergeable': {64: {1024: 0.00}, 1518: {1024: > +0.00}}, 'packed_ring_inorder_mergeable': {64: {1024: 0.00}, 1518: > +{1024: 0.00}}, 'packed_ring_mergeable': {64: {1024: 0.00}, 1518: {1024: > +0.00}}, 'split_ring_non-mergeable': {64: {1024: 0.00}, 1518: {1024: > +0.00}}} > + > diff --git a/tests/TestSuite_perf_virtio_user_loopback.py > b/tests/TestSuite_perf_virtio_user_loopback.py > new file mode 100644 > index 0000000..a27b049 > --- /dev/null > +++ b/tests/TestSuite_perf_virtio_user_loopback.py > @@ -0,0 +1,433 @@ > +# BSD LICENSE > +# > +# Copyright(c) 2019-2020 Intel Corporation. All rights reserved. > +# All rights reserved. > +# > +# Redistribution and use in source and binary forms, with or without # > +modification, are permitted provided that the following conditions # > +are met: > +# > +# * Redistributions of source code must retain the above copyright > +# notice, this list of conditions and the following disclaimer. > +# * Redistributions in binary form must reproduce the above copyright > +# notice, this list of conditions and the following disclaimer in > +# the documentation and/or other materials provided with the > +# distribution. > +# * Neither the name of Intel Corporation nor the names of its > +# contributors may be used to endorse or promote products derived > +# from this software without specific prior written permission. > +# > +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND > CONTRIBUTORS # > +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > # > +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS > FOR # > +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE > COPYRIGHT # > +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, > INCIDENTAL, # > +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT > NOT # > +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF > USE, # > +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND > ON ANY # > +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT > # > +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF > THE USE # > +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH > DAMAGE. > + > +""" > +DPDK Test suite. > +Test vhost/virtio-user loopback multi-queues on 9 tx/rx path. > +Includes split ring mergeable, non-mergeable, Vector_RX, Inorder > +mergeable, Inorder non-mergeable, packed ring mergeable, non-mergeable, > +inorder mergeable, inorder non-mergeable Path. > +""" > + > +import utils > +import time > +import re > +import json > +import rst > +import os > +from copy import deepcopy > +from test_case import TestCase > +from settings import UPDATE_EXPECTED, load_global_setting > + > + > +class TestPerfVirtioUserLoopback(TestCase): > + > + def set_up_all(self): > + """ > + Run at the start of each test suite. > + """ > + self.frame_sizes =3D [64, 1518] > + self.nb_ports =3D 1 > + self.nb_cores =3D 1 > + self.queue_number =3D 1 > + cores_num =3D len(set([int(core['socket']) for core in self.dut.= cores])) > + # set diff arg about mem_socket base on socket number > + self.socket_mem =3D ','.join(['1024']*cores_num) > + self.core_config =3D "1S/4C/1T" > + self.verify(len(self.core_config) >=3D 4, > + "There has not enought cores to test this suite"= ) > + self.core_list =3D self.dut.get_core_list(self.core_config) > + self.core_list_user =3D self.core_list[0:2] > + self.core_list_host =3D self.core_list[2:4] > + > + self.vhost =3D self.dut.new_session(suite=3D"vhost") > + self.virtio_user =3D self.dut.new_session(suite=3D"virtio-user") > + self.save_result_flag =3D True > + > + def set_up(self): > + """ > + Run before each test case. > + It's more convenient to load suite configuration here than > + set_up_all in debug mode. > + """ > + self.dut.send_expect('rm ./vhost-net*', '# ') > + # test parameters include: frames size, descriptor numbers > + self.test_parameters =3D self.get_suite_cfg()['test_parameters'] > + > + # traffic duraion in second > + self.test_duration =3D self.get_suite_cfg()['test_duration'] > + > + # initilize throughput attribution > + # {'$framesize':{"$nb_desc": 'throughput'} > + self.throughput =3D {} > + > + # Accepted tolerance in Mpps > + self.gap =3D self.get_suite_cfg()['accepted_tolerance'] > + > + # header to print test result table > + self.table_header =3D ['Frame Size', 'TXD/RXD', 'Throughput', 'R= ate', > + 'Expected Throughput', 'Throughput Differen= ce'] > + self.test_result =3D {} > + # 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'] > + > + def start_vhost_testpmd(self, nb_desc): > + """ > + start testpmd on vhost > + """ > + eal_params =3D self.dut.create_eal_parameters(cores=3Dself.core_= list_host, > + no_pci=3DTrue, prefix=3D'vhost') > + command_line_client =3D self.dut.target + "/app/testpmd %s " + \ > + "--socket-mem %s --legacy-mem --vdev " + = \ > + "'net_vhost0,iface=3Dvhost-net,queues=3D%d= ' -- -i --nb- > cores=3D%d " + \ > + "--rxq=3D%d --txq=3D%d --txd=3D%d --rxd=3D= %d" > + command_line_client =3D command_line_client % ( > + eal_params, self.socket_mem, self.queue_number, > + self.nb_cores, self.queue_number, self.queue_number, > + nb_desc, nb_desc) > + self.vhost.send_expect(command_line_client, "testpmd> ", 120) > + self.vhost.send_expect("set fwd mac", "testpmd> ", 120) > + > + def start_virtio_testpmd(self, nb_desc, args): > + """ > + start testpmd on virtio > + """ > + eal_params =3D self.dut.create_eal_parameters(cores=3Dself.core_= list_user, > + no_pci=3DTrue, prefix=3D'virtio') > + command_line_user =3D self.dut.target + "/app/testpmd %s " + \ > + " --socket-mem %s --legacy-mem " + \ > + "-- > 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=3D%d - > -rxd=3D%d" > + command_line_user =3D command_line_user % ( > + eal_params, self.socket_mem, > + self.queue_number, args["version"], args["path"], self.nb_co= res, > + self.queue_number, self.queue_number, nb_desc, nb_desc) > + 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) > + > + def calculate_avg_throughput(self): > + """ > + calculate the average throughput > + """ > + results =3D 0.0 > + results_row =3D [] > + for i in range(10): > + out =3D self.vhost.send_expect("show port stats all", "testp= md>", 60) > + time.sleep(5) > + lines =3D re.search("Rx-pps:\s*(\d*)", out) > + result =3D lines.group(1) > + results +=3D float(result) > + Mpps =3D results / (1000000 * 10) > + self.verify(Mpps > 0, "port can not receive packets") > + return Mpps > + > + def send_and_verify(self, nb_desc, case_info): > + """ > + start to send packets and calculate avg throughput > + """ > + for frame_size in self.frame_sizes: > + self.throughput[frame_size] =3D dict() > + self.vhost.send_expect("set txpkts %d" % frame_size, "testpm= d> ", 30) > + self.vhost.send_expect("start tx_first 32", "testpmd> ", 30) > + Mpps =3D self.calculate_avg_throughput() > + self.verify(Mpps > 0, "%s can not receive packets of frame s= ize %d" % > (self.running_case, frame_size)) > + self.throughput[frame_size][nb_desc] =3D Mpps > + self.logger.info("Trouthput of " + > + "framesize: {}, rxd/txd: {} is :{} Mpps".fo= rmat( > + frame_size, nb_desc, Mpps)) > + self.vhost.send_expect("stop", "testpmd> ", 60) > + > + def close_all_testpmd(self): > + """ > + close all testpmd of vhost and virtio > + """ > + self.vhost.send_expect("quit", "#", 60) > + self.virtio_user.send_expect("quit", "#", 60) > + > + def close_all_session(self): > + """ > + close all session of vhost and vhost-user > + """ > + self.dut.close_session(self.vhost) > + self.dut.close_session(self.virtio_user) > + > + def handle_expected(self): > + """ > + Update expected numbers to configurate file: conf/$suite_name.cf= g > + """ > + if load_global_setting(UPDATE_EXPECTED) =3D=3D "yes": > + for frame_size in self.test_parameters.keys(): > + for nb_desc in self.test_parameters[frame_size]: > + self.expected_throughput[frame_size][nb_desc] =3D > + round(self.throughput[frame_size][nb_desc],3) > + > + def handle_results(self): > + """ > + results handled process: > + 1, save to self.test_results > + 2, create test results table > + 3, save to json file for Open Lab > + """ > + header =3D self.table_header > + for frame_size in self.test_parameters.keys(): > + wirespeed =3D self.wirespeed(self.nic, frame_size, self.nb_p= orts) > + ret_datas =3D {} > + for nb_desc in self.test_parameters[frame_size]: > + ret_data =3D {} > + ret_data[header[0]] =3D frame_size > + ret_data[header[1]] =3D nb_desc > + ret_data[header[2]] =3D "{:.3f} Mpps".format( > + self.throughput[frame_size][nb_desc]) > + ret_data[header[3]] =3D "{:.3f}%".format( > + self.throughput[frame_size][nb_desc] * 100 / wirespe= ed) > + ret_data[header[4]] =3D "{:.3f} Mpps".format( > + self.expected_throughput[frame_size][nb_desc]) > + ret_data[header[5]] =3D "{:.3f} Mpps".format( > + self.throughput[frame_size][nb_desc] - > + self.expected_throughput[frame_size][nb_desc]) > + ret_datas[nb_desc] =3D deepcopy(ret_data) > + self.test_result[frame_size] =3D deepcopy(ret_datas) > + # Create test results table > + self.result_table_create(header) > + for frame_size in self.test_parameters.keys(): > + for nb_desc in self.test_parameters[frame_size]: > + table_row =3D list() > + for i in range(len(header)): > + table_row.append( > + self.test_result[frame_size][nb_desc][header[i]]= ) > + self.result_table_add(table_row) > + # present test results to screen > + self.result_table_print() > + # save test results as a file > + if self.save_result_flag: > + self.save_result(self.test_result) > + > + def save_result(self, data): > + ''' > + Saves the test results as a separated file named with > + self.nic+_single_core_perf.json in output folder > + if self.save_result_flag is True > + ''' > + json_obj =3D dict() > + case_name =3D self.running_case > + json_obj[case_name] =3D list() > + status_result =3D [] > + for frame_size in self.test_parameters.keys(): > + for nb_desc in self.test_parameters[frame_size]: > + row_in =3D self.test_result[frame_size][nb_desc] > + row_dict0 =3D dict() > + row_dict0['performance'] =3D list() > + row_dict0['parameters'] =3D list() > + row_dict0['parameters'] =3D list() > + result_throughput =3D float(row_in['Throughput'].split()= [0]) > + expected_throughput =3D float(row_in['Expected > Throughput'].split()[0]) > + # delta value and accepted tolerance in percentage > + delta =3D result_throughput - expected_throughput > + gap =3D expected_throughput * -self.gap * 0.01 > + delta=3Dfloat(delta) > + gap=3Dfloat(gap) > + self.logger.info("Accept tolerance of %d are > (Mpps) %f" %(frame_size, gap)) > + self.logger.info("Throughput Difference of %d are > (Mpps) %f" %(frame_size, delta)) > + if result_throughput > expected_throughput + gap: > + row_dict0['status'] =3D 'PASS' > + else: > + row_dict0['status'] =3D 'FAIL' > + self.verify(row_dict0['status'] =3D=3D 'PASS', 'The thro= ughput is not in > correct range') > + row_dict1 =3D dict(name=3D"Throughput", value=3Dresult_t= hroughput, > unit=3D"Mpps", delta=3Ddelta) > + row_dict2 =3D dict(name=3D"Txd/Rxd", value=3Drow_in["TXD= /RXD"], > unit=3D"descriptor") > + row_dict3 =3D dict(name=3D"frame_size", value=3Drow_in["= Frame Size"], > unit=3D"bytes") > + row_dict0['performance'].append(row_dict1) > + row_dict0['parameters'].append(row_dict2) > + row_dict0['parameters'].append(row_dict3) > + json_obj[case_name].append(row_dict0) > + status_result.append(row_dict0['status']) > + with open(os.path.join(rst.path2Result, > + > '{0:s}_vhost_loopback_performance_virtio_user.json'.format( > + self.nic)), 'w') as fp: > + json.dump(json_obj, fp) > + self.verify("Fail" not in status_result, "Exceeded Gap") > + > + def test_perf_loopback_packed_ring_inorder_mergeable(self): > + """ > + performance for Vhost PVP virtio 1.1 inorder mergeable Path. > + """ > + virtio_pmd_arg =3D {"version": "in_order=3D1,packed_vq=3D1,mrg_r= xbuf=3D1", > + "path": "--tx-offloads=3D0x0 --enable-hw-vlan-= strip"} > + self.test_target =3D "packed_ring_inorder_mergeable" > + self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > + nb_desc =3D self.test_parameters[64][0] > + self.start_vhost_testpmd(nb_desc) > + self.start_virtio_testpmd(nb_desc, virtio_pmd_arg) > + self.send_and_verify(nb_desc, "virtio_1.1 mergeable on") > + self.close_all_testpmd() > + self.handle_expected() > + self.handle_results() > + > + def test_perf_loopback_packed_ring_inorder_non_mergeable(self): > + """ > + performance for Vhost PVP virtio1.1 inorder non-mergeable Path. > + """ > + self.test_target =3D "packed_ring_inorder_non-mergeable" > + virtio_pmd_arg =3D {"version": "in_order=3D1,packed_vq=3D1,mrg_r= xbuf=3D0", > + "path": "--tx-offloads=3D0x0 --enable-hw-vlan-= strip"} > + self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > + nb_desc =3D self.test_parameters[64][0] > + self.start_vhost_testpmd(nb_desc) > + self.start_virtio_testpmd(nb_desc, virtio_pmd_arg) > + self.send_and_verify(nb_desc, "virtio_1.1 normal") > + self.close_all_testpmd() > + self.handle_expected() > + self.handle_results() > + > + def test_perf_loopback_packed_ring_mergeable(self): > + """ > + performance for Vhost PVP virtio 1.1 Mergeable Path. > + """ > + virtio_pmd_arg =3D {"version": "in_order=3D0,packed_vq=3D1,mrg_r= xbuf=3D1", > + "path": "--tx-offloads=3D0x0 --enable-hw-vlan-= strip"} > + self.test_target =3D "packed_ring_mergeable" > + self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > + nb_desc =3D self.test_parameters[64][0] > + self.start_vhost_testpmd(nb_desc) > + self.start_virtio_testpmd(nb_desc, virtio_pmd_arg) > + self.send_and_verify(nb_desc, "virtio_1.1 mergeable on") > + self.close_all_testpmd() > + self.handle_expected() > + self.handle_results() > + > + def test_perf_loopback_packed_ring_non_mergeable(self): > + """ > + performance for Vhost PVP virtio1.1 non-mergeable Path. > + """ > + self.test_target =3D "packed_ring_non-mergeable" > + virtio_pmd_arg =3D {"version": "in_order=3D0,packed_vq=3D1,mrg_r= xbuf=3D0", > + "path": "--tx-offloads=3D0x0 --enable-hw-vlan-= strip"} > + self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > + nb_desc =3D self.test_parameters[64][0] > + self.start_vhost_testpmd(nb_desc) > + self.start_virtio_testpmd(nb_desc, virtio_pmd_arg) > + self.send_and_verify(nb_desc, "virtio_1.1 normal") > + self.close_all_testpmd() > + self.handle_expected() > + self.handle_results() > + > + def test_perf_loopback_split_ring_inorder_mergeable(self): > + """ > + performance for Vhost PVP In_order Mergeable Path. > + """ > + self.test_target =3D "split_ring_inorder_mergeable" > + virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D1,mrg_r= xbuf=3D1", > + "path": "--tx-offloads=3D0x0 --enable-hw-vlan-= strip"} > + self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > + nb_desc =3D self.test_parameters[64][0] > + self.start_vhost_testpmd(nb_desc) > + self.start_virtio_testpmd(nb_desc, virtio_pmd_arg) > + self.send_and_verify(nb_desc, "inorder mergeable on") > + self.close_all_testpmd() > + self.handle_expected() > + self.handle_results() > + > + def test_perf_loopback_split_ring_inorder_non_mergeable(self): > + """ > + performance for Vhost PVP Inorder Non-mergeable Path. > + """ > + self.test_target =3D "split_ring_inorder_non-mergeable" > + virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D1,mrg_r= xbuf=3D0", > + "path": "--tx-offloads=3D0x0 --enable-hw-vlan-= strip"} > + self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > + nb_desc =3D self.test_parameters[64][0] > + self.start_vhost_testpmd(nb_desc) > + self.start_virtio_testpmd(nb_desc, virtio_pmd_arg) > + self.send_and_verify(nb_desc, "inorder mergeable off") > + self.close_all_testpmd() > + self.handle_expected() > + self.handle_results() > + > + def test_perf_loopback_split_ring_mergeable(self): > + """ > + performance for Vhost PVP Mergeable Path. > + """ > + self.test_target =3D "split_ring_mergeable" > + virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D0,mrg_r= xbuf=3D1", > + "path": "--tx-offloads=3D0x0 --enable-hw-vlan-= strip"} > + self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > + nb_desc =3D self.test_parameters[64][0] > + self.start_vhost_testpmd(nb_desc) > + self.start_virtio_testpmd(nb_desc, virtio_pmd_arg) > + self.send_and_verify(nb_desc, "virtio mergeable") > + self.close_all_testpmd() > + self.handle_expected() > + self.handle_results() > + > + def test_perf_loopback_split_ring_non_mergeable(self): > + """ > + performance for Vhost PVP Non-mergeable Path. > + """ > + self.test_target =3D "split_ring_non-mergeable" > + virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D0,mrg_r= xbuf=3D0", > + "path": "--tx-offloads=3D0x0 --enable-hw-vlan-= strip"} > + self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > + nb_desc =3D self.test_parameters[64][0] > + self.start_vhost_testpmd(nb_desc) > + self.start_virtio_testpmd(nb_desc, virtio_pmd_arg) > + self.send_and_verify(nb_desc, "virtio mergeable off") > + self.close_all_testpmd() > + self.handle_expected() > + self.handle_results() > + > + def test_perf_loopback_split_ring_vector_rx(self): > + """ > + performance for Vhost PVP Vector_RX Path > + """ > + self.test_target =3D "split_ring_vector_rx" > + virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D0,mrg_r= xbuf=3D0", > + "path": "--tx-offloads=3D0x0"} > + self.expected_throughput =3D > self.get_suite_cfg()['expected_throughput'][self.test_target] > + nb_desc =3D self.test_parameters[64][0] > + self.start_vhost_testpmd(nb_desc) > + self.start_virtio_testpmd(nb_desc, virtio_pmd_arg) > + self.send_and_verify(nb_desc, "virtio vector rx") > + self.close_all_testpmd() > + self.handle_expected() > + self.handle_results() > + > + def tear_down(self): > + """ > + Run after each test case. > + """ > + self.dut.kill_all() > + > + def tear_down_all(self): > + """ > + Run after each test suite. > + """ > + self.close_all_session() > -- > 2.17.1