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 E010EA0093; Tue, 19 May 2020 04:00:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B17431D446; Tue, 19 May 2020 04:00:31 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 4A4D11D166 for ; Tue, 19 May 2020 04:00:29 +0200 (CEST) IronPort-SDR: zJQug224ByGHAWGn9qa3zb1BA0vkOQ/yla0kPUGrx/DrQrLPo0i1YSkeRlVpC6VDvG4v84EPvT rUEu9q/tLk+g== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 May 2020 19:00:28 -0700 IronPort-SDR: b1vzFBrfF+WoLA81WhkzIzkuYNLloLzXMx98KCjXB8duDjXrbFYKHEyK1uiKRzsvktj/hj+wIj 7Gk7bVJQQHTA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,408,1583222400"; d="scan'208";a="267724462" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by orsmga006.jf.intel.com with ESMTP; 18 May 2020 19:00:27 -0700 Received: from fmsmsx126.amr.corp.intel.com (10.18.125.43) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Mon, 18 May 2020 19:00:27 -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; Mon, 18 May 2020 19:00:27 -0700 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.178]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.241]) with mapi id 14.03.0439.000; Tue, 19 May 2020 10:00:24 +0800 From: "Tu, Lijuan" To: "Xiao, QimaiX" , "dts@dpdk.org" CC: "Xiao, QimaiX" Thread-Topic: [dts] [PATCH V1]pvp_virtio_user_multi_queues: delete old suite which has been replaced by new suite Thread-Index: AQHWKdaw4qExgxE3Nk2j3jxAI9feGKiursuw Date: Tue, 19 May 2020 02:00:23 +0000 Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BC3EDE4@SHSMSX101.ccr.corp.intel.com> References: <1589450074-137645-1-git-send-email-qimaix.xiao@intel.com> In-Reply-To: <1589450074-137645-1-git-send-email-qimaix.xiao@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]pvp_virtio_user_multi_queues: delete old suite which has been replaced by new suite 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 Xiao Qimai > Sent: Thursday, May 14, 2020 5:55 PM > To: dts@dpdk.org > Cc: Xiao, QimaiX > Subject: [dts] [PATCH V1]pvp_virtio_user_multi_queues: delete old suite > which has been replaced by new suite >=20 > *. this suite has been replaced by > pvp_virtio_user_multi_queues_port_restart >=20 > Signed-off-by: Xiao Qimai > --- > tests/TestSuite_pvp_virtio_user_multi_queues.py | 310 ------------------= ------ > 1 file changed, 310 deletions(-) > delete mode 100644 tests/TestSuite_pvp_virtio_user_multi_queues.py >=20 > diff --git a/tests/TestSuite_pvp_virtio_user_multi_queues.py > b/tests/TestSuite_pvp_virtio_user_multi_queues.py > deleted file mode 100644 > index 4cde5b8..0000000 > --- a/tests/TestSuite_pvp_virtio_user_multi_queues.py > +++ /dev/null > @@ -1,310 +0,0 @@ > -# BSD LICENSE > -# > -# Copyright(c) 2010-2019 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 8 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. > -""" > - > -import utils > -import time > -import re > -from settings import HEADER_SIZE > -from test_case import TestCase > -from pktgen import PacketGeneratorHelper > - > - > -class TestPVPVirtioMultiQueues(TestCase): > - > - def set_up_all(self): > - """ > - Run at the start of each test suite. > - """ > - > self.tester.extend_external_packet_generator(TestPVPVirtioMultiQueues, > self) > - self.frame_sizes =3D [64, 128, 256, 512, 1024, 1518] > - self.core_config =3D "1S/6C/1T" > - self.queue_number =3D 2 > - self.port_number =3D 2 > - self.dut_ports =3D self.dut.get_ports() > - self.verify(len(self.dut_ports) >=3D 1, "Insufficient ports for = testing") > - self.ports_socket =3D self.dut.get_numa_id(self.dut_ports[0]) > - self.cores_num =3D len([n for n in self.dut.cores if int(n['sock= et']) > - =3D=3D self.ports_socket]) > - self.verify(self.cores_num >=3D 6, > - "There has not enought cores to test this case") > - self.headers_size =3D HEADER_SIZE['eth'] + HEADER_SIZE['ip'] + \ > - HEADER_SIZE['udp'] > - self.core_list =3D self.dut.get_core_list( > - self.core_config, socket=3Dself.ports_socket) > - self.core_list_user =3D self.core_list[0:3] > - self.core_list_host =3D self.core_list[3:6] > - self.dst_mac =3D self.dut.get_mac_address(self.dut_ports[0]) > - > - 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'] > - > - self.out_path =3D '/tmp' > - out =3D self.tester.send_expect('ls -d %s' % self.out_path, '# '= ) > - if 'No such file or directory' in out: > - self.tester.send_expect('mkdir -p %s' % self.out_path, '# ') > - # create an instance to set stream field setting > - self.pktgen_helper =3D PacketGeneratorHelper() > - > - def set_up(self): > - """ > - Run before each test case. > - """ > - # 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)", "% > linerate"] > - self.result_table_create(self.table_header) > - > - self.vhost_user =3D self.dut.new_session(suite=3D"vhost-user") > - self.virtio_user =3D self.dut.new_session(suite=3D"virtio-user") > - > - @property > - def check_2M_env(self): > - out =3D self.dut.send_expect("cat /proc/meminfo |grep > Hugepagesize|awk '{print($2)}'", "# ") > - return True if out =3D=3D '2048' else False > - > - def start_vhost_testpmd(self): > - """ > - start testpmd on vhost > - """ > - eal_param =3D self.dut.create_eal_parameters(socket=3Dself.ports= _socket, > cores=3Dself.core_list_host, prefix=3D'vhost', > - vdevs=3D['net_vhost0,= iface=3Dvhost- > net,queues=3D2,client=3D0']) > - command_line_client =3D "./%s/app/testpmd " % self.target + eal_= param > + ' -- -i --nb-cores=3D2 --rxq=3D2 --txq=3D2 --rss-ip' > - self.vhost_user.send_expect(command_line_client, "testpmd> ", 12= 0) > - self.vhost_user.send_expect("set fwd mac", "testpmd> ", 120) > - self.vhost_user.send_expect("start", "testpmd> ", 120) > - > - def start_virtio_testpmd(self, args): > - """ > - start testpmd on virtio > - """ > - eal_param =3D self.dut.create_eal_parameters(socket=3Dself.ports= _socket, > cores=3Dself.core_list_user, prefix=3D'virtio', > - no_pci=3DTrue, vdevs= =3D[ > - 'net_virtio_user0,mac=3D00:01:02:03:04:05,path=3D./vhost= - > net,queues=3D2,%s' % args["version"]]) > - if self.check_2M_env: > - eal_param +=3D " --single-file-segments" > - command_line_user =3D "./%s/app/testpmd " % self.target + eal_pa= ram + > " -- -i %s --rss-ip --nb-cores=3D2 --rxq=3D2 --txq=3D2" % \ > - args["path"] > - 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 update_result_table(self, frame_size, case_info, Mpps, throughpu= t): > - results_row =3D [frame_size] > - results_row.append(case_info) > - results_row.append(Mpps) > - results_row.append(throughput) > - self.result_table_add(results_row) > - > - def check_packets_of_each_queue(self, frame_size): > - """ > - check each queue has receive packets > - """ > - out =3D self.vhost_user.send_expect("stop", "testpmd> ", 60) > - for port_index in range(0, self.port_number): > - for queue_index in range(0, self.queue_number): > - queue_info =3D re.findall("RX\s*Port=3D\s*%d/Queue=3D\s*= %d" % > - (port_index, queue_index), out) > - queue =3D queue_info[0] > - index =3D out.find(queue) > - rx =3D re.search("RX-packets:\s*(\d*)", out[index:]) > - tx =3D re.search("TX-packets:\s*(\d*)", out[index:]) > - rx_packets =3D int(rx.group(1)) > - tx_packets =3D int(tx.group(1)) > - self.verify(rx_packets > 0 and tx_packets > 0, > - "The queue %d rx-packets or tx-packets is 0 about = " % > - queue_index + \ > - "frame_size:%d, rx-packets:%d, tx-packets:%d" % > - (frame_size, rx_packets, tx_packets)) > - > - self.vhost_user.send_expect("start", "testpmd> ", 60) > - > - def set_fields(self): > - """ > - set ip protocol field behavior > - """ > - fields_config =3D {'ip': {'dst': {'action': 'random'}, }, } > - return fields_config > - > - def send_and_verify(self, case_info): > - """ > - start to send packets and calculate avg throughput > - """ > - for frame_size in self.frame_sizes: > - payload_size =3D frame_size - self.headers_size > - tgen_input =3D [] > - port =3D self.tester.get_local_port(self.dut_ports[0]) > - > self.tester.scapy_append('a=3D[Ether(dst=3D"%s")/IP(src=3D"0.240.74.101",= proto=3D2 > 55)/UDP()/("X"*%d)]' % (self.dst_mac, payload_size)) > - self.tester.scapy_append('wrpcap("%s/multiqueue.pcap" , a)' = % > self.out_path) > - self.tester.scapy_execute() > - > - tgen_input.append((port, port, "%s/multiqueue.pcap" % > self.out_path)) > - > - vm_config =3D self.set_fields() > - self.tester.pktgen.clear_streams() > - streams =3D > self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100, > vm_config, self.tester.pktgen) > - # set traffic option > - traffic_opt =3D {'delay': 5, 'duration': 20} > - _, pps =3D self.tester.pktgen.measure_throughput(stream_ids= =3Dstreams, > options=3Dtraffic_opt) > - Mpps =3D pps / 1000000.0 > - self.verify(Mpps > 0, "can not receive packets of frame size= %d" % > (frame_size)) > - throughput =3D Mpps * 100 / \ > - float(self.wirespeed(self.nic, frame_size, 1)) > - > - self.update_result_table(frame_size, case_info, Mpps, throug= hput) > - self.check_packets_of_each_queue(frame_size) > - self.result_table_print() > - > - def close_all_testpmd(self): > - """ > - close all testpmd of vhost and virtio > - """ > - self.vhost_user.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.virtio_user) > - self.dut.close_session(self.vhost_user) > - > - def test_perf_pvp_viritouser_multi_queue_virtio11_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-vla= n-strip"} > - self.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virtio_1.1 mergeable on") > - self.close_all_testpmd() > - > - def test_perf_pvp_viritouser_multi_queue_virtio11_normal(self): > - """ > - performance for Vhost PVP virtio1.1 Normal Path. > - """ > - 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.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virtio_1.1 mergeable off") > - self.close_all_testpmd() > - > - def test_perf_pvp_viritouser_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.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virtio_1.1 inorder") > - self.close_all_testpmd() > - > - def test_perf_pvp_viritouser_multi_queue_inorder_mergeable(self): > - """ > - performance for Vhost PVP In_order mergeable Path. > - """ > - 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.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("inoder mergeable on") > - self.close_all_testpmd() > - > - def test_perf_pvp_viritouser_multi_queue_inorder_no_mergeable(self): > - """ > - performance for Vhost PVP In_order no_mergeable Path. > - """ > - 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.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("inoder mergeable off") > - self.close_all_testpmd() > - > - def test_perf_pvp_viritouser_mulit_queue_mergeable(self): > - """ > - performance for Vhost PVP Mergeable Path. > - """ > - 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.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virito mergeable") > - self.close_all_testpmd() > - > - def test_perf_pvp_viritouser_multi_queue_normal(self): > - """ > - performance for Vhost PVP Normal Path. > - """ > - 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.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virtio normal") > - self.close_all_testpmd() > - > - def test_perf_pvp_viritouser_multi_queue_vector_rx(self): > - """ > - performance for Vhost PVP Vector_RX Path > - """ > - virtio_pmd_arg =3D {"version": "packed_vq=3D0,in_order=3D0,mrg_r= xbuf=3D0", > - "path": "--tx-offloads=3D0x0"} > - self.start_vhost_testpmd() > - self.start_virtio_testpmd(virtio_pmd_arg) > - self.send_and_verify("virito vector rx") > - self.close_all_testpmd() > - > - def tear_down(self): > - """ > - Run after each test case. > - """ > - self.dut.send_expect("killall -s INT testpmd", "#") > - self.close_all_session() > - > - def tear_down_all(self): > - """ > - Run after each test suite. > - """ > - pass > -- > 1.8.3.1