Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/114401/?format=api
http://patchwork.dpdk.org/api/patches/114401/?format=api", "web_url": "http://patchwork.dpdk.org/project/dts/patch/20220729020148.999158-1-weix.ling@intel.com/", "project": { "id": 3, "url": "http://patchwork.dpdk.org/api/projects/3/?format=api", "name": "DTS", "link_name": "dts", "list_id": "dts.dpdk.org", "list_email": "dts@dpdk.org", "web_url": "", "scm_url": "git://dpdk.org/tools/dts", "webscm_url": "http://git.dpdk.org/tools/dts/", "list_archive_url": "https://inbox.dpdk.org/dts", "list_archive_url_format": "https://inbox.dpdk.org/dts/{}", "commit_url_format": "" }, "msgid": "<20220729020148.999158-1-weix.ling@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20220729020148.999158-1-weix.ling@intel.com", "date": "2022-07-29T02:01:48", "name": "[V1,2/2] tests/vm2vm_virtio_user_cbdma: modify testsuite to test virito dequeue", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "02c880bcdc639273cf8139d6f02a585d2d06832f", "submitter": { "id": 1828, "url": "http://patchwork.dpdk.org/api/people/1828/?format=api", "name": "Ling, WeiX", "email": "weix.ling@intel.com" }, "delegate": null, "mbox": "http://patchwork.dpdk.org/project/dts/patch/20220729020148.999158-1-weix.ling@intel.com/mbox/", "series": [ { "id": 24120, "url": "http://patchwork.dpdk.org/api/series/24120/?format=api", "web_url": "http://patchwork.dpdk.org/project/dts/list/?series=24120", "date": "2022-07-29T02:01:29", "name": "modify vm2vm_virtio_user_cbdma to test virito dequeue", "version": 1, "mbox": "http://patchwork.dpdk.org/series/24120/mbox/" } ], "comments": "http://patchwork.dpdk.org/api/patches/114401/comments/", "check": "warning", "checks": "http://patchwork.dpdk.org/api/patches/114401/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dts-bounces@dpdk.org>", "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id 298A9A04FD;\n\tFri, 29 Jul 2022 04:06:49 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 21E4840A7E;\n\tFri, 29 Jul 2022 04:06:49 +0200 (CEST)", "from mga07.intel.com (mga07.intel.com [134.134.136.100])\n by mails.dpdk.org (Postfix) with ESMTP id 241324014F\n for <dts@dpdk.org>; Fri, 29 Jul 2022 04:06:46 +0200 (CEST)", "from fmsmga008.fm.intel.com ([10.253.24.58])\n by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Jul 2022 19:06:46 -0700", "from unknown (HELO localhost.localdomain) ([10.239.252.222])\n by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 28 Jul 2022 19:06:43 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1659060407; x=1690596407;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=+piLfSlhR8nDiMVtUGw1kEN67ep6+xmZLtNwv/yDK28=;\n b=fvU/47Xm64MF7MxOWgA5iqqr7VoTNQ8PQ1Hp05Ab/CYTyGoa00FGencd\n zC9CQMINVUGocSMF+qAk8YRd/2wCqW9I5hmWG+s9jgDxVQeGdGhD7kRuW\n lPyO8AmCOM/4RuZlQlakDeA1w9oivgRdrR9rm7iXn78Sn1mcNCBoeOmwU\n HMDFnrhC0bwnwH0GZQa0iNUUngfyyU/PgT9mrWlfO2r8ESVe2C6hXLQWE\n r3yHBT2BO4amgCHjxlyogejZxonFnHhyLIMqdUd4g5rqBZ8KfgDAKrEK6\n fW+h7AfLOCaVE3b51SfdO8VMxMUp5f/1W9/W53sUYi+Y/3eOSPx9nW3H9 A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10422\"; a=\"352668352\"", "E=Sophos;i=\"5.93,200,1654585200\";\n d=\"scan'208,223\";a=\"352668352\"", "E=Sophos;i=\"5.93,200,1654585200\";\n d=\"scan'208,223\";a=\"660037019\"" ], "From": "Wei Ling <weix.ling@intel.com>", "To": "dts@dpdk.org", "Cc": "Wei Ling <weix.ling@intel.com>", "Subject": "[dts][PATCH V1 2/2] tests/vm2vm_virtio_user_cbdma: modify testsuite\n to test virito dequeue", "Date": "Thu, 28 Jul 2022 22:01:48 -0400", "Message-Id": "<20220729020148.999158-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 <dts.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dts/>", "List-Post": "<mailto:dts@dpdk.org>", "List-Help": "<mailto:dts-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>", "Errors-To": "dts-bounces@dpdk.org" }, "content": "From DPDK-22.07, virtio support async dequeue for split and packed ring\npath, so modify vm2vm_virtio_user_cbdma testsuite to test the split and\npacked ring async dequeue feature.\n\nSigned-off-by: Wei Ling <weix.ling@intel.com>\n---\n tests/TestSuite_vm2vm_virtio_user_cbdma.py | 908 +++++++++++++--------\n 1 file changed, 548 insertions(+), 360 deletions(-)", "diff": "diff --git a/tests/TestSuite_vm2vm_virtio_user_cbdma.py b/tests/TestSuite_vm2vm_virtio_user_cbdma.py\nindex 0057047c..d1e20567 100644\n--- a/tests/TestSuite_vm2vm_virtio_user_cbdma.py\n+++ b/tests/TestSuite_vm2vm_virtio_user_cbdma.py\n@@ -1,14 +1,41 @@\n-# SPDX-License-Identifier: BSD-3-Clause\n-# Copyright(c) 2022 Intel Corporation\n+# BSD LICENSE\n #\n+# Copyright(c) <2019> Intel Corporation.\n+# All rights reserved.\n+#\n+# Redistribution and use in source and binary forms, with or without\n+# modification, are permitted provided that the following conditions\n+# are met:\n+#\n+# * Redistributions of source code must retain the above copyright\n+# notice, this list of conditions and the following disclaimer.\n+# * Redistributions in binary form must reproduce the above copyright\n+# notice, this list of conditions and the following disclaimer in\n+# the documentation and/or other materials provided with the\n+# distribution.\n+# * Neither the name of Intel Corporation nor the names of its\n+# contributors may be used to endorse or promote products derived\n+# from this software without specific prior written permission.\n+#\n+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n+# \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\n+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\n+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\n+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\n+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\n+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\n+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n \n \"\"\"\n DPDK Test suite.\n \n Test cases for vm2vm virtio-user\n-This suite include split virtqueue vm2vm in-order mergeable,\n-in-order non-mergeable,mergeable, non-mergeable, vector_rx path\n-test and packed virtqueue vm2vm in-order mergeable, in-order non-mergeable,\n+This suite include split virtqueue vm2vm in-order mergeable, in-order non-mergeable,\n+mergeable, non-mergeable, vector_rx path test\n+and packed virtqueue vm2vm in-order mergeable, in-order non-mergeable,\n mergeable, non-mergeable path test\n \"\"\"\n import re\n@@ -28,8 +55,8 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])\n self.cores_list = self.dut.get_core_list(config=\"all\", socket=self.ports_socket)\n self.vhost_core_list = self.cores_list[0:9]\n- self.virtio0_core_list = self.cores_list[10:12]\n- self.virtio1_core_list = self.cores_list[12:14]\n+ self.virtio0_core_list = self.cores_list[10:13]\n+ self.virtio1_core_list = self.cores_list[13:15]\n self.vhost_user = self.dut.new_session(suite=\"vhost-user\")\n self.virtio_user0 = self.dut.new_session(suite=\"virtio-user0\")\n self.virtio_user1 = self.dut.new_session(suite=\"virtio-user1\")\n@@ -37,7 +64,10 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n self.vhost_user_pmd = PmdOutput(self.dut, self.vhost_user)\n self.virtio_user0_pmd = PmdOutput(self.dut, self.virtio_user0)\n self.virtio_user1_pmd = PmdOutput(self.dut, self.virtio_user1)\n- self.testpmd_name = self.dut.apps_name[\"test-pmd\"].split(\"/\")[-1]\n+ self.path = self.dut.apps_name[\"test-pmd\"]\n+ self.testpmd_name = self.path.split(\"/\")[-1]\n+ self.app_pdump = self.dut.apps_name[\"pdump\"]\n+ self.pdump_name = self.app_pdump.split(\"/\")[-1]\n \n def set_up(self):\n \"\"\"\n@@ -49,6 +79,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n self.dut.send_expect(\"rm -rf %s\" % self.dump_virtio_pcap, \"#\")\n self.dut.send_expect(\"rm -rf %s\" % self.dump_vhost_pcap, \"#\")\n self.dut.send_expect(\"killall -s INT %s\" % self.testpmd_name, \"#\")\n+ self.dut.send_expect(\"killall -s INT %s\" % self.pdump_name, \"#\")\n \n def get_cbdma_ports_info_and_bind_to_dpdk(self, cbdma_num, allow_diff_socket=False):\n \"\"\"\n@@ -88,33 +119,6 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n 60,\n )\n \n- @staticmethod\n- def generate_dms_param(queues):\n- das_list = []\n- for i in range(queues):\n- das_list.append(\"txq{}\".format(i))\n- das_param = \"[{}]\".format(\";\".join(das_list))\n- return das_param\n-\n- @staticmethod\n- def generate_lcore_dma_param(cbdma_list, core_list):\n- group_num = int(len(cbdma_list) / len(core_list))\n- lcore_dma_list = []\n- if len(cbdma_list) == 1:\n- for core in core_list:\n- lcore_dma_list.append(\"lcore{}@{}\".format(core, cbdma_list[0]))\n- elif len(core_list) == 1:\n- for cbdma in cbdma_list:\n- lcore_dma_list.append(\"lcore{}@{}\".format(core_list[0], cbdma))\n- else:\n- for cbdma in cbdma_list:\n- core_list_index = int(cbdma_list.index(cbdma) / group_num)\n- lcore_dma_list.append(\n- \"lcore{}@{}\".format(core_list[core_list_index], cbdma)\n- )\n- lcore_dma_param = \"[{}]\".format(\",\".join(lcore_dma_list))\n- return lcore_dma_param\n-\n def bind_cbdma_device_to_kernel(self):\n self.dut.send_expect(\"modprobe ioatdma\", \"# \")\n self.dut.send_expect(\n@@ -179,10 +183,11 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n fixed_prefix=True,\n )\n \n- def send_251_960byte_and_32_64byte_pkts(self):\n+ def send_502_960byte_and_64_64byte_pkts(self):\n \"\"\"\n send 251 960byte and 32 64byte length packets from virtio_user0 testpmd\n \"\"\"\n+ # case 1\n self.virtio_user0_pmd.execute_cmd(\"set burst 1\")\n self.virtio_user0_pmd.execute_cmd(\"set txpkts 64,128,256,512\")\n self.virtio_user0_pmd.execute_cmd(\"start tx_first 27\")\n@@ -197,26 +202,30 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n out = self.vhost_user_pmd.execute_cmd(\"show port stats all\")\n self.logger.info(out)\n \n- def send_27_4640byte_and_224_64byte_pkts(self):\n+ def send_502_64byte_and_64_4640byte_pkts(self):\n \"\"\"\n- send 54 4640byte and 448 64byte length packets from virtio_user0 testpmd\n+ send 502 64byte and 64 4640byte length packets from virtio_user0 testpmd\n \"\"\"\n+ # case 2\n self.virtio_user0_pmd.execute_cmd(\"set burst 1\")\n- self.virtio_user0_pmd.execute_cmd(\"set txpkts 64,256,2000,64,256,2000\")\n+ self.virtio_user0_pmd.execute_cmd(\"set txpkts 64\")\n self.virtio_user0_pmd.execute_cmd(\"start tx_first 27\")\n self.virtio_user0_pmd.execute_cmd(\"stop\")\n self.virtio_user0_pmd.execute_cmd(\"set burst 32\")\n- self.virtio_user0_pmd.execute_cmd(\"set txpkts 64\")\n self.virtio_user0_pmd.execute_cmd(\"start tx_first 7\")\n self.virtio_user0_pmd.execute_cmd(\"stop\")\n+ self.virtio_user0_pmd.execute_cmd(\"set txpkts 64,256,2000,64,256,2000\")\n+ self.virtio_user0_pmd.execute_cmd(\"start tx_first 1\")\n+ self.virtio_user0_pmd.execute_cmd(\"stop\")\n self.vhost_user_pmd.execute_cmd(\"start\")\n out = self.vhost_user_pmd.execute_cmd(\"show port stats all\")\n self.logger.info(out)\n \n- def send_224_64byte_and_27_4640byte_pkts(self):\n+ def send_448_64byte_and_54_4640byte_pkts(self):\n \"\"\"\n- send 54 4640byte and 448 64byte length packets from virtio_user0 testpmd\n+ send 448 64byte and 54 4640byte length packets from virtio_user0 testpmd\n \"\"\"\n+ # case3, case9, case10, case11\n self.virtio_user0_pmd.execute_cmd(\"set burst 32\")\n self.virtio_user0_pmd.execute_cmd(\"set txpkts 64\")\n self.virtio_user0_pmd.execute_cmd(\"start tx_first 7\")\n@@ -229,11 +238,13 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n out = self.vhost_user_pmd.execute_cmd(\"show port stats all\")\n self.logger.info(out)\n \n- def send_251_64byte_and_32_8000byte_pkts(self):\n+ def send_502_64byte_and_64_8000byte_pkts(self):\n \"\"\"\n send 54 4640byte and 448 64byte length packets from virtio_user0 testpmd\n \"\"\"\n+ # case4, case5, case12\n self.virtio_user0_pmd.execute_cmd(\"set burst 1\")\n+ self.virtio_user0_pmd.execute_cmd(\"set txpkts 64\")\n self.virtio_user0_pmd.execute_cmd(\"start tx_first 27\")\n self.virtio_user0_pmd.execute_cmd(\"stop\")\n self.virtio_user0_pmd.execute_cmd(\"set burst 32\")\n@@ -246,7 +257,45 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n out = self.vhost_user_pmd.execute_cmd(\"show port stats all\")\n self.logger.info(out)\n \n+ def send_448_64byte_and_54_4640byte_pkts(self):\n+ \"\"\"\n+ send 54 4640byte and 448 64byte length packets from virtio_user0 testpmd\n+ \"\"\"\n+ # case6\n+ self.virtio_user0_pmd.execute_cmd(\"set burst 32\")\n+ self.virtio_user0_pmd.execute_cmd(\"set txpkts 64\")\n+ self.virtio_user0_pmd.execute_cmd(\"start tx_first 7\")\n+ self.virtio_user0_pmd.execute_cmd(\"stop\")\n+ self.virtio_user0_pmd.execute_cmd(\"set burst 1\")\n+ self.virtio_user0_pmd.execute_cmd(\"set txpkts 64,256,2000,64,256,2000\")\n+ self.virtio_user0_pmd.execute_cmd(\"start tx_first 27\")\n+ self.virtio_user0_pmd.execute_cmd(\"stop\")\n+ self.vhost_user_pmd.execute_cmd(\"start\")\n+ out = self.vhost_user_pmd.execute_cmd(\"show port stats all\")\n+ self.logger.info(out)\n+\n+ def send_54_4640byte_and_448_64byte_pkts(self):\n+ \"\"\"\n+ send 54 4640byte and 448 64byte length packets from virtio_user0 testpmd\n+ \"\"\"\n+ # case7, case8\n+ self.virtio_user0_pmd.execute_cmd(\"set burst 1\")\n+ self.virtio_user0_pmd.execute_cmd(\"set txpkts 64,256,2000,64,256,2000\")\n+ self.virtio_user0_pmd.execute_cmd(\"start tx_first 27\")\n+ self.virtio_user0_pmd.execute_cmd(\"stop\")\n+ self.virtio_user0_pmd.execute_cmd(\"set burst 32\")\n+ self.virtio_user0_pmd.execute_cmd(\"set txpkts 64\")\n+ self.virtio_user0_pmd.execute_cmd(\"start tx_first 7\")\n+ self.virtio_user0_pmd.execute_cmd(\"stop\")\n+ self.vhost_user_pmd.execute_cmd(\"start\")\n+ out = self.vhost_user_pmd.execute_cmd(\"show port stats all\")\n+ self.logger.info(out)\n+\n def send_1_64byte_pkts(self):\n+ \"\"\"\n+ send 1 64byte length packets from virtio_user0 testpmd\n+ \"\"\"\n+ # case13\n self.virtio_user0_pmd.execute_cmd(\"set burst 1\")\n self.virtio_user0_pmd.execute_cmd(\"start tx_first 1\")\n self.virtio_user0_pmd.execute_cmd(\"stop\")\n@@ -268,17 +317,12 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n if dump the vhost-testpmd, the vhost-testpmd should started before launch pdump\n if dump the virtio-testpmd, the virtio-testpmd should started before launch pdump\n \"\"\"\n- eal_params = self.dut.create_eal_parameters(\n- cores=\"Default\", prefix=\"virtio-user1\", fixed_prefix=True, ports=[]\n- )\n command_line = (\n self.app_pdump\n- + \" %s -v -- \"\n+ + \"-l 1-2 -n 4 --file-prefix=virtio-user1 -v -- \"\n + \"--pdump 'device_id=net_virtio_user1,queue=*,rx-dev=%s,mbuf-size=8000'\"\n )\n- self.pdump_user.send_expect(\n- command_line % (eal_params, self.dump_virtio_pcap), \"Port\"\n- )\n+ self.pdump_user.send_expect(command_line % (self.dump_virtio_pcap), \"Port\")\n \n def check_virtio_user1_stats(self, check_dict):\n \"\"\"\n@@ -328,38 +372,32 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n \"pdump file: {} have not include enough packets {}\".format(count, key),\n )\n \n- def check_vhost_user_testpmd_logs(self):\n- out = self.vhost_user.get_session_before(timeout=30)\n- check_logs = [\n- \"DMA completion failure on channel\",\n- \"DMA copy failed for channel\",\n- ]\n- for check_log in check_logs:\n- self.verify(check_log not in out, \"Vhost-user testpmd Exception\")\n-\n def quit_all_testpmd(self):\n- self.vhost_user_pmd.quit()\n- self.virtio_user0_pmd.quit()\n- self.virtio_user1_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ self.virtio_user0_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ self.virtio_user1_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.pdump_user.send_expect(\"^c\", \"# \", 60)\n \n- def test_split_ring_non_mergeable_path_multi_queues_with_cbdma(self):\n+ def test_split_ring_non_mergeable_path_multi_queues_payload_check_with_cbdma_enable(\n+ self,\n+ ):\n \"\"\"\n- Test Case 1: split virtqueue vm2vm non-mergeable path multi-queues payload check with cbdma enable\n+ Test Case 1: VM2VM split ring non-mergeable path multi-queues payload check with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(2)\n- dmas = self.generate_dms_param(2)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)\n+ lcore_dma = \"lcore%s@%s,\" \"lcore%s@%s\" % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -369,7 +407,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n iova_mode=\"va\",\n )\n \n- 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\"\n+ 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\"\n virtio1_param = (\n \" --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n )\n@@ -380,7 +418,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- 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\"\n+ 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\"\n virtio0_param = (\n \" --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n )\n@@ -390,15 +428,13 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_251_960byte_and_32_64byte_pkts()\n+ self.send_502_960byte_and_64_64byte_pkts()\n check_dict = {960: 502, 64: 64}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n- self.check_vhost_user_testpmd_logs()\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.clear_virtio_user1_stats()\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -409,95 +445,44 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- self.send_251_960byte_and_32_64byte_pkts()\n+ self.send_502_960byte_and_64_64byte_pkts()\n check_dict = {960: 502, 64: 64}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n- self.check_vhost_user_testpmd_logs()\n \n- def test_split_ring_mergeable_path_multi_queues_with_cbdma(self):\n+ def test_split_ping_inorder_non_mergeable_path_multi_queues_payload_check_with_cbdma_enable(\n+ self,\n+ ):\n \"\"\"\n- Test Case 2: split virtqueue vm2vm mergeable path multi-queues payload check with cbdma enable\n+ Test Case 2: VM2VM split ring inorder non-mergeable path multi-queues payload check with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(1)\n- dmas = self.generate_dms_param(2)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list[0:1], core_list=self.vhost_core_list[1:2]\n- )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- )\n- vhost_param = (\n- \" --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n- )\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- eal_param=vhost_eal_param,\n- param=vhost_param,\n- ports=self.cbdma_list,\n- iova_mode=\"va\",\n- )\n-\n- 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\"\n- virtio1_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n- self.start_virtio_testpmd_with_vhost_net1(\n- cores=self.virtio1_core_list,\n- eal_param=virtio1_eal_param,\n- param=virtio1_param,\n- )\n- self.start_pdump_to_capture_pkt()\n-\n- 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\"\n- virtio0_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n- self.start_virtio_testpmd_with_vhost_net0(\n- cores=self.virtio0_core_list,\n- eal_param=virtio0_eal_param,\n- param=virtio0_param,\n- )\n-\n- self.send_27_4640byte_and_224_64byte_pkts()\n- check_dict = {4640: 54, 64: 448}\n- self.check_virtio_user1_stats(check_dict)\n- self.check_packet_payload_valid(check_dict)\n-\n- if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n- self.clear_virtio_user1_stats()\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- eal_param=vhost_eal_param,\n- param=vhost_param,\n- ports=self.cbdma_list,\n- iova_mode=\"pa\",\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=5)\n+ lcore_dma = (\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s\"\n+ % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[3],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[4],\n )\n- self.start_pdump_to_capture_pkt()\n-\n- self.send_27_4640byte_and_224_64byte_pkts()\n- check_dict = {4640: 54, 64: 448}\n- self.check_virtio_user1_stats(check_dict)\n- self.check_packet_payload_valid(check_dict)\n-\n- def test_split_ring_inorder_non_mergeable_path_multi_queues_with_cbdma(self):\n- \"\"\"\n- Test Case 3: split virtqueue vm2vm inorder non-mergeable path multi-queues payload check with cbdma enable\n- \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(5)\n- dmas = self.generate_dms_param(2)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -507,7 +492,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n iova_mode=\"va\",\n )\n \n- 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\"\n+ 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\"\n virtio1_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n self.start_virtio_testpmd_with_vhost_net1(\n cores=self.virtio1_core_list,\n@@ -516,7 +501,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- 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\"\n+ 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\"\n virtio0_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n self.start_virtio_testpmd_with_vhost_net0(\n cores=self.virtio0_core_list,\n@@ -524,14 +509,13 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_27_4640byte_and_224_64byte_pkts()\n- check_dict = {64: 448}\n+ self.send_502_64byte_and_64_4640byte_pkts()\n+ check_dict = {64: 502, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.clear_virtio_user1_stats()\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -542,26 +526,53 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- self.send_27_4640byte_and_224_64byte_pkts()\n- check_dict = {64: 448}\n+ self.send_502_64byte_and_64_4640byte_pkts()\n+ check_dict = {64: 502, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_split_ring_vectorized_path_multi_queues_with_cbdma(self):\n+ def test_split_ring_verctorized_path_multi_queues_payload_check_with_cbdma_enabled(\n+ self,\n+ ):\n \"\"\"\n- Test Case 4: split virtqueue vm2vm vectorized path multi-queues payload check with cbdma enable\n+ Test Case 3: VM2VM split ring vectorized path multi-queues payload check with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(8)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8)\n+ lcore_dma = (\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s\"\n+ % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[3],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[4],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[5],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[6],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[7],\n+ )\n )\n vhost_eal_param = (\n- \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0],dma_ring_size=2048'\"\n- + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1],dma_ring_size=2048'\"\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -580,7 +591,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- 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\"\n+ 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\"\n virtio0_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n self.start_virtio_testpmd_with_vhost_net0(\n cores=self.virtio0_core_list,\n@@ -588,14 +599,13 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_224_64byte_and_27_4640byte_pkts()\n- check_dict = {64: 448}\n+ self.send_448_64byte_and_54_4640byte_pkts()\n+ check_dict = {64: 448, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.clear_virtio_user1_stats()\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -606,30 +616,41 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- self.send_224_64byte_and_27_4640byte_pkts()\n- check_dict = {64: 448}\n+ self.send_448_64byte_and_54_4640byte_pkts()\n+ check_dict = {64: 448, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_split_ring_inorder_mergeable_path_multi_queues_test_non_indirect_descriptor_with_cbdma(\n+ def test_split_ring_inorder_mergeable_path_test_non_indirect_descriptor_with_cbdma_enabled(\n self,\n ):\n \"\"\"\n- Test Case 5: Split virtqueue vm2vm inorder mergeable path test non-indirect descriptor with cbdma enable\n+ Test Case 4: VM2VM split ring inorder mergeable path test non-indirect descriptor with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(4)\n- dmas = self.generate_dms_param(2)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4)\n+ lcore_dma = (\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s\"\n+ % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[3],\n+ )\n )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txd=256 --rxd=256 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=1 --txq=2 --rxq=2 --txd=256 --rxd=256 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -639,7 +660,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n iova_mode=\"va\",\n )\n \n- 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\"\n+ 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\"\n virtio1_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256\"\n self.start_virtio_testpmd_with_vhost_net1(\n cores=self.virtio1_core_list,\n@@ -648,7 +669,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- 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\"\n+ 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\"\n virtio0_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256\"\n self.start_virtio_testpmd_with_vhost_net0(\n cores=self.virtio0_core_list,\n@@ -656,16 +677,15 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_251_64byte_and_32_8000byte_pkts()\n+ self.send_502_64byte_and_64_8000byte_pkts()\n check_dict = {64: 502, 8000: 2}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n- self.virtio_user1_pmd.quit()\n- self.virtio_user0_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ self.virtio_user1_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ self.virtio_user0_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n eal_param=vhost_eal_param,\n@@ -679,36 +699,46 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio1_param,\n )\n self.start_pdump_to_capture_pkt()\n+\n self.start_virtio_testpmd_with_vhost_net0(\n cores=self.virtio0_core_list,\n eal_param=virtio0_eal_param,\n param=virtio0_param,\n )\n \n- self.send_251_64byte_and_32_8000byte_pkts()\n+ self.send_502_64byte_and_64_8000byte_pkts()\n check_dict = {64: 502, 8000: 2}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_split_ring_inorder_mergeable_path_multi_queues_test_indirect_descriptor_with_cbdma(\n- self,\n- ):\n+ def test_split_ring_mergeable_path_test_indirect_descriptor_with_cbdma_enable(self):\n \"\"\"\n- Test Case 6: Split virtqueue vm2vm mergeable path test indirect descriptor with cbdma enable\n+ Test Case 5: VM2VM split ring mergeable path test indirect descriptor with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(4)\n- dmas = self.generate_dms_param(2)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4)\n+ lcore_dma = (\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s\"\n+ % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[3],\n+ )\n )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txd=256 --rxd=256 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -718,7 +748,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n iova_mode=\"va\",\n )\n \n- 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\"\n+ 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\"\n virtio1_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256\"\n self.start_virtio_testpmd_with_vhost_net1(\n cores=self.virtio1_core_list,\n@@ -727,7 +757,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- 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\"\n+ 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\"\n virtio0_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256\"\n self.start_virtio_testpmd_with_vhost_net0(\n cores=self.virtio0_core_list,\n@@ -735,16 +765,19 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_251_64byte_and_32_8000byte_pkts()\n+ self.send_502_64byte_and_64_8000byte_pkts()\n check_dict = {64: 502, 8000: 10}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n- self.virtio_user1_pmd.quit()\n- self.virtio_user0_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ self.virtio_user1_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ self.virtio_user0_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'\"\n+ )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n eal_param=vhost_eal_param,\n@@ -764,28 +797,31 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_251_64byte_and_32_8000byte_pkts()\n+ self.send_502_64byte_and_64_8000byte_pkts()\n check_dict = {64: 502, 8000: 10}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_packed_ring_non_mergeable_path_multi_queues_with_cbdma(self):\n+ def test_packed_ring_non_mergeable_path_multi_queues_payload_check_with_cbdma_enable(\n+ self,\n+ ):\n \"\"\"\n- Test Case 7: packed virtqueue vm2vm non-mergeable path multi-queues payload check with cbdma enable\n+ Test Case 6: VM2VM packed ring non-mergeable path multi-queues payload check with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(2)\n- dmas = self.generate_dms_param(2)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)\n+ lcore_dma = \"lcore%s@%s,\" \"lcore%s@%s\" % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -796,7 +832,9 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n \n 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\"\n- virtio1_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n+ virtio1_param = (\n+ \" --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n+ )\n self.start_virtio_testpmd_with_vhost_net1(\n cores=self.virtio1_core_list,\n eal_param=virtio1_eal_param,\n@@ -805,22 +843,27 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n self.start_pdump_to_capture_pkt()\n \n 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\"\n- virtio0_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n+ virtio0_param = (\n+ \" --enable-hw-vlan-strip --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n+ )\n self.start_virtio_testpmd_with_vhost_net0(\n cores=self.virtio0_core_list,\n eal_param=virtio0_eal_param,\n param=virtio0_param,\n )\n \n- self.send_224_64byte_and_27_4640byte_pkts()\n- check_dict = {64: 448}\n+ self.send_448_64byte_and_54_4640byte_pkts()\n+ check_dict = {64: 448, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.clear_virtio_user1_stats()\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'\"\n+ )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n eal_param=vhost_eal_param,\n@@ -830,28 +873,26 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- self.send_224_64byte_and_27_4640byte_pkts()\n- check_dict = {64: 448}\n+ self.send_448_64byte_and_54_4640byte_pkts()\n+ check_dict = {64: 448, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_packed_ring_mergeable_path_multi_queues_with_cbdma(self):\n+ def test_packed_ring_mergeable_path_multi_queues_payload_check_with_cbdma_enabled(\n+ self,\n+ ):\n \"\"\"\n- Test Case 8: packed virtqueue vm2vm mergeable path multi-queues payload check with cbdma enable\n+ Test Case 7: VM2VM packed ring mergeable path multi-queues payload check with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(1)\n- dmas = self.generate_dms_param(2)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list[0:1], core_list=self.vhost_core_list[1:2]\n- )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=1)\n+ lcore_dma = \"lcore%s@%s,\" % (self.vhost_core_list[1], self.cbdma_list[0])\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -878,15 +919,18 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_27_4640byte_and_224_64byte_pkts()\n+ self.send_54_4640byte_and_448_64byte_pkts()\n check_dict = {4640: 54, 64: 448}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.clear_virtio_user1_stats()\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'\"\n+ )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n eal_param=vhost_eal_param,\n@@ -896,28 +940,44 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- self.send_27_4640byte_and_224_64byte_pkts()\n+ self.send_54_4640byte_and_448_64byte_pkts()\n check_dict = {4640: 54, 64: 448}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_packed_ring_inorder_mergeable_path_multi_queues_with_cbdma(self):\n+ def test_packed_ring_inorder_mergeable_path_multi_queues_payload_check_with_cbdma_enabled(\n+ self,\n+ ):\n \"\"\"\n- Test Case 9: packed virtqueue vm2vm inorder mergeable path multi-queues payload check with cbdma enable\n+ Test Case 8: VM2VM packed ring inorder mergeable path multi-queues payload check with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(5)\n- dmas = self.generate_dms_param(2)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=5)\n+ lcore_dma = (\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s\"\n+ % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[3],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[4],\n+ )\n )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0;rxq1]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0]'\"\n )\n vhost_param = (\n \" --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -944,14 +1004,13 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_27_4640byte_and_224_64byte_pkts()\n+ self.send_54_4640byte_and_448_64byte_pkts()\n check_dict = {4640: 54, 64: 448}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.clear_virtio_user1_stats()\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -962,28 +1021,53 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- self.send_27_4640byte_and_224_64byte_pkts()\n+ self.send_54_4640byte_and_448_64byte_pkts()\n check_dict = {4640: 54, 64: 448}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_packed_ring_inorder_non_mergeable_path_multi_queues_with_cbdma(self):\n+ def test_packed_ring_inorder_non_mergeable_path_multi_queues_payload_check_with_cbdma_enabled(\n+ self,\n+ ):\n \"\"\"\n- Test Case 10: packed virtqueue vm2vm inorder non-mergeable path multi-queues payload check with cbdma enable\n+ Test Case 9: VM2VM packed ring inorder non-mergeable path multi-queues payload check with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(8)\n- dmas = self.generate_dms_param(1)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8)\n+ lcore_dma = (\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s\"\n+ % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[3],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[4],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[5],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[6],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[7],\n+ )\n )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1;rxq1]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -1002,7 +1086,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- 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\"\n+ 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\"\n virtio0_param = \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096\"\n self.start_virtio_testpmd_with_vhost_net0(\n cores=self.virtio0_core_list,\n@@ -1010,14 +1094,13 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_224_64byte_and_27_4640byte_pkts()\n- check_dict = {64: 448}\n+ self.send_448_64byte_and_54_4640byte_pkts()\n+ check_dict = {64: 448, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.clear_virtio_user1_stats()\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -1028,26 +1111,53 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- self.send_224_64byte_and_27_4640byte_pkts()\n- check_dict = {64: 448}\n+ self.send_448_64byte_and_54_4640byte_pkts()\n+ check_dict = {64: 448, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_packed_ring_inorder_vectorized_rx_path_multi_queues_with_cbdma(self):\n+ def test_packed_ring_vectorized_rx_path_multi_queues_payload_check_with_cbdma_enabled(\n+ self,\n+ ):\n \"\"\"\n- Test Case 11: packed virtqueue vm2vm vectorized-rx path multi-queues payload check with cbdma enable\n+ Test Case 10: VM2VM packed ring vectorized-rx path multi-queues payload check with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(8)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:3]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8)\n+ lcore_dma = (\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s\"\n+ % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[3],\n+ self.vhost_core_list[2],\n+ self.cbdma_list[4],\n+ self.vhost_core_list[2],\n+ self.cbdma_list[5],\n+ self.vhost_core_list[2],\n+ self.cbdma_list[6],\n+ self.vhost_core_list[2],\n+ self.cbdma_list[7],\n+ )\n )\n vhost_eal_param = (\n- \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0],dma_ring_size=2048'\"\n- + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1],dma_ring_size=2048'\"\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;rxq0]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1;rxq1]'\"\n )\n vhost_param = (\n- \" --nb-cores=2 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=2 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -1074,14 +1184,13 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_224_64byte_and_27_4640byte_pkts()\n- check_dict = {64: 448}\n+ self.send_448_64byte_and_54_4640byte_pkts()\n+ check_dict = {64: 448, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.clear_virtio_user1_stats()\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -1092,30 +1201,53 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- self.send_224_64byte_and_27_4640byte_pkts()\n- check_dict = {64: 448}\n+ self.send_448_64byte_and_54_4640byte_pkts()\n+ check_dict = {64: 448, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_packed_ring_inorder_vectorized_path_multi_queues_check_with_ring_size_is_not_power_of_2_queues_with_cbdma(\n+ def test_packed_ring_vectorized_path_multi_queues_payload_check_with_cbdma_enabled(\n self,\n ):\n \"\"\"\n- Test Case 12: packed virtqueue vm2vm vectorized path multi-queues payload check with ring size is not power of 2 and cbdma enabled\n+ Test Case 11: VM2VM packed ring vectorized path multi-queues payload check test with ring size is not power of 2 with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(8)\n- dmas = self.generate_dms_param(2)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8)\n+ lcore_dma = (\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s\"\n+ % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[3],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[4],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[5],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[6],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[7],\n+ )\n )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1;rxq0;rxq1]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txd=4096 --rxd=4096 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=1 --rxq=2 --txq=2 --txd=4096 --rxd=4096 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -1142,15 +1274,18 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_224_64byte_and_27_4640byte_pkts()\n- check_dict = {64: 448}\n+ self.send_448_64byte_and_54_4640byte_pkts()\n+ check_dict = {64: 448, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n self.clear_virtio_user1_stats()\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[rxq0]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1]'\"\n+ )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n eal_param=vhost_eal_param,\n@@ -1160,30 +1295,53 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- self.send_224_64byte_and_27_4640byte_pkts()\n- check_dict = {64: 448}\n+ self.send_448_64byte_and_54_4640byte_pkts()\n+ check_dict = {64: 448, 4640: 0}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_packed_ring_vectorized_tx_path_multi_queues_test_indirect_descriptor_with_cbdma(\n+ def test_pakced_packed_ring_vectorized_tx_path_multi_queues_test_indirect_descriptor_with_cbdma_enabled(\n self,\n ):\n \"\"\"\n- Test Case 13: packed virtqueue vm2vm vectorized-tx path multi-queues test indirect descriptor with cbdma enable\n+ Test Case 12: VM2VM packed ring vectorized-tx path multi-queues test indirect descriptor and payload check with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(8)\n- dmas = self.generate_dms_param(2)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8)\n+ lcore_dma = (\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s\"\n+ % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[3],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[4],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[5],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[6],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[7],\n+ )\n )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[txq0]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq1]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txd=256 --rxd=256 --txq=2 --rxq=2 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ \" --nb-cores=1 --rxq=2 --txq=2 --txd=256 --rxd=256 --no-flush-rx\"\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -1210,16 +1368,19 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_251_64byte_and_32_8000byte_pkts()\n+ self.send_502_64byte_and_64_8000byte_pkts()\n check_dict = {64: 502, 8000: 10}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n if not self.check_2M_env:\n- self.logger.info(\"Quit and relaunch vhost with iova=pa\")\n- self.vhost_user_pmd.quit()\n- self.virtio_user1_pmd.quit()\n- self.virtio_user0_pmd.quit()\n+ self.vhost_user_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ self.virtio_user1_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ self.virtio_user0_pmd.execute_cmd(\"quit\", \"#\", 60)\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=2,client=1,dmas=[rxq0;rxq1]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=2,client=1,dmas=[txq0;txq1]'\"\n+ )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n eal_param=vhost_eal_param,\n@@ -1239,28 +1400,53 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n param=virtio0_param,\n )\n \n- self.send_251_64byte_and_32_8000byte_pkts()\n+ self.send_502_64byte_and_64_8000byte_pkts()\n check_dict = {64: 502, 8000: 10}\n self.check_virtio_user1_stats(check_dict)\n self.check_packet_payload_valid(check_dict)\n \n- def test_packed_ring_vectorized_tx_path_test_batch_processing_with_cbdma(self):\n+ def test_packed_ring_vectorized_tx_path_test_batch_processing_with_cbdma_enabled(\n+ self,\n+ ):\n \"\"\"\n- Test Case 14: packed virtqueue vm2vm vectorized-tx path test batch processing with cbdma enable\n+ Test Case 13: VM2VM packed ring vectorized-tx path test batch processing with cbdma enable\n \"\"\"\n- self.get_cbdma_ports_info_and_bind_to_dpdk(8)\n- dmas = self.generate_dms_param(1)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:2]\n+ self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8)\n+ lcore_dma = (\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s,\"\n+ \"lcore%s@%s\"\n+ % (\n+ self.vhost_core_list[1],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[3],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[4],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[5],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[6],\n+ self.vhost_core_list[1],\n+ self.cbdma_list[7],\n+ )\n )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=1,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=1,client=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost-net0,queues=1,client=1,dmas=[txq0;rxq0]'\"\n+ + \" --vdev 'net_vhost1,iface=vhost-net1,queues=1,client=1,dmas=[txq0;rxq0]'\"\n )\n vhost_param = (\n \" --nb-cores=1 --txd=256 --rxd=256 --txq=1 --rxq=1 --no-flush-rx\"\n- + \" --lcore-dma={}\".format(lcore_dma)\n+ + \" --lcore-dma=[%s]\" % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -1270,7 +1456,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n iova_mode=\"va\",\n )\n \n- 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\"\n+ 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\"\n virtio1_param = \" --nb-cores=1 --rxq=1 --txq=1 --txd=256 --rxd=256\"\n self.start_virtio_testpmd_with_vhost_net1(\n cores=self.virtio1_core_list,\n@@ -1279,7 +1465,7 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n )\n self.start_pdump_to_capture_pkt()\n \n- 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\"\n+ 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\"\n virtio0_param = \" --nb-cores=1 --rxq=1 --txq=1 --txd=256 --rxd=256\"\n self.start_virtio_testpmd_with_vhost_net0(\n cores=self.virtio0_core_list,\n@@ -1308,6 +1494,8 @@ class TestVM2VMVirtioUserCbdma(TestCase):\n \"\"\"\n self.quit_all_testpmd()\n self.dut.kill_all()\n+ self.dut.send_expect(\"killall -s INT %s\" % self.testpmd_name, \"#\")\n+ self.dut.send_expect(\"killall -s INT %s\" % self.pdump_name, \"#\")\n self.bind_cbdma_device_to_kernel()\n \n def tear_down_all(self):\n", "prefixes": [ "V1", "2/2" ] }{ "id": 114401, "url": "