From patchwork Sun Sep 26 09:20:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 99678 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A3ADA0547; Sun, 26 Sep 2021 11:27:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F14E64003F; Sun, 26 Sep 2021 11:27:07 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 2CDE24003C for ; Sun, 26 Sep 2021 11:27:05 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10118"; a="211576349" X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="211576349" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:27:05 -0700 X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="475623392" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:27:04 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Date: Sun, 26 Sep 2021 17:20:06 +0800 Message-Id: <20210926092006.3418478-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1 1/5] test_plans/pvp_vhost_user_built_in_net_driver_test_plan: delete test plan 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" Delete pvp_vhost_user_built_in_net_driver test plan because this suite is included by vswitch_sample_cbdma. Signed-off-by: Wei Ling --- ...ost_user_built_in_net_driver_test_plan.rst | 82 ------------------- 1 file changed, 82 deletions(-) delete mode 100644 test_plans/pvp_vhost_user_built_in_net_driver_test_plan.rst diff --git a/test_plans/pvp_vhost_user_built_in_net_driver_test_plan.rst b/test_plans/pvp_vhost_user_built_in_net_driver_test_plan.rst deleted file mode 100644 index f658df52..00000000 --- a/test_plans/pvp_vhost_user_built_in_net_driver_test_plan.rst +++ /dev/null @@ -1,82 +0,0 @@ -.. Copyright (c) <2019>, Intel Corporation - 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. - -======================================== -Vhost-user built-in net driver test plan -======================================== - -Description -=========== - -This feature test a very simple vhost-user net driver which demonstrates how to use the generic -vhost APIs by adding option "--builtin-net-driver" when launch vswitch. -This feature only can test with vswitch, and it is disabled by default. - -Prerequisites -============= -Device start fails if NIC’s max queues > the default number of 128. -mbuf pool size is dependent on the MAX_QUEUES configuration, if NIC’s max queue number is larger than 128, device start will fail due to insufficient mbuf. -Change the default number to make it work as below, just set the number according to the NIC’s property: -For niantic 82599ES,#define MAX_QUEUES 128 -For fortville X710, #define MAX_QUEUES 192 -For fortville XXV710, #define MAX_QUEUES 352 -For fortville XL710, #define MAX_QUEUES 512 - -Modify the testpmd code as following:: - - --- a/examples/vhost/main.c - +++ b/examples/vhost/main.c - @@ -28,7 +28,7 @@ - #include "main.h" - #ifndef MAX_QUEUES - -#define MAX_QUEUES 128 - +#define MAX_QUEUES 512 - #endif - -Test Case1: PVP test with vhost built-in net driver -=================================================== - -1. Bind one port to igb_uio, launch vswitch:: - - ./vhost-switch -l 1-2 -n 4 --socket-mem 2048,2048 -- \ - -p 0x1 --mergeable 0 --vm2vm 1 --builtin-net-driver --socket-file ./vhost-net - -2. Launch virtio-user:: - - ./testpmd -l 3-4 -n 4 --no-pci --socket-mem 2048,2048 --file-prefix=virtio-user \ - --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net,queues=1 -- -i --rxq=1 --txq=1 - testpmd>set fwd mac # ixia can't receive packets when io fwd, packtes still fwd to virtio-user with the dest mac addr - testpmd>start tx_first # send packets from virtio-user first to let vswitch know the mac addr - -3. Send traffic with (vlan_id = 1000, dest mac addr = 00:11:22:33:44:10) and different packet size includes [64, 128, 256, 512, 1024, 1518] by packet generator, check the throughput with below command:: - - testpmd>show port stats all From patchwork Sun Sep 26 09:20:17 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 99679 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C3E7A0547; Sun, 26 Sep 2021 11:27:18 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2721840698; Sun, 26 Sep 2021 11:27:18 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 6F34F4003C for ; Sun, 26 Sep 2021 11:27:16 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10118"; a="287993973" X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="287993973" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:27:15 -0700 X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="475623415" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:27:14 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Date: Sun, 26 Sep 2021 17:20:17 +0800 Message-Id: <20210926092017.3418537-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1 2/5] tests/pvp_vhost_user_built_in_net_driver: delete test suite 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" Delete pvp_vhost_user_built_in_net_driver test sutie because this suite is included by vswitch_sample_cbdma. Signed-off-by: Wei Ling --- ...uite_pvp_vhost_user_built_in_net_driver.py | 255 ------------------ 1 file changed, 255 deletions(-) delete mode 100644 tests/TestSuite_pvp_vhost_user_built_in_net_driver.py diff --git a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py b/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py deleted file mode 100644 index a0d16671..00000000 --- a/tests/TestSuite_pvp_vhost_user_built_in_net_driver.py +++ /dev/null @@ -1,255 +0,0 @@ -# BSD LICENSE -# -# Copyright(c) <2019> Intel Corporation. -# 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. -""" - -import utils -import time -import re -from test_case import TestCase -from settings import HEADER_SIZE -from pktgen import PacketGeneratorHelper -from pmd_output import PmdOutput - - -class TestPVPVhostUserBuiltInNetDriver(TestCase): - - def set_up_all(self): - """ - Run at the start of each test suite. - """ - self.frame_sizes = [64, 128, 256, 512, 1024, 1518] - self.core_config = "1S/4C/1T" - self.dut_ports = self.dut.get_ports() - self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) - self.core_list = self.dut.get_core_list( - self.core_config, socket=self.ports_socket) - self.verify(len(self.dut_ports) >= 1, "Insufficient ports for testing") - self.verify(len(self.core_list) >= 4, - "There has not enought cores to test this suite %s" % - self.suite_name) - - self.core_list_virtio_user = self.core_list[0:2] - self.core_list_vhost_user = self.core_list[2:4] - self.mem_channels = self.dut.get_memory_channels() - self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE['ip'] - self.prepare_vhost_switch() - self.number_of_ports = 1 - - self.logger.info("You can config packet_size in file %s.cfg," % self.suite_name + \ - " in region 'suite' like packet_sizes=[64, 128, 256]") - if 'packet_sizes' in self.get_suite_cfg(): - self.frame_sizes = self.get_suite_cfg()['packet_sizes'] - - self.out_path = '/tmp' - out = 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 = PacketGeneratorHelper() - - # set memory size - self.verify(self.sockets > 0, 'cpu socket should not be zero') - self.mem_size = ','.join(['2048']*self.sockets) - self.path=self.dut.apps_name['test-pmd'] - self.testpmd_name = self.path.split("/")[-1] - - def set_up(self): - """ - Run before each test case. - """ - self.dut.send_expect("rm -rf ./vhost-net*", "# ") - self.dut.send_expect("rm -rf ./vhost.out", "# ") - self.dut.send_expect("killall -s INT vhost", "# ") - self.dut.send_expect("killall -s INT %s" % self.testpmd_name , "#") - self.vhost_switch = self.dut.new_session(suite="vhost-switch") - self.virtio_user = self.dut.new_session(suite="virtio-user") - self.pmd_out = PmdOutput(self.dut, self.virtio_user) - # Prepare the result table - self.virtio_mac = "00:11:22:33:44:10" - self.vlan_id = 1000 - self.table_header = ['Frame'] - self.table_header.append("Mode") - self.table_header.append("Mpps") - self.table_header.append("Queue Num") - self.table_header.append("% linerate") - self.result_table_create(self.table_header) - - @property - def sockets(self): - sockets = [ - cpu.get('socket') for cpu in self.dut.get_all_cores() - if cpu.get('socket')] - return len(set(sockets)) - - def prepare_vhost_switch(self): - cmd_info = self.dut.send_expect("grep 'define MAX_QUEUES' %s" % - "./examples/vhost/main.c", "# ") - out = re.search("#define MAX_QUEUES\s*(\d*)", cmd_info) - if out is not None: - self.default_queue = out.group(1) - else: - self.default_queue = 128 - sed_cmd = "sed -i -e 's/#define MAX_QUEUES.*$/#define MAX_QUEUES %d/' " + \ - "./examples/vhost/main.c" - if self.nic in ['niantic']: - max_queues = 128 - else: - max_queues = 512 - self.dut.send_expect(sed_cmd % max_queues, "#", 10) - out = self.dut.build_dpdk_apps('./examples/vhost') - self.verify('make: Leaving directory' in out, "Compilation failed") - self.verify("Error" not in out, "compilation l3fwd-power error") - self.verify("No such" not in out, "Compilation error") - - @property - def check_value(self): - check_dict = dict.fromkeys(self.frame_sizes) - linerate = {64: 0.085, 128: 0.12, 256: 0.20, 512: 0.35, 1024: 0.50, 1280: 0.55, 1518: 0.60} - for size in self.frame_sizes: - speed = self.wirespeed(self.nic, size, self.number_of_ports) - check_dict[size] = round(speed * linerate[size], 2) - return check_dict - - def send_and_verify(self): - """ - Send packet with packet generator and verify - """ - for frame_size in self.frame_sizes: - payload_size = frame_size - self.headers_size - tgen_input = [] - rx_port = self.tester.get_local_port(self.dut_ports[0]) - tx_port = self.tester.get_local_port(self.dut_ports[0]) - self.tester.scapy_append( - 'wrpcap("%s/vhost.pcap", [Ether(dst="%s")/Dot1Q(vlan=%s)/IP()/("X"*%d)])' % - (self.out_path, self.virtio_mac, self.vlan_id, payload_size)) - tgen_input.append((tx_port, rx_port, "%s/vhost.pcap" % self.out_path)) - - self.tester.scapy_execute() - self.tester.pktgen.clear_streams() - streams = self.pktgen_helper.prepare_stream_from_tginput(tgen_input, 100, - None, self.tester.pktgen) - trans_options={'delay':5, 'duration': 20} - _, pps = self.tester.pktgen.measure_throughput(stream_ids=streams, options=trans_options) - Mpps = pps / 1000000.0 - self.verify(Mpps > self.check_value[frame_size], - "%s of frame size %d speed verify failed, expect %s, result %s" % ( - self.running_case, frame_size, self.check_value[frame_size], Mpps)) - throughput = Mpps * 100 / \ - float(self.wirespeed(self.nic, frame_size, 1)) - - results_row = [frame_size] - results_row.append("builtin-net-driver") - results_row.append(Mpps) - results_row.append("1") - results_row.append(throughput) - self.result_table_add(results_row) - - @property - def check_2M_env(self): - out = self.dut.send_expect("cat /proc/meminfo |grep Hugepagesize|awk '{print($2)}'", "# ") - return True if out == '2048' else False - - def launch_vhost_switch(self): - """ - start vhost-switch on vhost - """ - self.dut.send_expect("rm -rf ./vhost.out", "#") - eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_vhost_user, prefix='vhost') - command_line_client = "./examples/vhost/build/vhost-switch " + eal_param + ' -- -p 0x1 --mergeable 0 --vm2vm 1 --builtin-net-driver --socket-file ./vhost-net> ./vhost.out &' - self.vhost_switch.send_expect(command_line_client, "# ", 120) - time.sleep(15) - try: - self.logger.info("Launch vhost sample:") - self.dut.session.copy_file_from(self.dut.base_dir + "/vhost.out") - fp = open('./vhost.out', 'r') - out = fp.read() - fp.close() - if "Error" in out: - raise Exception("Launch vhost sample failed") - else: - self.logger.info("Launch vhost sample finished") - except Exception as e: - self.verify(0, "ERROR: Failed to launch vhost sample: %s" % - str(e)) - - def start_virtio_testpmd(self): - """ - start testpmd on virtio - """ - eal_param = self.dut.create_eal_parameters(socket=self.ports_socket, cores=self.core_list_virtio_user, prefix='virtio', - no_pci=True, vdevs=[ - 'net_virtio_user0,mac=%s,path=./vhost-net,queues=1' % self.virtio_mac]) - if self.check_2M_env: - eal_param += " --single-file-segments" - command_line_user = self.path + eal_param + " -- -i --rxq=1 --txq=1" - 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 tx_first", "testpmd> ", 120) - res = self.pmd_out.wait_link_status_up('all') - self.verify(res is True, 'There has port link is down') - - def close_all_apps(self): - """ - close testpmd and vhost-switch - """ - self.virtio_user.send_expect("quit", "# ", 60) - self.vhost_switch.send_expect("killall -s INT vhost", "# ", 60) - self.dut.close_session(self.vhost_switch) - self.dut.close_session(self.virtio_user) - - def test_perf_pvp_with_built_in_net_driver(self): - """ - PVP test with vhost built-in net driver - """ - self.launch_vhost_switch() - self.start_virtio_testpmd() - self.send_and_verify() - self.result_table_print() - self.close_all_apps() - - def tear_down(self): - """ - Run after each test case. - """ - self.dut.send_expect("killall -s INT %s" % self.testpmd_name , "#") - self.dut.send_expect("killall -s INT vhost", "# ") - - def tear_down_all(self): - """ - Run after each test suite. - """ - sed_cmd = "sed -i -e 's/#define MAX_QUEUES.*$/#define MAX_QUEUES %d/' " + \ - "./examples/vhost/main.c" - self.dut.send_expect(sed_cmd % int(self.default_queue), "#", 10) - self.dut.build_dpdk_apps('./examples/vhost') From patchwork Sun Sep 26 09:20:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 99680 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 66002A0547; Sun, 26 Sep 2021 11:27:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5CA3340E46; Sun, 26 Sep 2021 11:27:30 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 8A0744003C for ; Sun, 26 Sep 2021 11:27:28 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10118"; a="285340662" X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="285340662" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:27:27 -0700 X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="475623433" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:27:26 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Date: Sun, 26 Sep 2021 17:20:29 +0800 Message-Id: <20210926092029.3418595-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1 3/5] test_plans/perf_virtio_user_pvp_test_plan: delete test plan 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" Delete perf_virtio_user_pvp test plan because this suite is included by pvp_multi_paths_performance. Signed-off-by: Wei Ling --- test_plans/perf_virtio_user_pvp_test_plan.rst | 191 ------------------ 1 file changed, 191 deletions(-) delete mode 100644 test_plans/perf_virtio_user_pvp_test_plan.rst diff --git a/test_plans/perf_virtio_user_pvp_test_plan.rst b/test_plans/perf_virtio_user_pvp_test_plan.rst deleted file mode 100644 index 8021c9db..00000000 --- a/test_plans/perf_virtio_user_pvp_test_plan.rst +++ /dev/null @@ -1,191 +0,0 @@ -.. Copyright (c) <2019>, Intel Corporation - 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. - -====================================== -vhost/virtio pvp performance test plan -====================================== - -Benchmark PVP performance with split ring mergeable path and packed ring mergeable path. -For basic pvp test,give 1 core for vhost and virtio respectively. -For virtio single core performance test,give 2 cores for vhost and 1 core for virtio, -set io fwd at vhost side to lower the vhost workload. -For vhost single core performance test,give 2 cores for virtio and 1 core for vhost, -set io fwd at virtio side to lower the virtio workload. - -Test flow -========= - -TG --> NIC --> Vhost --> Virtio--> Vhost --> NIC --> TG - -Test Case 1: pvp test with packed ring mergeable path -===================================================== - -1. Bind one port to igb_uio, then launch vhost by below command:: - - rm -rf vhost-net* - ./testpmd -n 4 -l 2-3 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1,client=0' \ - -- -i --nb-cores=1 --txd=1024 --rxd=1024 - testpmd>set fwd mac - testpmd>start - -2. Launch virtio-user by below command:: - - ./testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,mrg_rxbuf=1,in_order=0 \ - -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 - >set fwd mac - >start - -3. Send packet with packet generator with different packet size,includes [64, 1518], check the throughput can get expected data with below command:: - - testpmd>show port stats all - -Test Case 2: virtio single core performance test with packed ring mergeable path -================================================================================= - -1. Bind one port to igb_uio, then launch vhost by below command:: - - rm -rf vhost-net* - ./testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1,client=0' -- -i --nb-cores=2 --txd=1024 --rxd=1024 - testpmd>set fwd io - testpmd>start - -2. Launch virtio-user by below command:: - - ./testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=1,mrg_rxbuf=1,in_order=0 \ - -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 - >set fwd mac - >start - -3. Send packet with packet generator with different packet size,includes [64, 1518], check the throughput can get expected data with below command:: - - testpmd>show port stats all - -Test Case 3: vhost single core performance test with packed ring mergeable path -=============================================================================== - -1. Bind one port to igb_uio, then launch vhost by below command:: - - rm -rf vhost-net* - ./testpmd -l 3-4 -n 4 --no-pci --file-prefix=vhost \ - --vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 - testpmd>set fwd mac - testpmd>start - -2. Launch virtio-user by below command:: - - ./testpmd -l 7-9 -n 4 --file-prefix=virtio \ - --vdev=virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net,queues=1,packed_vq=1,mrg_rxbuf=1,in_order=0 \ - -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --txd=1024 --rxd=1024 - >set fwd io - >start - -3. Send packet with packet generator with different packet size,includes [64, 1518], check the throughput can get expected data with below command:: - - testpmd>show port stats all - -Test Case 4: pvp test with split ring mergeable path -==================================================== - -1. Bind one port to igb_uio, then launch vhost by below command:: - - rm -rf vhost-net* - ./testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1,client=0' \ - -- -i --nb-cores=1 --txd=1024 --rxd=1024 - testpmd>set fwd mac - testpmd>start - -2. Launch virtio-user by below command:: - - ./testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=1 \ - -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --nb-cores=1 --txd=1024 --rxd=1024 - >set fwd mac - >start - -3. Send packet with packet generator with different packet size,includes [64, 1518], check the throughput can get expected data with below command:: - - testpmd>show port stats all - -Test Case 5: virtio single core performance test with split ring mergeable path -=============================================================================== - -1. Bind one port to igb_uio, then launch vhost by below command:: - - rm -rf vhost-net* - ./testpmd -n 4 -l 2-4 \ - --file-prefix=vhost --vdev 'net_vhost0,iface=vhost-net,queues=1,client=0' -- -i --nb-cores=2 --txd=1024 --rxd=1024 - testpmd>set fwd io - testpmd>start - -2. Launch virtio-user by below command:: - - ./testpmd -n 4 -l 5-6 \ - --no-pci --file-prefix=virtio \ - --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,in_order=0,mrg_rxbuf=1 \ - -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=1 --txd=1024 --rxd=1024 - >set fwd mac - >start - -3. Send packet with packet generator with different packet size,includes [64, 1518], check the throughput can get expected data with below command:: - - testpmd>show port stats all - -Test Case 6: vhost single core performance test with split ring mergeable path -============================================================================== - -1. Bind one port to igb_uio, then launch vhost by below command:: - - rm -rf vhost-net* - ./testpmd -l 3-4 -n 4 --no-pci --file-prefix=vhost \ - --vdev 'net_vhost0,iface=vhost-net,queues=1' -- -i --nb-cores=1 --txd=1024 --rxd=1024 - testpmd>set fwd mac - testpmd>start - -2. Launch virtio-user by below command:: - - ./testpmd -l 7-9 -n 4 --file-prefix=virtio \ - --vdev=virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net,queues=1,in_order=0,mrg_rxbuf=1 \ - -- -i --tx-offloads=0x0 --enable-hw-vlan-strip --rss-ip --nb-cores=2 --txd=1024 --rxd=1024 - >set fwd io - >start - -3. Send packet with packet generator with different packet size,includes [64, 1518], check the throughput can get expected data with below command:: - - testpmd>show port stats all \ No newline at end of file From patchwork Sun Sep 26 09:20:40 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 99681 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A7921A0547; Sun, 26 Sep 2021 11:27:40 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9BE264003D; Sun, 26 Sep 2021 11:27:40 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 30B494003C for ; Sun, 26 Sep 2021 11:27:39 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10118"; a="224360986" X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="224360986" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:27:38 -0700 X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="475623468" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:27:36 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Date: Sun, 26 Sep 2021 17:20:40 +0800 Message-Id: <20210926092040.3418653-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1 4/5] tests/perf_virtio_user_pvp: delete test suite 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" Delete perf_virtio_user_pvp test suite because this suite is included by pvp_multi_paths_performance. Signed-off-by: Wei Ling --- tests/TestSuite_perf_virtio_user_pvp.py | 389 ------------------------ 1 file changed, 389 deletions(-) delete mode 100644 tests/TestSuite_perf_virtio_user_pvp.py diff --git a/tests/TestSuite_perf_virtio_user_pvp.py b/tests/TestSuite_perf_virtio_user_pvp.py deleted file mode 100644 index 344dba5a..00000000 --- a/tests/TestSuite_perf_virtio_user_pvp.py +++ /dev/null @@ -1,389 +0,0 @@ -# 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. -""" -import utils -import json -import rst -import os -import re -import time -from test_case import TestCase -from packet import Packet -from settings import UPDATE_EXPECTED, load_global_setting -from copy import deepcopy - - -class TestVirtioSingleCorePerf(TestCase): - - def set_up_all(self): - """ - Run at the start of each test suite. - """ - # Clean the execution environment - self.dut.send_expect("rm -rf ./vhost.out", "#") - self.frame_sizes = [64, 1518] - # Based on h/w type, choose how many ports to use - self.number_of_ports = 1 - self.dut_ports = self.dut.get_ports() - self.nb_ports = len(self.dut_ports) - self.socket = self.dut.get_numa_id(self.dut_ports[0]) - # determine if to save test result as a separated file - self.save_result_flag = True - socket_num = len(set([int(core['socket']) for core in self.dut.cores])) - self.socket_mem = ','.join(['1024']*socket_num) - self.json_obj = dict() - - 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 = self.get_suite_cfg()['test_parameters'] - - # traffic duraion in second - self.test_duration = self.get_suite_cfg()['test_duration'] - - # initilize throughput attribution - # {'$framesize':{"$nb_desc": 'throughput'} - self.throughput = {} - - # Accepted tolerance in Mpps - self.gap = self.get_suite_cfg()['accepted_tolerance'] - - # header to print test result table - self.table_header = ['Frame Size', 'TXD/RXD', 'Throughput', 'Rate', - 'Expected Throughput', 'Throughput Difference'] - self.test_result = {} - - def test_perf_pvp_packed_ring_mergeable_path(self): - """ - pvp test with packed ring mergeable path . - """ - self.test_target = "packed_1q1c" - self.expected_throughput = self.get_suite_cfg()['expected_throughput'][self.test_target] - self.perf_pvp_test(packed=True) - self.handle_expected() - self.handle_results() - - def test_perf_virtio_single_core_performance_of_packed_ring_mergeable_path(self): - """ - virtio single core performance test with packed ring Mergeable Path. - """ - self.test_target = "packed_virtio_single_core" - self.expected_throughput = self.get_suite_cfg()['expected_throughput'][self.test_target] - self.perf_virtio_single_core_test(packed=True) - self.handle_expected() - self.handle_results() - - def test_perf_vhost_single_core_performance_of_pakced_ring_mergeable_path(self): - """ - vhost single core performance test with packed ring Mergeable Path. - """ - self.test_target = "packed_vhost_single_core" - self.expected_throughput = self.get_suite_cfg()['expected_throughput'][self.test_target] - self.perf_vhost_single_core_test(packed=True) - self.handle_expected() - self.handle_results() - - def test_perf_pvp_split_ring_mergeble_path(self): - """ - Benchmark performance for Vhost PVP Mergeable Path. - """ - self.test_target = "split_1q1c" - self.expected_throughput = self.get_suite_cfg()['expected_throughput'][self.test_target] - self.perf_pvp_test(packed=False) - self.handle_expected() - self.handle_results() - - def test_perf_virtio_single_core_performance_of_split_ring_mergeable_path(self): - """ - virtio single core performance test with split ring Mergeable Path. - """ - self.test_target = "split_virtio_single_core" - self.expected_throughput = self.get_suite_cfg()['expected_throughput'][self.test_target] - self.perf_virtio_single_core_test(packed=False) - self.handle_expected() - self.handle_results() - - def test_perf_vhost_single_core_performance_of_split_ring_mergeable_path(self): - """ - : vhost single core performance test with split ring Mergeable Path. - """ - self.test_target = "split_vhost_single_core" - self.expected_throughput = self.get_suite_cfg()['expected_throughput'][self.test_target] - self.perf_vhost_single_core_test(packed=False) - self.handle_expected() - self.handle_results() - - def perf_pvp_test(self, packed): - core_config = "1S/4C/1T" - core_list = self.dut.get_core_list(core_config, socket=self.socket) - self.verify(len(core_list) >= 4, 'There no enough cores to run this case') - self.logger.info("Executing Test Using cores: %s" % core_list) - self.core_list_user = core_list[0:2] - self.core_list_host = core_list[2:4] - nb_desc = self.test_parameters[64][0] - self.start_testpmd_as_vhost('mac', nb_desc, False) - self.start_testpmd_as_virtio('mac', nb_desc, True, packed) - self.send_and_verify_throughput(nb_desc) - - def perf_virtio_single_core_test(self, packed): - """ - Vhost/virtio single core PVP test - """ - core_config = "1S/5C/1T" - core_list = self.dut.get_core_list(core_config, socket=self.socket) - self.verify(len(core_list) >= 5, 'There no enough cores to run this case') - self.logger.info("Executing Test Using cores: %s" % core_list) - self.core_list_user = core_list[0:2] - self.core_list_host = core_list[2:5] - nb_desc = self.test_parameters[64][0] - self.start_testpmd_as_vhost('io', nb_desc, False) - self.start_testpmd_as_virtio('mac', nb_desc, True, packed) - self.send_and_verify_throughput(nb_desc) - - def perf_vhost_single_core_test(self, packed): - """ - Vhost/virtio vhost single core PVP test - """ - core_config = "1S/5C/1T" - core_list = self.dut.get_core_list(core_config, socket=self.socket) - self.verify(len(core_list) >= 5, 'There no enough cores to run this case') - self.logger.info("Executing Test Using cores: %s" % core_list) - self.core_list_user = core_list[0:3] - self.core_list_host = core_list[3:5] - nb_desc = self.test_parameters[64][0] - self.start_testpmd_as_vhost('mac', nb_desc, True) - self.start_testpmd_as_virtio('io', nb_desc, False, packed) - self.send_and_verify_throughput(nb_desc) - - def prepare_stream(self, frame_size): - ''' - create streams for ports, one port two streams, and configure them. - ''' - self.tester.pktgen.clear_streams() - stream_ids = [] - rx_port = self.tester.get_local_port( - self.dut_ports[0]) - tx_port = self.tester.get_local_port( - self.dut_ports[0]) - for port in range(2): - destination_mac = self.dut.get_mac_address( - self.dut_ports[(port) % self.number_of_ports]) - pkt = Packet(pkt_type='IP_RAW', pkt_len=frame_size) - pkt.config_layer('ether', {'dst': '%s' % '52:00:00:00:00:00'}) - pkt.config_layer('ipv4', {'dst': '1.1.%d.1' % port, 'src': '1.1.1.2'}) - pkt.save_pcapfile(self.tester, "%s/single_core_%d.pcap" % (self.tester.tmp_file, port)) - stream_id = self.tester.pktgen.add_stream(tx_port, rx_port, - "%s/single_core_%d.pcap" % (self.tester.tmp_file, port)) - stream_option = { - 'pcap': "%s/single_core_%d.pcap" % (self.tester.tmp_file, port), - 'stream_config': {'rate': 100} - } - self.tester.pktgen.config_stream(stream_id, stream_option) - stream_ids.append(stream_id) - return stream_ids - - def handle_expected(self): - """ - Update expected numbers to configurate file: conf/$suite_name.cfg - """ - if load_global_setting(UPDATE_EXPECTED) == "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] = round(self.throughput[frame_size][nb_desc], 3) - - def start_testpmd_as_vhost(self, fwd_mode, nb_desc, no_pci=False): - if no_pci: - eal_params = self.dut.create_eal_parameters(cores=self.core_list_host, - no_pci=True, prefix='vhost') - else: - eal_params = self.dut.create_eal_parameters(cores=self.core_list_host, - ports=[0], prefix='vhost') - command_line_client = self.target + "/app/testpmd %s " + \ - "--socket-mem 1024,1024 " \ - "--vdev 'net_vhost0,iface=vhost-net,queues=1' " + \ - "-- -i --nb-cores=%d --txd=%d --rxd=%d" - command_line_client = command_line_client % (eal_params, len(self.core_list_host)-1, - nb_desc, nb_desc) - self.dut.send_expect(command_line_client, "testpmd> ", 120) - self.dut.send_expect("set fwd %s" % fwd_mode, "testpmd> ", 120) - self.dut.send_expect("start", "testpmd> ", 120) - - def start_testpmd_as_virtio(self, fwd_mode, nb_desc, no_pci=True, packed_ring=False): - # launch virtio - if no_pci: - eal_params = self.dut.create_eal_parameters(cores=self.core_list_user, - no_pci=True, prefix='virtio') - else: - eal_params = self.dut.create_eal_parameters(cores=self.core_list_user, - ports=[0], prefix='virtio') - - command_line_server = self.target + "/app/testpmd %s " + \ - "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net,packed_vq=%d,mrg_rxbuf=1,in_order=0 " + \ - "-- -i --nb-cores=%d --tx-offloads=0x0 --enable-hw-vlan-strip --txd=%d --rxd=%d" - command_line_server = command_line_server % (eal_params, int(packed_ring), - len(self.core_list_user)-1, nb_desc, nb_desc) - self.vhost_user = self.dut.new_session(suite="user") - self.vhost_user.send_expect(command_line_server, "testpmd> ", 120) - self.vhost_user.send_expect("set fwd %s" % fwd_mode, "testpmd> ", 120) - self.vhost_user.send_expect("start", "testpmd> ", 120) - self.vhost_user.send_expect("start", "testpmd> ", 120) - - def send_and_verify_throughput(self, nb_desc): - for frame_size in self.frame_sizes: - self.throughput[frame_size] = dict() - self.logger.info("Test running at parameters: " + - "framesize: {}, rxd/txd: {}".format(frame_size, nb_desc)) - stream_ids = self.prepare_stream(frame_size) - traffic_opt = { - 'method': 'throughput', - 'rate': 100, - 'duration': 20} - _, pps = self.tester.pktgen.measure(stream_ids, traffic_opt) - Mpps = pps / 1000000.0 - self.verify(Mpps > 0, "%s can not receive packets of frame size %d" % (self.running_case, frame_size)) - throughput = Mpps * 100 / \ - float(self.wirespeed(self.nic, frame_size, self.number_of_ports)) - self.throughput[frame_size][nb_desc] = Mpps - self.verify(throughput, - "No traffic detected, please check your configuration") - self.logger.info("Trouthput of " + - "framesize: {}, rxd/txd: {} is :{} Mpps".format( - frame_size, nb_desc, Mpps)) - - - 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 = self.table_header - for frame_size in self.test_parameters.keys(): - wirespeed = self.wirespeed(self.nic, frame_size, self.nb_ports) - ret_datas = {} - for nb_desc in self.test_parameters[frame_size]: - ret_data = {} - ret_data[header[0]] = frame_size - ret_data[header[1]] = nb_desc - ret_data[header[2]] = "{:.3f} Mpps".format( - self.throughput[frame_size][nb_desc]) - ret_data[header[3]] = "{:.3f}%".format( - self.throughput[frame_size][nb_desc] * 100 / wirespeed) - ret_data[header[4]] = "{:.3f} Mpps".format( - self.expected_throughput[frame_size][nb_desc]) - ret_data[header[5]] = "{:.3f} Mpps".format( - self.throughput[frame_size][nb_desc] - - self.expected_throughput[frame_size][nb_desc]) - ret_datas[nb_desc] = deepcopy(ret_data) - self.test_result[frame_size] = 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 = 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+_perf_virtio_user_pvp.json in output folder - if self.save_result_flag is True - ''' - case_name = self.running_case - self.json_obj[case_name] = list() - status_result = [] - for frame_size in self.test_parameters.keys(): - for nb_desc in self.test_parameters[frame_size]: - row_in = self.test_result[frame_size][nb_desc] - row_dict0 = dict() - row_dict0['performance'] = list() - row_dict0['parameters'] = list() - row_dict0['parameters'] = list() - result_throughput = float(row_in['Throughput'].split()[0]) - expected_throughput = float(row_in['Expected Throughput'].split()[0]) - # delta value and accepted tolerance in percentage - delta = result_throughput - expected_throughput - gap = expected_throughput * -self.gap * 0.01 - delta = float(delta) - gap = float(gap) - self.logger.info("Accept tolerance are (Mpps) %f" % gap) - self.logger.info("Throughput Difference are (Mpps) %f" % delta) - if result_throughput > expected_throughput + gap: - row_dict0['status'] = 'PASS' - else: - row_dict0['status'] = 'FAIL' - row_dict1 = dict(name="Throughput", value=result_throughput, unit="Mpps", delta=delta) - row_dict2 = dict(name="Txd/Rxd", value=row_in["TXD/RXD"], unit="descriptor") - row_dict3 = dict(name="frame_size", value=row_in["Frame Size"], unit="bytes") - row_dict0['performance'].append(row_dict1) - row_dict0['parameters'].append(row_dict2) - row_dict0['parameters'].append(row_dict3) - self.json_obj[case_name].append(row_dict0) - status_result.append(row_dict0['status']) - with open(os.path.join(rst.path2Result, - '{0:s}_{1}.json'.format( - self.nic, self.suite_name)), 'w') as fp: - json.dump(self.json_obj, fp) - self.verify("FAIL" not in status_result, "Exceeded Gap") - - def tear_down(self): - """ - Run after each test case. - """ - self.dut.send_expect("stop", "testpmd> ") - self.dut.send_expect("quit", "# ", 30) - self.vhost_user.send_expect("stop", "testpmd> ") - self.vhost_user.send_expect("quit", "# ", 30) - self.dut.kill_all() - - def tear_down_all(self): - """ - Run after each test suite. - """ - pass From patchwork Sun Sep 26 09:20:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ling, WeiX" X-Patchwork-Id: 99682 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D0A59A0547; Sun, 26 Sep 2021 11:27:49 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CB0AC4003F; Sun, 26 Sep 2021 11:27:49 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 698C94003C for ; Sun, 26 Sep 2021 11:27:48 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10118"; a="223974883" X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="223974883" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:27:47 -0700 X-IronPort-AV: E=Sophos;i="5.85,323,1624345200"; d="scan'208";a="475623496" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Sep 2021 02:27:46 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Date: Sun, 26 Sep 2021 17:20:49 +0800 Message-Id: <20210926092049.3418712-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [dts] [PATCH V1 5/5] test_plans/index: delete 2 test plan 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" Signed-off-by: Wei Ling Tested-by: Wei Ling Tested-by: Yinan Wang --- test_plans/index.rst | 2 -- 1 file changed, 2 deletions(-) diff --git a/test_plans/index.rst b/test_plans/index.rst index b5aaec55..60216cbb 100644 --- a/test_plans/index.rst +++ b/test_plans/index.rst @@ -129,7 +129,6 @@ The following are the test plans for the DPDK DTS automated test system. ntb_test_plan nvgre_test_plan perf_virtio_user_loopback_test_plan - perf_virtio_user_pvp_test_plan perf_vm2vm_virtio_net_perf_test_plan pf_smoke_test_plan pipeline_test_plan @@ -240,7 +239,6 @@ The following are the test plans for the DPDK DTS automated test system. vxlan_gpe_support_in_i40e_test_plan pvp_diff_qemu_version_test_plan pvp_share_lib_test_plan - pvp_vhost_user_built_in_net_driver_test_plan pvp_virtio_user_2M_hugepages_test_plan virtio_unit_cryptodev_func_test_plan virtio_user_for_container_networking_test_plan