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 395F7A04FD; Fri, 29 Jul 2022 09:20:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 357B542C0A; Fri, 29 Jul 2022 09:20:33 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 9E6A940151 for ; Fri, 29 Jul 2022 09:20:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659079230; x=1690615230; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=PBbnz73R0bVW9EOsXBmCCO7prdnu8Mp3VO+Zy4pcAOE=; b=CfBABfHHkLE87Ynu4+Znhdl22jfdqsfgci28OXvfsvcsEG1TqKh37pNz 8Prr/aULydt0ydoo5yNbOh1PXejoYbeyR2Eb6EQeT76xtohO5E0TPW+eG yDWqXqd0Fwb5m7rNQo0ezoWJ7pcmcZ/fTToK+PQFRSnRbpRmQGkitL3B9 vORCeIu0htMHjAkf0Hskts7Pw8bjYY7pgvwmiBYeUQqbw1p5xrH9t+a+P 0cfm92TmhLrVkHWECarkrHMjDA6C4xUryxhMJFr4RLbXfMbH8QaD65uCw p6iKiKLOgHjnWLUsewXR7RD9kkCZTm4NZR0nkiYTRlb0UQoHd19h0iQmn Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10422"; a="271752321" X-IronPort-AV: E=Sophos;i="5.93,200,1654585200"; d="scan'208,223";a="271752321" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2022 00:20:29 -0700 X-IronPort-AV: E=Sophos;i="5.93,200,1654585200"; d="scan'208,223";a="598174163" Received: from unknown (HELO localhost.localdomain) ([10.239.252.222]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2022 00:20:27 -0700 From: Wei Ling To: dts@dpdk.org Cc: Wei Ling Subject: [dts][PATCH V2 2/2] tests/vm2vm_virtio_user_cbdma: modify testsuite to test virito dequeue Date: Fri, 29 Jul 2022 03:15:30 -0400 Message-Id: <20220729071530.1006934-1-weix.ling@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 >From DPDK-22.07, virtio support async dequeue for split and packed ring path, so modify vm2vm_virtio_user_cbdma testsuite to test the split and packed ring async dequeue feature. Signed-off-by: Wei Ling --- tests/TestSuite_vm2vm_virtio_user_cbdma.py | 902 +++++++++++++-------- 1 file changed, 544 insertions(+), 358 deletions(-) diff --git a/tests/TestSuite_vm2vm_virtio_user_cbdma.py b/tests/TestSuite_vm2vm_virtio_user_cbdma.py index 0057047c..8cd3efe4 100644 --- a/tests/TestSuite_vm2vm_virtio_user_cbdma.py +++ b/tests/TestSuite_vm2vm_virtio_user_cbdma.py @@ -1,14 +1,39 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2022 Intel Corporation # +# 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 cases for vm2vm virtio-user -This suite include split virtqueue vm2vm in-order mergeable, -in-order non-mergeable,mergeable, non-mergeable, vector_rx path -test and packed virtqueue vm2vm in-order mergeable, in-order non-mergeable, +This suite include split virtqueue vm2vm in-order mergeable, in-order non-mergeable, +mergeable, non-mergeable, vector_rx path test +and packed virtqueue vm2vm in-order mergeable, in-order non-mergeable, mergeable, non-mergeable path test """ import re @@ -28,8 +53,8 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.ports_socket = self.dut.get_numa_id(self.dut_ports[0]) self.cores_list = self.dut.get_core_list(config="all", socket=self.ports_socket) self.vhost_core_list = self.cores_list[0:9] - self.virtio0_core_list = self.cores_list[10:12] - self.virtio1_core_list = self.cores_list[12:14] + self.virtio0_core_list = self.cores_list[10:13] + self.virtio1_core_list = self.cores_list[13:15] self.vhost_user = self.dut.new_session(suite="vhost-user") self.virtio_user0 = self.dut.new_session(suite="virtio-user0") self.virtio_user1 = self.dut.new_session(suite="virtio-user1") @@ -37,7 +62,10 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.vhost_user_pmd = PmdOutput(self.dut, self.vhost_user) self.virtio_user0_pmd = PmdOutput(self.dut, self.virtio_user0) self.virtio_user1_pmd = PmdOutput(self.dut, self.virtio_user1) - self.testpmd_name = self.dut.apps_name["test-pmd"].split("/")[-1] + self.path = self.dut.apps_name["test-pmd"] + self.testpmd_name = self.path.split("/")[-1] + self.app_pdump = self.dut.apps_name["pdump"] + self.pdump_name = self.app_pdump.split("/")[-1] def set_up(self): """ @@ -49,6 +77,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.dut.send_expect("rm -rf %s" % self.dump_virtio_pcap, "#") self.dut.send_expect("rm -rf %s" % self.dump_vhost_pcap, "#") self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") + self.dut.send_expect("killall -s INT %s" % self.pdump_name, "#") def get_cbdma_ports_info_and_bind_to_dpdk(self, cbdma_num, allow_diff_socket=False): """ @@ -88,33 +117,6 @@ class TestVM2VMVirtioUserCbdma(TestCase): 60, ) - @staticmethod - def generate_dms_param(queues): - das_list = [] - for i in range(queues): - das_list.append("txq{}".format(i)) - das_param = "[{}]".format(";".join(das_list)) - return das_param - - @staticmethod - def generate_lcore_dma_param(cbdma_list, core_list): - group_num = int(len(cbdma_list) / len(core_list)) - lcore_dma_list = [] - if len(cbdma_list) == 1: - for core in core_list: - lcore_dma_list.append("lcore{}@{}".format(core, cbdma_list[0])) - elif len(core_list) == 1: - for cbdma in cbdma_list: - lcore_dma_list.append("lcore{}@{}".format(core_list[0], cbdma)) - else: - for cbdma in cbdma_list: - core_list_index = int(cbdma_list.index(cbdma) / group_num) - lcore_dma_list.append( - "lcore{}@{}".format(core_list[core_list_index], cbdma) - ) - lcore_dma_param = "[{}]".format(",".join(lcore_dma_list)) - return lcore_dma_param - def bind_cbdma_device_to_kernel(self): self.dut.send_expect("modprobe ioatdma", "# ") self.dut.send_expect( @@ -179,10 +181,11 @@ class TestVM2VMVirtioUserCbdma(TestCase): fixed_prefix=True, ) - def send_251_960byte_and_32_64byte_pkts(self): + def send_502_960byte_and_64_64byte_pkts(self): """ send 251 960byte and 32 64byte length packets from virtio_user0 testpmd """ + # case 1 self.virtio_user0_pmd.execute_cmd("set burst 1") self.virtio_user0_pmd.execute_cmd("set txpkts 64,128,256,512") self.virtio_user0_pmd.execute_cmd("start tx_first 27") @@ -197,26 +200,30 @@ class TestVM2VMVirtioUserCbdma(TestCase): out = self.vhost_user_pmd.execute_cmd("show port stats all") self.logger.info(out) - def send_27_4640byte_and_224_64byte_pkts(self): + def send_502_64byte_and_64_4640byte_pkts(self): """ - send 54 4640byte and 448 64byte length packets from virtio_user0 testpmd + send 502 64byte and 64 4640byte length packets from virtio_user0 testpmd """ + # case 2 self.virtio_user0_pmd.execute_cmd("set burst 1") - self.virtio_user0_pmd.execute_cmd("set txpkts 64,256,2000,64,256,2000") + self.virtio_user0_pmd.execute_cmd("set txpkts 64") self.virtio_user0_pmd.execute_cmd("start tx_first 27") self.virtio_user0_pmd.execute_cmd("stop") self.virtio_user0_pmd.execute_cmd("set burst 32") - self.virtio_user0_pmd.execute_cmd("set txpkts 64") self.virtio_user0_pmd.execute_cmd("start tx_first 7") self.virtio_user0_pmd.execute_cmd("stop") + self.virtio_user0_pmd.execute_cmd("set txpkts 64,256,2000,64,256,2000") + self.virtio_user0_pmd.execute_cmd("start tx_first 1") + self.virtio_user0_pmd.execute_cmd("stop") self.vhost_user_pmd.execute_cmd("start") out = self.vhost_user_pmd.execute_cmd("show port stats all") self.logger.info(out) - def send_224_64byte_and_27_4640byte_pkts(self): + def send_448_64byte_and_54_4640byte_pkts(self): """ - send 54 4640byte and 448 64byte length packets from virtio_user0 testpmd + send 448 64byte and 54 4640byte length packets from virtio_user0 testpmd """ + # case3, case9, case10, case11 self.virtio_user0_pmd.execute_cmd("set burst 32") self.virtio_user0_pmd.execute_cmd("set txpkts 64") self.virtio_user0_pmd.execute_cmd("start tx_first 7") @@ -229,11 +236,13 @@ class TestVM2VMVirtioUserCbdma(TestCase): out = self.vhost_user_pmd.execute_cmd("show port stats all") self.logger.info(out) - def send_251_64byte_and_32_8000byte_pkts(self): + def send_502_64byte_and_64_8000byte_pkts(self): """ send 54 4640byte and 448 64byte length packets from virtio_user0 testpmd """ + # case4, case5, case12 self.virtio_user0_pmd.execute_cmd("set burst 1") + self.virtio_user0_pmd.execute_cmd("set txpkts 64") self.virtio_user0_pmd.execute_cmd("start tx_first 27") self.virtio_user0_pmd.execute_cmd("stop") self.virtio_user0_pmd.execute_cmd("set burst 32") @@ -246,7 +255,45 @@ class TestVM2VMVirtioUserCbdma(TestCase): out = self.vhost_user_pmd.execute_cmd("show port stats all") self.logger.info(out) + def send_448_64byte_and_54_4640byte_pkts(self): + """ + send 54 4640byte and 448 64byte length packets from virtio_user0 testpmd + """ + # case6 + self.virtio_user0_pmd.execute_cmd("set burst 32") + self.virtio_user0_pmd.execute_cmd("set txpkts 64") + self.virtio_user0_pmd.execute_cmd("start tx_first 7") + self.virtio_user0_pmd.execute_cmd("stop") + self.virtio_user0_pmd.execute_cmd("set burst 1") + self.virtio_user0_pmd.execute_cmd("set txpkts 64,256,2000,64,256,2000") + self.virtio_user0_pmd.execute_cmd("start tx_first 27") + self.virtio_user0_pmd.execute_cmd("stop") + self.vhost_user_pmd.execute_cmd("start") + out = self.vhost_user_pmd.execute_cmd("show port stats all") + self.logger.info(out) + + def send_54_4640byte_and_448_64byte_pkts(self): + """ + send 54 4640byte and 448 64byte length packets from virtio_user0 testpmd + """ + # case7, case8 + self.virtio_user0_pmd.execute_cmd("set burst 1") + self.virtio_user0_pmd.execute_cmd("set txpkts 64,256,2000,64,256,2000") + self.virtio_user0_pmd.execute_cmd("start tx_first 27") + self.virtio_user0_pmd.execute_cmd("stop") + self.virtio_user0_pmd.execute_cmd("set burst 32") + self.virtio_user0_pmd.execute_cmd("set txpkts 64") + self.virtio_user0_pmd.execute_cmd("start tx_first 7") + self.virtio_user0_pmd.execute_cmd("stop") + self.vhost_user_pmd.execute_cmd("start") + out = self.vhost_user_pmd.execute_cmd("show port stats all") + self.logger.info(out) + def send_1_64byte_pkts(self): + """ + send 1 64byte length packets from virtio_user0 testpmd + """ + # case13 self.virtio_user0_pmd.execute_cmd("set burst 1") self.virtio_user0_pmd.execute_cmd("start tx_first 1") self.virtio_user0_pmd.execute_cmd("stop") @@ -268,17 +315,12 @@ class TestVM2VMVirtioUserCbdma(TestCase): if dump the vhost-testpmd, the vhost-testpmd should started before launch pdump if dump the virtio-testpmd, the virtio-testpmd should started before launch pdump """ - eal_params = self.dut.create_eal_parameters( - cores="Default", prefix="virtio-user1", fixed_prefix=True, ports=[] - ) command_line = ( self.app_pdump - + " %s -v -- " + + "-l 1-2 -n 4 --file-prefix=virtio-user1 -v -- " + "--pdump 'device_id=net_virtio_user1,queue=*,rx-dev=%s,mbuf-size=8000'" ) - self.pdump_user.send_expect( - command_line % (eal_params, self.dump_virtio_pcap), "Port" - ) + self.pdump_user.send_expect(command_line % (self.dump_virtio_pcap), "Port") def check_virtio_user1_stats(self, check_dict): """ @@ -328,38 +370,32 @@ class TestVM2VMVirtioUserCbdma(TestCase): "pdump file: {} have not include enough packets {}".format(count, key), ) - def check_vhost_user_testpmd_logs(self): - out = self.vhost_user.get_session_before(timeout=30) - check_logs = [ - "DMA completion failure on channel", - "DMA copy failed for channel", - ] - for check_log in check_logs: - self.verify(check_log not in out, "Vhost-user testpmd Exception") - def quit_all_testpmd(self): - self.vhost_user_pmd.quit() - self.virtio_user0_pmd.quit() - self.virtio_user1_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.virtio_user0_pmd.execute_cmd("quit", "#", 60) + self.virtio_user1_pmd.execute_cmd("quit", "#", 60) self.pdump_user.send_expect("^c", "# ", 60) - def test_split_ring_non_mergeable_path_multi_queues_with_cbdma(self): + def test_split_ring_non_mergeable_path_multi_queues_payload_check_with_cbdma_enable( + self, + ): """ - Test Case 1: split virtqueue vm2vm non-mergeable path multi-queues payload check with cbdma enable + Test Case 1: VM2VM split ring non-mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(2) - dmas = self.generate_dms_param(2) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2) + lcore_dma = "lcore%s@%s," "lcore%s@%s" % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" ) vhost_param = ( - " --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -369,7 +405,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): iova_mode="va", ) - virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=0,mrg_rxbuf=0,in_order=0,queue_size=4096" + virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,mrg_rxbuf=0,in_order=0,queue_size=4096" virtio1_param = ( " --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" ) @@ -380,7 +416,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=0,mrg_rxbuf=0,in_order=0,queue_size=4096" + virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=0,queue_size=4096" virtio0_param = ( " --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" ) @@ -390,15 +426,13 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_251_960byte_and_32_64byte_pkts() + self.send_502_960byte_and_64_64byte_pkts() check_dict = {960: 502, 64: 64} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - self.check_vhost_user_testpmd_logs() if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) self.clear_virtio_user1_stats() self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -409,95 +443,44 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - self.send_251_960byte_and_32_64byte_pkts() + self.send_502_960byte_and_64_64byte_pkts() check_dict = {960: 502, 64: 64} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - self.check_vhost_user_testpmd_logs() - def test_split_ring_mergeable_path_multi_queues_with_cbdma(self): + def test_split_ping_inorder_non_mergeable_path_multi_queues_payload_check_with_cbdma_enable( + self, + ): """ - Test Case 2: split virtqueue vm2vm mergeable path multi-queues payload check with cbdma enable + Test Case 2: VM2VM split ring inorder non-mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(1) - dmas = self.generate_dms_param(2) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list[0:1], core_list=self.vhost_core_list[1:2] - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) - vhost_param = ( - " --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) - ) - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="va", - ) - - virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=0,mrg_rxbuf=1,in_order=0,queue_size=4096" - virtio1_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" - self.start_virtio_testpmd_with_vhost_net1( - cores=self.virtio1_core_list, - eal_param=virtio1_eal_param, - param=virtio1_param, - ) - self.start_pdump_to_capture_pkt() - - virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=0,mrg_rxbuf=1,in_order=0,queue_size=4096" - virtio0_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" - self.start_virtio_testpmd_with_vhost_net0( - cores=self.virtio0_core_list, - eal_param=virtio0_eal_param, - param=virtio0_param, - ) - - self.send_27_4640byte_and_224_64byte_pkts() - check_dict = {4640: 54, 64: 448} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) - - if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() - self.clear_virtio_user1_stats() - self.start_vhost_testpmd( - cores=self.vhost_core_list, - eal_param=vhost_eal_param, - param=vhost_param, - ports=self.cbdma_list, - iova_mode="pa", + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=5) + lcore_dma = ( + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s" + % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], + self.vhost_core_list[1], + self.cbdma_list[2], + self.vhost_core_list[1], + self.cbdma_list[3], + self.vhost_core_list[1], + self.cbdma_list[4], ) - self.start_pdump_to_capture_pkt() - - self.send_27_4640byte_and_224_64byte_pkts() - check_dict = {4640: 54, 64: 448} - self.check_virtio_user1_stats(check_dict) - self.check_packet_payload_valid(check_dict) - - def test_split_ring_inorder_non_mergeable_path_multi_queues_with_cbdma(self): - """ - Test Case 3: split virtqueue vm2vm inorder non-mergeable path multi-queues payload check with cbdma enable - """ - self.get_cbdma_ports_info_and_bind_to_dpdk(5) - dmas = self.generate_dms_param(2) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" ) vhost_param = ( - " --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -507,7 +490,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): iova_mode="va", ) - virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=0,mrg_rxbuf=0,in_order=1,queue_size=4096" + virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,mrg_rxbuf=0,in_order=1,queue_size=4096" virtio1_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" self.start_virtio_testpmd_with_vhost_net1( cores=self.virtio1_core_list, @@ -516,7 +499,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=0,mrg_rxbuf=0,in_order=1,queue_size=4096" + virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=1,queue_size=4096" virtio0_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" self.start_virtio_testpmd_with_vhost_net0( cores=self.virtio0_core_list, @@ -524,14 +507,13 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_27_4640byte_and_224_64byte_pkts() - check_dict = {64: 448} + self.send_502_64byte_and_64_4640byte_pkts() + check_dict = {64: 502, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) self.clear_virtio_user1_stats() self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -542,26 +524,53 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - self.send_27_4640byte_and_224_64byte_pkts() - check_dict = {64: 448} + self.send_502_64byte_and_64_4640byte_pkts() + check_dict = {64: 502, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_split_ring_vectorized_path_multi_queues_with_cbdma(self): + def test_split_ring_verctorized_path_multi_queues_payload_check_with_cbdma_enabled( + self, + ): """ - Test Case 4: split virtqueue vm2vm vectorized path multi-queues payload check with cbdma enable + Test Case 3: VM2VM split ring vectorized path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(8) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) + lcore_dma = ( + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s" + % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], + self.vhost_core_list[1], + self.cbdma_list[2], + self.vhost_core_list[1], + self.cbdma_list[3], + self.vhost_core_list[1], + self.cbdma_list[4], + self.vhost_core_list[1], + self.cbdma_list[5], + self.vhost_core_list[1], + self.cbdma_list[6], + self.vhost_core_list[1], + self.cbdma_list[7], + ) ) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0],dma_ring_size=2048'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1],dma_ring_size=2048'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" ) vhost_param = ( - " --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -580,7 +589,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=0,vectorized=1,queue_size=4096" + virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=0,,vectorized=1,queue_size=4096" virtio0_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" self.start_virtio_testpmd_with_vhost_net0( cores=self.virtio0_core_list, @@ -588,14 +597,13 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_224_64byte_and_27_4640byte_pkts() - check_dict = {64: 448} + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) self.clear_virtio_user1_stats() self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -606,30 +614,41 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - self.send_224_64byte_and_27_4640byte_pkts() - check_dict = {64: 448} + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_split_ring_inorder_mergeable_path_multi_queues_test_non_indirect_descriptor_with_cbdma( + def test_split_ring_inorder_mergeable_path_test_non_indirect_descriptor_with_cbdma_enabled( self, ): """ - Test Case 5: Split virtqueue vm2vm inorder mergeable path test non-indirect descriptor with cbdma enable + Test Case 4: VM2VM split ring inorder mergeable path test non-indirect descriptor with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(4) - dmas = self.generate_dms_param(2) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) + lcore_dma = ( + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s" + % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], + self.vhost_core_list[1], + self.cbdma_list[2], + self.vhost_core_list[1], + self.cbdma_list[3], + ) ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" ) vhost_param = ( - " --nb-cores=1 --txd=256 --rxd=256 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=1 --txq=2 --rxq=2 --txd=256 --rxd=256 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -639,7 +658,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): iova_mode="va", ) - virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=0,mrg_rxbuf=1,in_order=1,queue_size=256" + virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,mrg_rxbuf=1,in_order=1,queue_size=256" virtio1_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256" self.start_virtio_testpmd_with_vhost_net1( cores=self.virtio1_core_list, @@ -648,7 +667,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=0,mrg_rxbuf=1,in_order=1,queue_size=256" + virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=1,in_order=1,queue_size=256" virtio0_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256" self.start_virtio_testpmd_with_vhost_net0( cores=self.virtio0_core_list, @@ -656,16 +675,15 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_251_64byte_and_32_8000byte_pkts() + self.send_502_64byte_and_64_8000byte_pkts() check_dict = {64: 502, 8000: 2} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() - self.virtio_user1_pmd.quit() - self.virtio_user0_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.virtio_user1_pmd.execute_cmd("quit", "#", 60) + self.virtio_user0_pmd.execute_cmd("quit", "#", 60) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, @@ -679,36 +697,46 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio1_param, ) self.start_pdump_to_capture_pkt() + self.start_virtio_testpmd_with_vhost_net0( cores=self.virtio0_core_list, eal_param=virtio0_eal_param, param=virtio0_param, ) - self.send_251_64byte_and_32_8000byte_pkts() + self.send_502_64byte_and_64_8000byte_pkts() check_dict = {64: 502, 8000: 2} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_split_ring_inorder_mergeable_path_multi_queues_test_indirect_descriptor_with_cbdma( - self, - ): + def test_split_ring_mergeable_path_test_indirect_descriptor_with_cbdma_enable(self): """ - Test Case 6: Split virtqueue vm2vm mergeable path test indirect descriptor with cbdma enable + Test Case 5: VM2VM split ring mergeable path test indirect descriptor with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(4) - dmas = self.generate_dms_param(2) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4) + lcore_dma = ( + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s" + % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], + self.vhost_core_list[1], + self.cbdma_list[2], + self.vhost_core_list[1], + self.cbdma_list[3], + ) ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" ) vhost_param = ( - " --nb-cores=1 --txd=256 --rxd=256 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -718,7 +746,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): iova_mode="va", ) - virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=0,mrg_rxbuf=1,in_order=0,queue_size=256" + virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,mrg_rxbuf=1,in_order=0,queue_size=256" virtio1_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256" self.start_virtio_testpmd_with_vhost_net1( cores=self.virtio1_core_list, @@ -727,7 +755,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=0,mrg_rxbuf=1,in_order=0,queue_size=256" + virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=1,in_order=0,queue_size=256" virtio0_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256" self.start_virtio_testpmd_with_vhost_net0( cores=self.virtio0_core_list, @@ -735,16 +763,19 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_251_64byte_and_32_8000byte_pkts() + self.send_502_64byte_and_64_8000byte_pkts() check_dict = {64: 502, 8000: 10} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() - self.virtio_user1_pmd.quit() - self.virtio_user0_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.virtio_user1_pmd.execute_cmd("quit", "#", 60) + self.virtio_user0_pmd.execute_cmd("quit", "#", 60) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" + ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, @@ -764,28 +795,31 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_251_64byte_and_32_8000byte_pkts() + self.send_502_64byte_and_64_8000byte_pkts() check_dict = {64: 502, 8000: 10} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_packed_ring_non_mergeable_path_multi_queues_with_cbdma(self): + def test_packed_ring_non_mergeable_path_multi_queues_payload_check_with_cbdma_enable( + self, + ): """ - Test Case 7: packed virtqueue vm2vm non-mergeable path multi-queues payload check with cbdma enable + Test Case 6: VM2VM packed ring non-mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(2) - dmas = self.generate_dms_param(2) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2) + lcore_dma = "lcore%s@%s," "lcore%s@%s" % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" ) vhost_param = ( - " --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -796,7 +830,9 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) virtio1_eal_param = "--vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=0,queue_size=4096" - virtio1_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" + virtio1_param = ( + " --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" + ) self.start_virtio_testpmd_with_vhost_net1( cores=self.virtio1_core_list, eal_param=virtio1_eal_param, @@ -805,22 +841,27 @@ class TestVM2VMVirtioUserCbdma(TestCase): self.start_pdump_to_capture_pkt() virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=0,queue_size=4096" - virtio0_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" + virtio0_param = ( + " --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" + ) self.start_virtio_testpmd_with_vhost_net0( cores=self.virtio0_core_list, eal_param=virtio0_eal_param, param=virtio0_param, ) - self.send_224_64byte_and_27_4640byte_pkts() - check_dict = {64: 448} + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) self.clear_virtio_user1_stats() + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" + ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, @@ -830,28 +871,26 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - self.send_224_64byte_and_27_4640byte_pkts() - check_dict = {64: 448} + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_packed_ring_mergeable_path_multi_queues_with_cbdma(self): + def test_packed_ring_mergeable_path_multi_queues_payload_check_with_cbdma_enabled( + self, + ): """ - Test Case 8: packed virtqueue vm2vm mergeable path multi-queues payload check with cbdma enable + Test Case 7: VM2VM packed ring mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(1) - dmas = self.generate_dms_param(2) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list[0:1], core_list=self.vhost_core_list[1:2] - ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=1) + lcore_dma = "lcore%s@%s," % (self.vhost_core_list[1], self.cbdma_list[0]) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" ) vhost_param = ( - " --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -878,15 +917,18 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_27_4640byte_and_224_64byte_pkts() + self.send_54_4640byte_and_448_64byte_pkts() check_dict = {4640: 54, 64: 448} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) self.clear_virtio_user1_stats() + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" + ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, @@ -896,28 +938,44 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - self.send_27_4640byte_and_224_64byte_pkts() + self.send_54_4640byte_and_448_64byte_pkts() check_dict = {4640: 54, 64: 448} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_packed_ring_inorder_mergeable_path_multi_queues_with_cbdma(self): + def test_packed_ring_inorder_mergeable_path_multi_queues_payload_check_with_cbdma_enabled( + self, + ): """ - Test Case 9: packed virtqueue vm2vm inorder mergeable path multi-queues payload check with cbdma enable + Test Case 8: VM2VM packed ring inorder mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(5) - dmas = self.generate_dms_param(2) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=5) + lcore_dma = ( + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s" + % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], + self.vhost_core_list[1], + self.cbdma_list[2], + self.vhost_core_list[1], + self.cbdma_list[3], + self.vhost_core_list[1], + self.cbdma_list[4], + ) ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'" ) vhost_param = ( " --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -944,14 +1002,13 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_27_4640byte_and_224_64byte_pkts() + self.send_54_4640byte_and_448_64byte_pkts() check_dict = {4640: 54, 64: 448} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) self.clear_virtio_user1_stats() self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -962,28 +1019,53 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - self.send_27_4640byte_and_224_64byte_pkts() + self.send_54_4640byte_and_448_64byte_pkts() check_dict = {4640: 54, 64: 448} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_packed_ring_inorder_non_mergeable_path_multi_queues_with_cbdma(self): + def test_packed_ring_inorder_non_mergeable_path_multi_queues_payload_check_with_cbdma_enabled( + self, + ): """ - Test Case 10: packed virtqueue vm2vm inorder non-mergeable path multi-queues payload check with cbdma enable + Test Case 9: VM2VM packed ring inorder non-mergeable path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(8) - dmas = self.generate_dms_param(1) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) + lcore_dma = ( + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s" + % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], + self.vhost_core_list[1], + self.cbdma_list[2], + self.vhost_core_list[1], + self.cbdma_list[3], + self.vhost_core_list[1], + self.cbdma_list[4], + self.vhost_core_list[1], + self.cbdma_list[5], + self.vhost_core_list[1], + self.cbdma_list[6], + self.vhost_core_list[1], + self.cbdma_list[7], + ) ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1;rxq1]'" ) vhost_param = ( - " --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -1002,7 +1084,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=0,in_order=1,queue_size=4096" + virtio0_eal_param = "--vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,mrg_rxbuf=0,in_order=0,vectorized=1,queue_size=4096" virtio0_param = " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096" self.start_virtio_testpmd_with_vhost_net0( cores=self.virtio0_core_list, @@ -1010,14 +1092,13 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_224_64byte_and_27_4640byte_pkts() - check_dict = {64: 448} + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) self.clear_virtio_user1_stats() self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -1028,26 +1109,53 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - self.send_224_64byte_and_27_4640byte_pkts() - check_dict = {64: 448} + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_packed_ring_inorder_vectorized_rx_path_multi_queues_with_cbdma(self): + def test_packed_ring_vectorized_rx_path_multi_queues_payload_check_with_cbdma_enabled( + self, + ): """ - Test Case 11: packed virtqueue vm2vm vectorized-rx path multi-queues payload check with cbdma enable + Test Case 10: VM2VM packed ring vectorized-rx path multi-queues payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(8) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:3] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) + lcore_dma = ( + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s" + % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], + self.vhost_core_list[1], + self.cbdma_list[2], + self.vhost_core_list[1], + self.cbdma_list[3], + self.vhost_core_list[2], + self.cbdma_list[4], + self.vhost_core_list[2], + self.cbdma_list[5], + self.vhost_core_list[2], + self.cbdma_list[6], + self.vhost_core_list[2], + self.cbdma_list[7], + ) ) vhost_eal_param = ( - "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0],dma_ring_size=2048'" - + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1],dma_ring_size=2048'" + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1;rxq1]'" ) vhost_param = ( - " --nb-cores=2 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -1074,14 +1182,13 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_224_64byte_and_27_4640byte_pkts() - check_dict = {64: 448} + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) self.clear_virtio_user1_stats() self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -1092,30 +1199,53 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - self.send_224_64byte_and_27_4640byte_pkts() - check_dict = {64: 448} + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_packed_ring_inorder_vectorized_path_multi_queues_check_with_ring_size_is_not_power_of_2_queues_with_cbdma( + def test_packed_ring_vectorized_path_multi_queues_payload_check_with_cbdma_enabled( self, ): """ - Test Case 12: packed virtqueue vm2vm vectorized path multi-queues payload check with ring size is not power of 2 and cbdma enabled + Test Case 11: VM2VM packed ring vectorized path multi-queues payload check test with ring size is not power of 2 with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(8) - dmas = self.generate_dms_param(2) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) + lcore_dma = ( + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s" + % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], + self.vhost_core_list[1], + self.cbdma_list[2], + self.vhost_core_list[1], + self.cbdma_list[3], + self.vhost_core_list[1], + self.cbdma_list[4], + self.vhost_core_list[1], + self.cbdma_list[5], + self.vhost_core_list[1], + self.cbdma_list[6], + self.vhost_core_list[1], + self.cbdma_list[7], + ) ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'" ) vhost_param = ( - " --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -1142,15 +1272,18 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_224_64byte_and_27_4640byte_pkts() - check_dict = {64: 448} + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) self.clear_virtio_user1_stats() + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[rxq0]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1]'" + ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, @@ -1160,30 +1293,53 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - self.send_224_64byte_and_27_4640byte_pkts() - check_dict = {64: 448} + self.send_448_64byte_and_54_4640byte_pkts() + check_dict = {64: 448, 4640: 0} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_packed_ring_vectorized_tx_path_multi_queues_test_indirect_descriptor_with_cbdma( + def test_pakced_packed_ring_vectorized_tx_path_multi_queues_test_indirect_descriptor_with_cbdma_enabled( self, ): """ - Test Case 13: packed virtqueue vm2vm vectorized-tx path multi-queues test indirect descriptor with cbdma enable + Test Case 12: VM2VM packed ring vectorized-tx path multi-queues test indirect descriptor and payload check with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(8) - dmas = self.generate_dms_param(2) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) + lcore_dma = ( + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s" + % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], + self.vhost_core_list[1], + self.cbdma_list[2], + self.vhost_core_list[1], + self.cbdma_list[3], + self.vhost_core_list[1], + self.cbdma_list[4], + self.vhost_core_list[1], + self.cbdma_list[5], + self.vhost_core_list[1], + self.cbdma_list[6], + self.vhost_core_list[1], + self.cbdma_list[7], + ) ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'".format( - dmas + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1]'" ) vhost_param = ( - " --nb-cores=1 --txd=256 --rxd=256 --txq=2 --rxq=2 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + " --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx" + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -1210,16 +1366,19 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_251_64byte_and_32_8000byte_pkts() + self.send_502_64byte_and_64_8000byte_pkts() check_dict = {64: 502, 8000: 10} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) if not self.check_2M_env: - self.logger.info("Quit and relaunch vhost with iova=pa") - self.vhost_user_pmd.quit() - self.virtio_user1_pmd.quit() - self.virtio_user0_pmd.quit() + self.vhost_user_pmd.execute_cmd("quit", "#", 60) + self.virtio_user1_pmd.execute_cmd("quit", "#", 60) + self.virtio_user0_pmd.execute_cmd("quit", "#", 60) + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[rxq0;rxq1]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]'" + ) self.start_vhost_testpmd( cores=self.vhost_core_list, eal_param=vhost_eal_param, @@ -1239,28 +1398,53 @@ class TestVM2VMVirtioUserCbdma(TestCase): param=virtio0_param, ) - self.send_251_64byte_and_32_8000byte_pkts() + self.send_502_64byte_and_64_8000byte_pkts() check_dict = {64: 502, 8000: 10} self.check_virtio_user1_stats(check_dict) self.check_packet_payload_valid(check_dict) - def test_packed_ring_vectorized_tx_path_test_batch_processing_with_cbdma(self): + def test_packed_ring_vectorized_tx_path_test_batch_processing_with_cbdma_enabled( + self, + ): """ - Test Case 14: packed virtqueue vm2vm vectorized-tx path test batch processing with cbdma enable + Test Case 13: VM2VM packed ring vectorized-tx path test batch processing with cbdma enable """ - self.get_cbdma_ports_info_and_bind_to_dpdk(8) - dmas = self.generate_dms_param(1) - lcore_dma = self.generate_lcore_dma_param( - cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2] + self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8) + lcore_dma = ( + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s," + "lcore%s@%s" + % ( + self.vhost_core_list[1], + self.cbdma_list[0], + self.vhost_core_list[1], + self.cbdma_list[1], + self.vhost_core_list[1], + self.cbdma_list[2], + self.vhost_core_list[1], + self.cbdma_list[3], + self.vhost_core_list[1], + self.cbdma_list[4], + self.vhost_core_list[1], + self.cbdma_list[5], + self.vhost_core_list[1], + self.cbdma_list[6], + self.vhost_core_list[1], + self.cbdma_list[7], + ) ) - vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=1,client=1,dmas={},dma_ring_size=2048'".format( - dmas - ) + " --vdev 'net_vhost1,iface=vhost-net1,queues=1,client=1,dmas={},dma_ring_size=2048'".format( - dmas + vhost_eal_param = ( + "--vdev 'net_vhost0,iface=vhost-net0,queues=1,client=1,dmas=[txq0;rxq0]'" + + " --vdev 'net_vhost1,iface=vhost-net1,queues=1,client=1,dmas=[txq0;rxq0]'" ) vhost_param = ( " --nb-cores=1 --txd=256 --rxd=256 --txq=1 --rxq=1 --no-flush-rx" - + " --lcore-dma={}".format(lcore_dma) + + " --lcore-dma=[%s]" % lcore_dma ) self.start_vhost_testpmd( cores=self.vhost_core_list, @@ -1270,7 +1454,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): iova_mode="va", ) - virtio1_eal_param = "--force-max-simd-bitwidth=512 --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256" + virtio1_eal_param = "--force-max-simd-bitwidth=512 --vdev=net_virtio_user1,mac=00:01:02:03:04:05,path=./vhost-net1,queues=1,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256" virtio1_param = " --nb-cores=1 --rxq=1 --txq=1 --txd=256 --rxd=256" self.start_virtio_testpmd_with_vhost_net1( cores=self.virtio1_core_list, @@ -1279,7 +1463,7 @@ class TestVM2VMVirtioUserCbdma(TestCase): ) self.start_pdump_to_capture_pkt() - virtio0_eal_param = "--force-max-simd-bitwidth=512 --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=2,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256" + virtio0_eal_param = "--force-max-simd-bitwidth=512 --vdev=net_virtio_user0,mac=00:01:02:03:04:05,path=./vhost-net0,queues=1,server=1,packed_vq=1,mrg_rxbuf=1,in_order=1,vectorized=1,queue_size=256" virtio0_param = " --nb-cores=1 --rxq=1 --txq=1 --txd=256 --rxd=256" self.start_virtio_testpmd_with_vhost_net0( cores=self.virtio0_core_list, @@ -1308,6 +1492,8 @@ class TestVM2VMVirtioUserCbdma(TestCase): """ self.quit_all_testpmd() self.dut.kill_all() + self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#") + self.dut.send_expect("killall -s INT %s" % self.pdump_name, "#") self.bind_cbdma_device_to_kernel() def tear_down_all(self): -- 2.25.1