Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/114816/?format=api
http://patches.dpdk.org/api/patches/114816/?format=api", "web_url": "http://patches.dpdk.org/project/dts/patch/20220811054337.385561-1-weix.ling@intel.com/", "project": { "id": 3, "url": "http://patches.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": "<20220811054337.385561-1-weix.ling@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20220811054337.385561-1-weix.ling@intel.com", "date": "2022-08-11T05:43:37", "name": "[V1,2/2] tests/vhost_cbdma: modify testsuite to test virtio dequeue", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "741effa30eafb8fe282e53380704d223fd189cea", "submitter": { "id": 1828, "url": "http://patches.dpdk.org/api/people/1828/?format=api", "name": "Ling, WeiX", "email": "weix.ling@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dts/patch/20220811054337.385561-1-weix.ling@intel.com/mbox/", "series": [ { "id": 24253, "url": "http://patches.dpdk.org/api/series/24253/?format=api", "web_url": "http://patches.dpdk.org/project/dts/list/?series=24253", "date": "2022-08-11T05:43:10", "name": "modify vhost_cbdma to test virito dequeue", "version": 1, "mbox": "http://patches.dpdk.org/series/24253/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/114816/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/114816/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 DFC83A0548;\n\tThu, 11 Aug 2022 07:47:07 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id D925140DDE;\n\tThu, 11 Aug 2022 07:47:07 +0200 (CEST)", "from mga18.intel.com (mga18.intel.com [134.134.136.126])\n by mails.dpdk.org (Postfix) with ESMTP id 5994F40A87\n for <dts@dpdk.org>; Thu, 11 Aug 2022 07:47:05 +0200 (CEST)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Aug 2022 22:47:04 -0700", "from unknown (HELO localhost.localdomain) ([10.239.252.222])\n by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 10 Aug 2022 22:47:02 -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=1660196825; x=1691732825;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=3NrEcaXgnoiXKwoKrwhjIUHQiDd7lUR7bkjP6wA63hw=;\n b=AsGI/KRpY/TvP4pqgHTPbBfLumgwG6cv8aMfLE97zSQvYnQn18HMh639\n DNncBPzd6sBi1le0dSJI10qUSqoJmvEhrSxFB+Pw5Obeak1wBPstzDIMe\n 7B5doF0C58RQ8pw6a8ujgSUoGJLQNy9+n6v/+QjHohlF+dZCKRYfG2rTa\n yGVvJa7IpEe1YXztPf7TprSQJZp7i5SZf+XGWwIbyDxcucyEg5mrBmziT\n IgnBW13F1KEMGmEMlsL6qhsU5XSSHxtEZCKPXi9naH3g4UlJmFL+6977W\n C0EDrxwT3Em3QTZOMu7QeomAWNQJxkHbsxVLl+cczscgr7377AzHXM4Ta g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10435\"; a=\"274320761\"", "E=Sophos;i=\"5.93,228,1654585200\";\n d=\"scan'208,223\";a=\"274320761\"", "E=Sophos;i=\"5.93,228,1654585200\";\n d=\"scan'208,223\";a=\"602050694\"" ], "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/vhost_cbdma: modify testsuite to test\n virtio dequeue", "Date": "Thu, 11 Aug 2022 01:43:37 -0400", "Message-Id": "<20220811054337.385561-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 vhost_cbdma testsuite to test the split and packed ring \nasync dequeue feature.\n\nSigned-off-by: Wei Ling <weix.ling@intel.com>\n---\n tests/TestSuite_vhost_cbdma.py | 2158 +++++++++++---------------------\n 1 file changed, 713 insertions(+), 1445 deletions(-)", "diff": "diff --git a/tests/TestSuite_vhost_cbdma.py b/tests/TestSuite_vhost_cbdma.py\nindex 0584809d..ff79f581 100644\n--- a/tests/TestSuite_vhost_cbdma.py\n+++ b/tests/TestSuite_vhost_cbdma.py\n@@ -15,20 +15,20 @@ from framework.settings import HEADER_SIZE, UPDATE_EXPECTED, load_global_setting\n from framework.test_case import TestCase\n \n SPLIT_RING_PATH = {\n- \"inorder_mergeable_path\": \"mrg_rxbuf=1,in_order=1\",\n- \"mergeable_path\": \"mrg_rxbuf=1,in_order=0\",\n- \"inorder_non_mergeable_path\": \"mrg_rxbuf=0,in_order=1\",\n- \"non_mergeable_path\": \"mrg_rxbuf=0,in_order=0\",\n- \"vectorized_path\": \"mrg_rxbuf=0,in_order=0,vectorized=1\",\n+ \"inorder_mergeable\": \"mrg_rxbuf=1,in_order=1\",\n+ \"mergeable\": \"mrg_rxbuf=1,in_order=0\",\n+ \"inorder_non_mergeable\": \"mrg_rxbuf=0,in_order=1\",\n+ \"non_mergeable\": \"mrg_rxbuf=0,in_order=0\",\n+ \"vectorized\": \"mrg_rxbuf=0,in_order=0,vectorized=1\",\n }\n \n PACKED_RING_PATH = {\n- \"inorder_mergeable_path\": \"mrg_rxbuf=1,in_order=1,packed_vq=1\",\n- \"mergeable_path\": \"mrg_rxbuf=1,in_order=0,packed_vq=1\",\n- \"inorder_non_mergeable_path\": \"mrg_rxbuf=0,in_order=1,packed_vq=1\",\n- \"non_mergeable_path\": \"mrg_rxbuf=0,in_order=0,packed_vq=1\",\n- \"vectorized_path\": \"mrg_rxbuf=0,in_order=0,vectorized=1,packed_vq=1\",\n- \"vectorized_path_not_power_of_2\": \"mrg_rxbuf=0,in_order=0,vectorized=1,packed_vq=1\",\n+ \"inorder_mergeable\": \"mrg_rxbuf=1,in_order=1,packed_vq=1\",\n+ \"mergeable\": \"mrg_rxbuf=1,in_order=0,packed_vq=1\",\n+ \"inorder_non_mergeable\": \"mrg_rxbuf=0,in_order=1,packed_vq=1\",\n+ \"non_mergeable\": \"mrg_rxbuf=0,in_order=0,packed_vq=1\",\n+ \"vectorized\": \"mrg_rxbuf=0,in_order=0,vectorized=1,packed_vq=1\",\n+ \"vectorized_path_not_power_of_2\": \"mrg_rxbuf=0,in_order=0,vectorized=1,packed_vq=1,queue_size=1025\",\n }\n \n \n@@ -41,12 +41,12 @@ class TestVhostCbdma(TestCase):\n self.vhost_user_pmd = PmdOutput(self.dut, self.vhost_user)\n self.virtio_user_pmd = PmdOutput(self.dut, self.virtio_user)\n self.virtio_mac = \"00:01:02:03:04:05\"\n- self.headers_size = HEADER_SIZE[\"eth\"] + HEADER_SIZE[\"ip\"]\n+ self.headers_size = HEADER_SIZE[\"eth\"] + HEADER_SIZE[\"ip\"] + HEADER_SIZE[\"tcp\"]\n self.pci_info = self.dut.ports_info[0][\"pci\"]\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.virtio_core_list = self.cores_list[9:11]\n+ self.virtio_core_list = self.cores_list[10:15]\n self.out_path = \"/tmp/%s\" % self.suite_name\n out = self.tester.send_expect(\"ls -d %s\" % self.out_path, \"# \")\n if \"No such file or directory\" in out:\n@@ -71,7 +71,6 @@ class TestVhostCbdma(TestCase):\n self.nb_desc = self.test_parameters.get(list(self.test_parameters.keys())[0])[0]\n self.dut.send_expect(\"killall -I %s\" % self.testpmd_name, \"#\", 20)\n self.dut.send_expect(\"rm -rf %s/vhost-net*\" % self.base_dir, \"#\")\n- self.dut.send_expect(\"rm -rf /tmp/s0\", \"#\")\n self.mode_list = []\n \n def get_cbdma_ports_info_and_bind_to_dpdk(self, cbdma_num, allow_diff_socket=False):\n@@ -112,33 +111,6 @@ class TestVhostCbdma(TestCase):\n 60,\n )\n \n- @staticmethod\n- def generate_dmas_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@@ -155,18 +127,20 @@ class TestVhostCbdma(TestCase):\n port_num = re.search(\"Number of available ports:\\s*(\\d*)\", out)\n return int(port_num.group(1))\n \n- def check_each_queue_of_port_packets(self, queues=0):\n+ def check_each_queue_of_port_packets(self, queues):\n \"\"\"\n check each queue of each port has receive packets\n \"\"\"\n+ self.logger.info(self.vhost_user_pmd.execute_cmd(\"show port stats all\"))\n out = self.vhost_user_pmd.execute_cmd(\"stop\")\n+ self.logger.info(out)\n port_num = self.get_vhost_port_num()\n for port in range(port_num):\n for queue in range(queues):\n- if queues > 0:\n- reg = \"Port= %d/Queue= %d\" % (port, queue)\n+ if queues == 1:\n+ reg = \"Forward statistics for port %d\" % port\n else:\n- reg = \"Forward statistics for port {}\".format(port)\n+ reg = \"Port= %d/Queue= %d\" % (port, queue)\n index = out.find(reg)\n rx = re.search(\"RX-packets:\\s*(\\d*)\", out[index:])\n tx = re.search(\"TX-packets:\\s*(\\d*)\", out[index:])\n@@ -174,10 +148,9 @@ class TestVhostCbdma(TestCase):\n tx_packets = int(tx.group(1))\n self.verify(\n rx_packets > 0 and tx_packets > 0,\n- \"The port {}/queue {} rx-packets or tx-packets is 0 about \".format(\n- port, queue\n- )\n- + \"rx-packets: {}, tx-packets: {}\".format(rx_packets, tx_packets),\n+ \"The port %d/queue %d rx-packets or tx-packets is 0 about \"\n+ % (port, queue)\n+ + \"rx-packets: %d, tx-packets: %d\" % (rx_packets, tx_packets),\n )\n self.vhost_user_pmd.execute_cmd(\"start\")\n \n@@ -195,7 +168,9 @@ class TestVhostCbdma(TestCase):\n self.vhost_user_pmd.start_testpmd(\n cores=cores, param=param, eal_param=eal_param, ports=ports, prefix=\"vhost\"\n )\n- self.vhost_user_pmd.execute_cmd(\"set fwd mac\")\n+ if self.nic == \"I40E_40G-QSFP_A\":\n+ self.vhost_user_pmd.execute_cmd(\"port config all rss ipv4-tcp\")\n+ self.vhost_user_pmd.execute_cmd(\"set fwd csum\")\n self.vhost_user_pmd.execute_cmd(\"start\")\n \n def start_virtio_testpmd(self, cores=\"Default\", param=\"\", eal_param=\"\"):\n@@ -204,32 +179,42 @@ class TestVhostCbdma(TestCase):\n self.virtio_user_pmd.start_testpmd(\n cores=cores, param=param, eal_param=eal_param, no_pci=True, prefix=\"virtio\"\n )\n- self.virtio_user_pmd.execute_cmd(\"set fwd mac\")\n+ self.virtio_user_pmd.execute_cmd(\"set fwd csum\")\n self.virtio_user_pmd.execute_cmd(\"start\")\n- self.virtio_user_pmd.execute_cmd(\"show port info all\")\n \n- def test_perf_pvp_split_all_path_vhost_txq_1_to_1_cbdma(self):\n+ def test_perf_pvp_split_ring_all_path_multi_queues_vhost_async_operation_with_1_to_1(\n+ self,\n+ ):\n \"\"\"\n- Test Case 1: PVP split ring all path vhost enqueue operations with 1 to 1 mapping between vrings and CBDMA virtual channels\n+ Test Case 1: PVP split ring all path multi-queues vhost async operation with 1 to 1 mapping between vrings and CBDMA virtual channels\n \"\"\"\n- cbdma_num = 1\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- dmas = self.generate_dmas_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=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=/tmp/s0,queues=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost_net0,queues=2,dmas=[txq0;txq1;rxq0;rxq1]'\"\n )\n vhost_param = (\n- \"--nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n+ \"--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n )\n- virtio_param = \"--nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024\"\n allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n+ for i in self.cbdma_list:\n+ allow_pci.append(i)\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n@@ -237,18 +222,17 @@ class TestVhostCbdma(TestCase):\n ports=allow_pci,\n iova_mode=\"va\",\n )\n+ virtio_param = \"--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024\"\n for key, path in SPLIT_RING_PATH.items():\n virtio_eal_param = (\n- \"--vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=1'\".format(\n- self.virtio_mac, path\n- )\n+ \"--vdev 'net_virtio_user0,mac=%s,path=vhost_net0,%s,queues=2'\"\n+ % (self.virtio_mac, path)\n )\n- if key == \"non_mergeable_path\":\n+ if key == \"non_mergeable\":\n new_virtio_param = \"--enable-hw-vlan-strip \" + virtio_param\n else:\n new_virtio_param = virtio_param\n \n- self.logger.info(\"Start virtio-user with {} path with {}\".format(key, path))\n mode = key + \"_VA\"\n self.mode_list.append(mode)\n self.start_virtio_testpmd(\n@@ -257,12 +241,12 @@ class TestVhostCbdma(TestCase):\n eal_param=virtio_eal_param,\n )\n self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n+ self.check_each_queue_of_port_packets(queues=2)\n \n- self.logger.info(\"Restart vhost with {} path with {}\".format(key, path))\n mode += \"_RestartVhost\"\n+ self.mode_list.append(mode)\n self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n+ self.check_each_queue_of_port_packets(queues=2)\n self.virtio_user_pmd.quit()\n \n if not self.check_2M_env:\n@@ -275,37 +259,29 @@ class TestVhostCbdma(TestCase):\n iova_mode=\"pa\",\n )\n for key, path in SPLIT_RING_PATH.items():\n- virtio_eal_param = (\n- \"--vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=1'\".format(\n- self.virtio_mac, path\n+ if key == \"inorder_mergeable\":\n+ virtio_eal_param = (\n+ \"--vdev 'net_virtio_user0,mac=%s,path=./vhost_net0,%s,queues=2'\"\n+ % (self.virtio_mac, path)\n )\n- )\n- if key == \"non_mergeable_path\":\n- new_virtio_param = \"--enable-hw-vlan-strip \" + virtio_param\n- else:\n- new_virtio_param = virtio_param\n \n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- mode = key + \"_PA\"\n- self.mode_list.append(mode)\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=new_virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n+ mode = key + \"_PA\"\n+ self.mode_list.append(mode)\n+ self.start_virtio_testpmd(\n+ cores=self.virtio_core_list,\n+ param=virtio_param,\n+ eal_param=virtio_eal_param,\n+ )\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=2)\n+\n+ mode += \"_RestartVhost\"\n+ self.vhost_user_pmd.execute_cmd(\"start\")\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=2)\n+ self.virtio_user_pmd.quit()\n \n- self.logger.info(\"Restart vhost with {} path with {}\".format(key, path))\n- mode += \"_RestartVhost\"\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.mode_list.append(mode)\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n- self.virtio_user_pmd.quit()\n- self.result_table_print()\n self.test_target = self.running_case\n self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n self.test_target\n@@ -314,28 +290,37 @@ class TestVhostCbdma(TestCase):\n self.handle_results(mode_list=self.mode_list)\n self.vhost_user_pmd.quit()\n \n- def test_perf_pvp_split_all_path_multi_queues_vhost_txq_1_to_1_cbdma(self):\n+ def test_perf_pvp_split_ring_all_path_multi_queues_vhost_async_operation_with_M_to_1(\n+ self,\n+ ):\n \"\"\"\n- Test Case 2: PVP split ring all path multi-queues vhost enqueue operations with 1 to 1 mapping between vrings and CBDMA virtual channels\n+ Test Case 2: PVP split ring all path multi-queues vhost async operations with M to 1 mapping between vrings and CBDMA virtual channels\n \"\"\"\n- cbdma_num = 8\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- dmas = self.generate_dmas_param(8)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:]\n- )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas={},dma_ring_size=2048'\".format(\n- dmas\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[2],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[3],\n+ )\n )\n+ vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;rxq0;rxq1;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'\"\n vhost_param = (\n- \" --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n+ \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n )\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n+ for i in self.cbdma_list:\n+ allow_pci.append(i)\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n@@ -343,18 +328,17 @@ class TestVhostCbdma(TestCase):\n ports=allow_pci,\n iova_mode=\"va\",\n )\n+ virtio_param = \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n for key, path in SPLIT_RING_PATH.items():\n virtio_eal_param = (\n- \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8\".format(\n- self.virtio_mac, path\n- )\n+ \"--vdev 'net_virtio_user0,mac=%s,path=vhost_net0,%s,queues=8'\"\n+ % (self.virtio_mac, path)\n )\n- if key == \"non_mergeable_path\":\n+ if key == \"non_mergeable\":\n new_virtio_param = \"--enable-hw-vlan-strip \" + virtio_param\n else:\n new_virtio_param = virtio_param\n \n- self.logger.info(\"Start virtio-user with {} path with {}\".format(key, path))\n mode = key + \"_VA\"\n self.mode_list.append(mode)\n self.start_virtio_testpmd(\n@@ -365,16 +349,46 @@ class TestVhostCbdma(TestCase):\n self.send_imix_packets(mode=mode)\n self.check_each_queue_of_port_packets(queues=8)\n \n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n mode += \"_RestartVhost\"\n self.mode_list.append(mode)\n- self.vhost_user_pmd.execute_cmd(\"start\")\n self.send_imix_packets(mode=mode)\n self.check_each_queue_of_port_packets(queues=8)\n self.virtio_user_pmd.quit()\n \n if not self.check_2M_env:\n self.vhost_user_pmd.quit()\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[2],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[5],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[6],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[7],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[8],\n+ self.cbdma_list[0],\n+ )\n+ )\n+ vhost_param = (\n+ \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n+ )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n@@ -383,15 +397,13 @@ class TestVhostCbdma(TestCase):\n iova_mode=\"pa\",\n )\n for key, path in SPLIT_RING_PATH.items():\n- if key == \"mergeable_path\":\n- virtio_eal_param = \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8\".format(\n- self.virtio_mac, path\n+ if key == \"inorder_mergeable\":\n+ virtio_eal_param = (\n+ \"--vdev 'net_virtio_user0,mac=%s,path=./vhost_net0,%s,queues=8'\"\n+ % (self.virtio_mac, path)\n )\n \n mode = key + \"_PA\"\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n self.mode_list.append(mode)\n self.start_virtio_testpmd(\n cores=self.virtio_core_list,\n@@ -402,16 +414,12 @@ class TestVhostCbdma(TestCase):\n self.check_each_queue_of_port_packets(queues=8)\n \n mode += \"_RestartVhost\"\n- self.logger.info(\n- \"Restart host with {} path with {}\".format(key, path)\n- )\n- self.mode_list.append(mode)\n self.vhost_user_pmd.execute_cmd(\"start\")\n+ self.mode_list.append(mode)\n self.send_imix_packets(mode=mode)\n self.check_each_queue_of_port_packets(queues=8)\n self.virtio_user_pmd.quit()\n \n- self.result_table_print()\n self.test_target = self.running_case\n self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n self.test_target\n@@ -420,28 +428,49 @@ class TestVhostCbdma(TestCase):\n self.handle_results(mode_list=self.mode_list)\n self.vhost_user_pmd.quit()\n \n- def test_perf_pvp_split_all_path_multi_queues_vhost_txq_M_2_1_cbdma(self):\n+ def test_perf_pvp_split_ring_dynamic_queue_number_vhost_async_operation_with_M_to_N(\n+ self,\n+ ):\n \"\"\"\n- Test Case 3: PVP split ring all path multi-queues vhost enqueue operations with M to 1 mapping between vrings and CBDMA virtual channels\n+ Test Case 3: PVP split ring dynamic queue number vhost async operations with M to N mapping between vrings and CBDMA virtual channels\n \"\"\"\n- cbdma_num = 1\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- dmas = self.generate_dmas_param(8)\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=/tmp/s0,queues=8,dmas={},dma_ring_size=2048'\".format(\n- dmas\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 = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,dmas=[txq0;txq1;rxq0;rxq1]'\"\n vhost_param = (\n- \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n+ \"--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n )\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n+ for i in self.cbdma_list:\n+ allow_pci.append(i)\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n@@ -449,44 +478,59 @@ class TestVhostCbdma(TestCase):\n ports=allow_pci,\n iova_mode=\"va\",\n )\n+ virtio_param = \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n for key, path in SPLIT_RING_PATH.items():\n virtio_eal_param = (\n- \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8\".format(\n- self.virtio_mac, path\n- )\n- )\n- if key == \"non_mergeable_path\":\n- new_virtio_param = \"--enable-hw-vlan-strip \" + virtio_param\n- else:\n- new_virtio_param = virtio_param\n-\n- mode = key + \"_VA\" + \"_1_lcore\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Start virtio-user with {} path with {}\".format(key, path))\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=new_virtio_param,\n- eal_param=virtio_eal_param,\n+ \"--vdev 'net_virtio_user0,mac=%s,path=vhost_net0,%s,queues=8,server=1'\"\n+ % (self.virtio_mac, path)\n )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n+ if key == \"inorder_mergeable\":\n+ mode = key + \"_VA_1:N\"\n+ self.mode_list.append(mode)\n+ self.start_virtio_testpmd(\n+ cores=self.virtio_core_list,\n+ param=virtio_param,\n+ eal_param=virtio_eal_param,\n+ )\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=2)\n \n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n+ self.vhost_user_pmd.quit()\n+ vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,'\"\n+ vhost_param = \"--nb-cores=2 --txq=1 --rxq=1 --txd=1024 --rxd=1024\"\n+ self.start_vhost_testpmd(\n+ cores=self.vhost_core_list,\n+ param=vhost_param,\n+ eal_param=vhost_eal_param,\n+ ports=[self.dut.ports_info[0][\"pci\"]],\n+ iova_mode=\"va\",\n+ )\n+ mode = \"inorder_mergeable\" + \"_VA_without_CBDMA\"\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=1)\n \n self.vhost_user_pmd.quit()\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1: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[2],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[3],\n+ )\n )\n+ vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,dmas=[rxq0;rxq1;rxq2;rxq3]'\"\n vhost_param = (\n- \" --nb-cores=3 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n+ \"--nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n@@ -495,44 +539,106 @@ class TestVhostCbdma(TestCase):\n ports=allow_pci,\n iova_mode=\"va\",\n )\n- for key, path in SPLIT_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n- virtio_eal_param = (\n- \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8\".format(\n- self.virtio_mac, path\n- )\n- )\n-\n- mode = key + \"_VA\" + \"_3_lcore\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n+ mode = \"inorder_mergeable\" + \"_VA_1:1\"\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=4)\n \n self.vhost_user_pmd.quit()\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:9]\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+ \"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[2],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[2],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[2],\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 = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'\"\n vhost_param = (\n- \" --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n+ \"--nb-cores=2 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n+ )\n+ self.start_vhost_testpmd(\n+ cores=self.vhost_core_list,\n+ param=vhost_param,\n+ eal_param=vhost_eal_param,\n+ ports=allow_pci,\n+ iova_mode=\"va\",\n+ )\n+ mode = \"inorder_mergeable\" + \"_VA_M:N\"\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=8)\n+\n+ self.vhost_user_pmd.quit()\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+ \"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[2],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[2],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[2],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[3],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[4],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[5],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[6],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[4],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[5],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[6],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[7],\n )\n )\n+ vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'\"\n+ vhost_param = (\n+ \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n+ )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n@@ -540,18 +646,21 @@ class TestVhostCbdma(TestCase):\n ports=allow_pci,\n iova_mode=\"va\",\n )\n+ mode = \"inorder_mergeable\" + \"_VA_M:N_diff\"\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=8)\n+\n+ self.virtio_user_pmd.quit()\n+ virtio_param = \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n for key, path in SPLIT_RING_PATH.items():\n- if key == \"mergeable_path\":\n+ if key == \"mergeable\":\n virtio_eal_param = (\n- \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8\".format(\n- self.virtio_mac, path\n- )\n+ \"--vdev 'net_virtio_user0,mac=%s,path=vhost_net0,%s,queues=8,server=1'\"\n+ % (self.virtio_mac, path)\n )\n- mode = key + \"_VA\" + \"_8_lcore\"\n+ mode = key + \"_VA_M:N_diff\"\n self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n self.start_virtio_testpmd(\n cores=self.virtio_core_list,\n param=virtio_param,\n@@ -560,52 +669,52 @@ class TestVhostCbdma(TestCase):\n self.send_imix_packets(mode=mode)\n self.check_each_queue_of_port_packets(queues=8)\n \n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n-\n- if not self.check_2M_env:\n- self.vhost_user_pmd.quit()\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"pa\",\n+ self.vhost_user_pmd.quit()\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[2],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[5],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[5],\n+ self.cbdma_list[2],\n )\n- for key, path in SPLIT_RING_PATH.items():\n- if key == \"inorder_non_mergeable_path\":\n- virtio_eal_param = \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8\".format(\n- self.virtio_mac, path\n- )\n-\n- mode = key + \"_PA\" + \"_8_lcore\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Restart host with {} path with {}\".format(key, path)\n- )\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n+ )\n+ vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'\"\n+ vhost_param = (\n+ \"--nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n+ )\n+ self.start_vhost_testpmd(\n+ cores=self.vhost_core_list,\n+ param=vhost_param,\n+ eal_param=vhost_eal_param,\n+ ports=allow_pci,\n+ iova_mode=\"pa\",\n+ )\n+ mode = \"mergeable\" + \"_PA_M:N_diff\"\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=8)\n \n- self.result_table_print()\n self.test_target = self.running_case\n self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n self.test_target\n@@ -614,28 +723,39 @@ class TestVhostCbdma(TestCase):\n self.handle_results(mode_list=self.mode_list)\n self.vhost_user_pmd.quit()\n \n- def test_perf_pvp_split_all_path_vhost_txq_1_to_N_cbdma(self):\n+ def test_perf_pvp_packed_ring_all_path_multi_queues_vhost_async_operation_with_1_to_1(\n+ self,\n+ ):\n \"\"\"\n- Test Case 4: PVP split ring all path vhost enqueue operations with 1 to N mapping between vrings and CBDMA virtual channels\n+ Test Case 4: PVP packed ring all path multi-queues vhost async operations with 1 to 1 mapping between vrings and CBDMA virtual channels\n \"\"\"\n- cbdma_num = 8\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- dmas = self.generate_dmas_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=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=/tmp/s0,queues=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n+ vhost_eal_param = (\n+ \"--vdev 'net_vhost0,iface=vhost_net0,queues=2,dmas=[txq0;txq1;rxq0;rxq1]'\"\n )\n vhost_param = (\n- \" --nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n+ \"--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n )\n- virtio_param = \" --nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024\"\n allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n+ for i in self.cbdma_list:\n+ allow_pci.append(i)\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n@@ -643,34 +763,32 @@ class TestVhostCbdma(TestCase):\n ports=allow_pci,\n iova_mode=\"va\",\n )\n- for key, path in SPLIT_RING_PATH.items():\n+ for key, path in PACKED_RING_PATH.items():\n virtio_eal_param = (\n- \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=1\".format(\n- self.virtio_mac, path\n- )\n+ \"--vdev 'net_virtio_user0,mac=%s,path=vhost_net0,%s,queues=2'\"\n+ % (self.virtio_mac, path)\n )\n- if key == \"non_mergeable_path\":\n- new_virtio_param = \"--enable-hw-vlan-strip \" + virtio_param\n+ if \"vectorized\" in key:\n+ virtio_eal_param = \"--force-max-simd-bitwidth=512 \" + virtio_eal_param\n+ if key == \"vectorized_path_not_power_of_2\":\n+ virtio_param = \"--nb-cores=1 --txq=2 --rxq=2 --txd=1025 --rxd=1025\"\n else:\n- new_virtio_param = virtio_param\n+ virtio_param = \"--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024\"\n \n mode = key + \"_VA\"\n self.mode_list.append(mode)\n- self.logger.info(\"Start virtio-user with {} path with {}\".format(key, path))\n self.start_virtio_testpmd(\n cores=self.virtio_core_list,\n- param=new_virtio_param,\n+ param=virtio_param,\n eal_param=virtio_eal_param,\n )\n self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n+ self.check_each_queue_of_port_packets(queues=2)\n \n mode += \"_RestartVhost\"\n self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n+ self.check_each_queue_of_port_packets(queues=2)\n self.virtio_user_pmd.quit()\n \n if not self.check_2M_env:\n@@ -682,36 +800,31 @@ class TestVhostCbdma(TestCase):\n ports=allow_pci,\n iova_mode=\"pa\",\n )\n- for key, path in SPLIT_RING_PATH.items():\n- if key == \"non_mergeable_path\":\n- virtio_eal_param = \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=1\".format(\n- self.virtio_mac, path\n+ virtio_param = \"--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024\"\n+ for key, path in PACKED_RING_PATH.items():\n+ if key == \"inorder_mergeable\":\n+ virtio_eal_param = (\n+ \"--vdev 'net_virtio_user0,mac=%s,path=./vhost_net0,%s,queues=2'\"\n+ % (self.virtio_mac, path)\n )\n \n mode = key + \"_PA\"\n self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n self.start_virtio_testpmd(\n cores=self.virtio_core_list,\n param=virtio_param,\n eal_param=virtio_eal_param,\n )\n self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n+ self.check_each_queue_of_port_packets(queues=2)\n \n mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Restart host with {} path with {}\".format(key, path)\n- )\n self.vhost_user_pmd.execute_cmd(\"start\")\n+ self.mode_list.append(mode)\n self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n+ self.check_each_queue_of_port_packets(queues=2)\n self.virtio_user_pmd.quit()\n \n- self.result_table_print()\n self.test_target = self.running_case\n self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n self.test_target\n@@ -720,28 +833,37 @@ class TestVhostCbdma(TestCase):\n self.handle_results(mode_list=self.mode_list)\n self.vhost_user_pmd.quit()\n \n- def test_perf_pvp_split_all_path_multi_queues_vhost_txq_M_to_N_cbdma(self):\n+ def test_perf_pvp_packed_ring_all_path_multi_queues_vhost_async_operation_with_M_to_1(\n+ self,\n+ ):\n \"\"\"\n- Test Case 5: PVP split ring all path multi-queues vhost enqueue operations with M to N mapping between vrings and CBDMA virtual channels\n+ Test Case 5: PVP packed ring all path multi-queues vhost async operations with M to 1 mapping between vrings and CBDMA virtual channels\n \"\"\"\n- cbdma_num = 8\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- dmas = self.generate_dmas_param(3)\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=/tmp/s0,queues=8,dmas={},dma_ring_size=2048'\".format(\n- dmas\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[2],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[3],\n+ )\n )\n+ vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;rxq0;rxq1;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'\"\n vhost_param = (\n- \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n+ \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n )\n- virtio_param = \"--nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n+ for i in self.cbdma_list:\n+ allow_pci.append(i)\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n@@ -749,18 +871,20 @@ class TestVhostCbdma(TestCase):\n ports=allow_pci,\n iova_mode=\"va\",\n )\n- for key, path in SPLIT_RING_PATH.items():\n+ for key, path in PACKED_RING_PATH.items():\n virtio_eal_param = (\n- \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8\".format(\n- self.virtio_mac, path\n- )\n+ \"--vdev 'net_virtio_user0,mac=%s,path=vhost_net0,%s,queues=8'\"\n+ % (self.virtio_mac, path)\n )\n- if key == \"non_mergeable_path\":\n- virtio_param = \"--enable-hw-vlan-strip \" + virtio_param\n+ if \"vectorized\" in key:\n+ virtio_eal_param = \"--force-max-simd-bitwidth=512 \" + virtio_eal_param\n+ if key == \"vectorized_path_not_power_of_2\":\n+ virtio_param = \"--nb-cores=4 --txq=8 --rxq=8 --txd=1025 --rxd=1025\"\n+ else:\n+ virtio_param = \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n \n- mode = key + \"_VA\" + \"_3dmas\"\n+ mode = key + \"_VA\"\n self.mode_list.append(mode)\n- self.logger.info(\"Start virtio-user with {} path with {}\".format(key, path))\n self.start_virtio_testpmd(\n cores=self.virtio_core_list,\n param=virtio_param,\n@@ -771,55 +895,44 @@ class TestVhostCbdma(TestCase):\n \n mode += \"_RestartVhost\"\n self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n self.send_imix_packets(mode=mode)\n self.check_each_queue_of_port_packets(queues=8)\n self.virtio_user_pmd.quit()\n \n- self.vhost_user_pmd.quit()\n- dmas = self.generate_dmas_param(8)\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- )\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"va\",\n- )\n- for key, path in SPLIT_RING_PATH.items():\n- if key == \"inorder_non_mergeable_path\":\n- virtio_eal_param = (\n- \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8\".format(\n- self.virtio_mac, path\n- )\n- )\n-\n- mode = key + \"_VA\" + \"_8dmas\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n-\n if not self.check_2M_env:\n self.vhost_user_pmd.quit()\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[2],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[5],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[6],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[7],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[8],\n+ self.cbdma_list[0],\n+ )\n+ )\n+ vhost_param = (\n+ \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n+ )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n@@ -827,17 +940,16 @@ class TestVhostCbdma(TestCase):\n ports=allow_pci,\n iova_mode=\"pa\",\n )\n- for key, path in SPLIT_RING_PATH.items():\n- if key == \"vectorized_path\":\n- virtio_eal_param = \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8\".format(\n- self.virtio_mac, path\n+ virtio_param = \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n+ for key, path in PACKED_RING_PATH.items():\n+ if key == \"inorder_mergeable\":\n+ virtio_eal_param = (\n+ \"--vdev 'net_virtio_user0,mac=%s,path=./vhost_net0,%s,queues=8'\"\n+ % (self.virtio_mac, path)\n )\n \n- mode = key + \"_PA\" + \"_8dmas\"\n+ mode = key + \"_PA\"\n self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n self.start_virtio_testpmd(\n cores=self.virtio_core_list,\n param=virtio_param,\n@@ -847,16 +959,12 @@ class TestVhostCbdma(TestCase):\n self.check_each_queue_of_port_packets(queues=8)\n \n mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Restart host with {} path with {}\".format(key, path)\n- )\n self.vhost_user_pmd.execute_cmd(\"start\")\n+ self.mode_list.append(mode)\n self.send_imix_packets(mode=mode)\n self.check_each_queue_of_port_packets(queues=8)\n self.virtio_user_pmd.quit()\n \n- self.result_table_print()\n self.test_target = self.running_case\n self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n self.test_target\n@@ -865,262 +973,217 @@ class TestVhostCbdma(TestCase):\n self.handle_results(mode_list=self.mode_list)\n self.vhost_user_pmd.quit()\n \n- def test_perf_pvp_split_dynamic_queues_vhost_txq_M_to_N_cbdma(self):\n+ def test_perf_pvp_packed_ring_dynamic_queue_number_vhost_async_operation_with_M_to_N(\n+ self,\n+ ):\n \"\"\"\n- Test Case 6: PVP split ring dynamic queue number vhost enqueue operations with M to N mapping between vrings and CBDMA virtual channels\n+ Test Case 6: PVP packed ring dynamic queue number vhost async operations with M to N mapping between vrings and CBDMA virtual channels\n \"\"\"\n- cbdma_num = 8\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=/tmp/s0,queues=1,client=1'\"\n- vhost_param = \" --nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024\"\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\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 = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,dmas=[txq0;txq1;rxq0;rxq1]'\"\n+ vhost_param = (\n+ \"--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n+ )\n allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n+ for i in self.cbdma_list:\n+ allow_pci.append(i)\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n eal_param=vhost_eal_param,\n- ports=allow_pci[0:1],\n+ ports=allow_pci,\n iova_mode=\"va\",\n )\n- for key, path in SPLIT_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n- virtio_eal_param = \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8,server=1\".format(\n- self.virtio_mac, path\n- )\n-\n- mode = key + \"_VA\" + \"_without_cbdma\"\n+ virtio_param = \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n+ for key, path in PACKED_RING_PATH.items():\n+ virtio_eal_param = (\n+ \"--vdev 'net_virtio_user0,mac=%s,path=vhost_net0,%s,queues=8,server=1'\"\n+ % (self.virtio_mac, path)\n+ )\n+ if key == \"inorder_mergeable\":\n+ mode = key + \"_VA_1:N\"\n self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n self.start_virtio_testpmd(\n cores=self.virtio_core_list,\n param=virtio_param,\n eal_param=virtio_eal_param,\n )\n self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n+ self.check_each_queue_of_port_packets(queues=2)\n \n self.vhost_user_pmd.quit()\n- dmas = self.generate_dmas_param(4)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list[0:4], core_list=self.vhost_core_list[1:5]\n- )\n- vhost_eal_param = (\n- \"--vdev 'net_vhost0,iface=/tmp/s0,queues=4,client=1,dmas={}'\".format(dmas)\n- )\n- vhost_param = (\n- \" --nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- )\n-\n+ vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,'\"\n+ vhost_param = \"--nb-cores=2 --txq=1 --rxq=1 --txd=1024 --rxd=1024\"\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n eal_param=vhost_eal_param,\n- ports=allow_pci[0:5],\n+ ports=[self.dut.ports_info[0][\"pci\"]],\n iova_mode=\"va\",\n )\n-\n- for key, path in SPLIT_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n-\n- mode = key + \"_VA\" + \"_1:1\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=4)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=4)\n+ mode = \"inorder_mergeable\" + \"_VA_without_CBDMA\"\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=1)\n \n self.vhost_user_pmd.quit()\n- dmas = self.generate_dmas_param(queues=8)\n- core1 = self.vhost_core_list[1]\n- core2 = self.vhost_core_list[2]\n- core3 = self.vhost_core_list[3]\n- core4 = self.vhost_core_list[4]\n- core5 = self.vhost_core_list[5]\n- cbdma0 = self.cbdma_list[0]\n- cbdma1 = self.cbdma_list[1]\n- cbdma2 = self.cbdma_list[2]\n- cbdma3 = self.cbdma_list[3]\n- cbdma4 = self.cbdma_list[4]\n- cbdma5 = self.cbdma_list[5]\n- cbdma6 = self.cbdma_list[6]\n- cbdma7 = self.cbdma_list[7]\n lcore_dma = (\n- f\"[lcore{core1}@{cbdma0},lcore{core1}@{cbdma7},\"\n- + f\"lcore{core2}@{cbdma1},lcore{core2}@{cbdma2},lcore{core2}@{cbdma3},\"\n- + f\"lcore{core3}@{cbdma2},lcore{core3}@{cbdma3},lcore{core3}@{cbdma4},\"\n- f\"lcore{core4}@{cbdma2},lcore{core4}@{cbdma3},lcore{core4}@{cbdma4},lcore{core4}@{cbdma5},\"\n- f\"lcore{core5}@{cbdma0},lcore{core5}@{cbdma1},lcore{core5}@{cbdma2},lcore{core5}@{cbdma3},\"\n- f\"lcore{core5}@{cbdma4},lcore{core5}@{cbdma5},lcore{core5}@{cbdma6},lcore{core5}@{cbdma7}]\"\n- )\n- vhost_eal_param = (\n- \"--vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas={}'\".format(dmas)\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[2],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[3],\n+ )\n )\n+ vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,dmas=[rxq0;rxq1;rxq2;rxq3]'\"\n vhost_param = (\n- \" --nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n+ \"--nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n )\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n eal_param=vhost_eal_param,\n- ports=allow_pci[0:9],\n+ ports=allow_pci,\n iova_mode=\"va\",\n )\n-\n- for key, path in SPLIT_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n-\n- mode = key + \"_VA\" + \"_M<N\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n+ mode = \"inorder_mergeable\" + \"_VA_1:1\"\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=4)\n \n self.vhost_user_pmd.quit()\n- dmas = self.generate_dmas_param(7)\n lcore_dma = (\n- f\"[lcore{core1}@{cbdma0},lcore{core2}@{cbdma0},lcore{core3}@{cbdma1},lcore{core3}@{cbdma2},\"\n- f\"lcore{core4}@{cbdma1},lcore{core4}@{cbdma2},lcore{core5}@{cbdma1},lcore{core5}@{cbdma2}]\"\n- )\n- vhost_eal_param = (\n- \"--vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas={}'\".format(dmas)\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+ \"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[2],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[2],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[2],\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 = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'\"\n vhost_param = (\n- \" --nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n+ \"--nb-cores=2 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n )\n-\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n eal_param=vhost_eal_param,\n- ports=allow_pci[0:5],\n+ ports=allow_pci,\n iova_mode=\"va\",\n )\n+ mode = \"inorder_mergeable\" + \"_VA_M:N\"\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=8)\n \n- for key, path in SPLIT_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n-\n- mode = key + \"_VA\" + \"_M>N\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- if not self.check_2M_env:\n- self.vhost_user_pmd.quit()\n- dmas = self.generate_dmas_param(queues=8)\n-\n- vhost_eal_param = (\n- \"--vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas={}'\".format(\n- dmas\n- )\n- )\n- vhost_param = \" --nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci[0:5],\n- iova_mode=\"pa\",\n- )\n-\n- for key, path in SPLIT_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n-\n- mode = key + \"_PA\" + \"_M>N\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"ReLaunch host with {} path with {}\".format(key, path)\n- )\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- self.result_table_print()\n- self.test_target = self.running_case\n- self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n- self.test_target\n- ]\n- self.handle_expected(mode_list=self.mode_list)\n- self.handle_results(mode_list=self.mode_list)\n- self.virtio_user_pmd.quit()\n self.vhost_user_pmd.quit()\n-\n- def test_perf_pvp_packed_all_path_vhost_txq_1_to_1_cbdma(self):\n- \"\"\"\n- Test Case 7: PVP packed ring all path vhost enqueue operations with 1 to 1 mapping between vrings and CBDMA virtual channels\n- \"\"\"\n- cbdma_num = 1\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- dmas = self.generate_dmas_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- )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\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+ \"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[2],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[2],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[2],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[3],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[4],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[5],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[6],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[4],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[5],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[6],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[7],\n+ )\n )\n+ vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'\"\n vhost_param = (\n- \" --nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n+ \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n )\n- allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n@@ -1128,188 +1191,75 @@ class TestVhostCbdma(TestCase):\n ports=allow_pci,\n iova_mode=\"va\",\n )\n+ mode = \"inorder_mergeable\" + \"_VA_M:N_diff\"\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=8)\n+\n+ self.virtio_user_pmd.quit()\n+ virtio_param = \"--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n for key, path in PACKED_RING_PATH.items():\n- virtio_eal_param = (\n- \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=1'\".format(\n- self.virtio_mac, path\n+ if key == \"mergeable\":\n+ virtio_eal_param = (\n+ \"--vdev 'net_virtio_user0,mac=%s,path=vhost_net0,%s,queues=8,server=1'\"\n+ % (self.virtio_mac, path)\n )\n- )\n- virtio_param = \" --nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024\"\n- if key == \"vectorized_path_not_power_of_2\":\n- virtio_eal_param += \",queue_size=1025\"\n- virtio_param = \" --nb-cores=1 --txq=1 --rxq=1 --txd=1025 --rxd=1025\"\n- if \"vectorized\" in key:\n- virtio_eal_param += \" --force-max-simd-bitwidth=512\"\n-\n- mode = key + \"_VA\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Start virtio-user with {} path with {}\".format(key, path))\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n- self.virtio_user_pmd.quit()\n-\n- if not self.check_2M_env:\n- self.vhost_user_pmd.quit()\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"pa\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n- virtio_eal_param = \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=1'\".format(\n- self.virtio_mac, path\n- )\n- virtio_param = \" --nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024\"\n-\n- mode = key + \"_PA\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Restart host with {} path with {}\".format(key, path)\n- )\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n- self.virtio_user_pmd.quit()\n+ mode = key + \"_VA_M:N_diff\"\n+ self.mode_list.append(mode)\n+ self.start_virtio_testpmd(\n+ cores=self.virtio_core_list,\n+ param=virtio_param,\n+ eal_param=virtio_eal_param,\n+ )\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=8)\n \n- self.result_table_print()\n- self.test_target = self.running_case\n- self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n- self.test_target\n- ]\n- self.handle_expected(mode_list=self.mode_list)\n- self.handle_results(mode_list=self.mode_list)\n self.vhost_user_pmd.quit()\n-\n- def test_perf_pvp_packed_all_path_multi_queues_vhost_txq_1_to_1_cbdma(self):\n- \"\"\"\n- Test Case 8: PVP packed ring all path multi-queues vhost enqueue operations with 1 to 1 mapping between vrings and CBDMA virtual channels\n- \"\"\"\n- cbdma_num = 8\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- dmas = self.generate_dmas_param(8)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:]\n- )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas={},dma_ring_size=2048'\".format(\n- dmas\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[2],\n+ self.cbdma_list[0],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[3],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[4],\n+ self.cbdma_list[2],\n+ self.vhost_core_list[5],\n+ self.cbdma_list[1],\n+ self.vhost_core_list[5],\n+ self.cbdma_list[2],\n+ )\n )\n+ vhost_eal_param = \"--vdev 'net_vhost0,iface=vhost_net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'\"\n vhost_param = (\n- \" --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n+ \"--nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]\"\n+ % lcore_dma\n )\n- allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n self.start_vhost_testpmd(\n cores=self.vhost_core_list,\n param=vhost_param,\n eal_param=vhost_eal_param,\n ports=allow_pci,\n- iova_mode=\"va\",\n+ iova_mode=\"pa\",\n )\n- for key, path in PACKED_RING_PATH.items():\n- virtio_eal_param = (\n- \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=8'\".format(\n- self.virtio_mac, path\n- )\n- )\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n- if key == \"vectorized_path_not_power_of_2\":\n- virtio_eal_param += \",queue_size=1025\"\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1025 --rxd=1025\"\n- if \"vectorized\" in key:\n- virtio_eal_param += \" --force-max-simd-bitwidth=512\"\n-\n- mode = key + \"_VA\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Start virtio-user with {} path with {}\".format(key, path))\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n-\n- if not self.check_2M_env:\n- self.vhost_user_pmd.quit()\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"pa\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"mergeable_path\":\n- virtio_param = (\n- \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n- )\n- virtio_eal_param = \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8\".format(\n- self.virtio_mac, path\n- )\n-\n- mode = key + \"_PA\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Restart host with {} path with {}\".format(key, path)\n- )\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n+ mode = \"mergeable\" + \"_PA_M:N_diff\"\n+ self.mode_list.append(mode)\n+ self.send_imix_packets(mode=mode)\n+ self.check_each_queue_of_port_packets(queues=8)\n \n- self.result_table_print()\n self.test_target = self.running_case\n self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n self.test_target\n@@ -1318,688 +1268,6 @@ class TestVhostCbdma(TestCase):\n self.handle_results(mode_list=self.mode_list)\n self.vhost_user_pmd.quit()\n \n- def test_perf_pvp_packed_all_path_multi_queues_vhost_txq_M_to_1_cbdma(self):\n- \"\"\"\n- Test Case 9: PVP packed ring all path multi-queues vhost enqueue operations with M to 1 mapping between vrings and CBDMA virtual channels\n- \"\"\"\n- cbdma_num = 1\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- dmas = self.generate_dmas_param(8)\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=/tmp/s0,queues=8,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- )\n- vhost_param = (\n- \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- )\n- allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"va\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- virtio_eal_param = (\n- \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=8'\".format(\n- self.virtio_mac, path\n- )\n- )\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n- if key == \"vectorized_path_not_power_of_2\":\n- virtio_eal_param += \",queue_size=1025\"\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1025 --rxd=1025\"\n-\n- mode = key + \"_VA\" + \"_1_lcore\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Start virtio-user with {} path with {}\".format(key, path))\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n-\n- self.vhost_user_pmd.quit()\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:4]\n- )\n- vhost_param = (\n- \" --nb-cores=3 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- )\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"va\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n- virtio_eal_param = (\n- \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=8'\".format(\n- self.virtio_mac, path\n- )\n- )\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n-\n- mode = key + \"_VA\" + \"_3_lcore\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n-\n- self.vhost_user_pmd.quit()\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:9]\n- )\n- vhost_param = (\n- \" --nb-cores=8 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- )\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"va\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"mergeable_path\":\n- virtio_eal_param = (\n- \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=8'\".format(\n- self.virtio_mac, path\n- )\n- )\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n-\n- mode = key + \"_VA\" + \"_8_lcore\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n-\n- if not self.check_2M_env:\n- self.vhost_user_pmd.quit()\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"pa\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"inorder_non_mergeable_path\":\n- virtio_eal_param = \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=8'\".format(\n- self.virtio_mac, path\n- )\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n-\n- mode = key + \"_PA\" + \"_8_lcore\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Restart host with {} path with {}\".format(key, path)\n- )\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n-\n- self.result_table_print()\n- self.test_target = self.running_case\n- self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n- self.test_target\n- ]\n- self.handle_expected(mode_list=self.mode_list)\n- self.handle_results(mode_list=self.mode_list)\n- self.vhost_user_pmd.quit()\n-\n- def test_perf_pvp_packed_all_path_vhost_txq_1_to_N_cbdma(self):\n- \"\"\"\n- Test Case 10: PVP packed ring all path vhost enqueue operations with 1 to N mapping between vrings and CBDMA virtual channels\n- \"\"\"\n- cbdma_num = 8\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- dmas = self.generate_dmas_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- )\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=/tmp/s0,queues=1,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- )\n- vhost_param = (\n- \" --nb-cores=1 --txq=1 --rxq=1--txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- )\n- allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"va\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- virtio_eal_param = (\n- \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=1'\".format(\n- self.virtio_mac, path\n- )\n- )\n- virtio_param = \" --nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024\"\n- if key == \"vectorized_path_not_power_of_2\":\n- virtio_eal_param += \",queue_size=1025\"\n- virtio_param = \" --nb-cores=1 --txq=1 --rxq=1 --txd=1025 --rxd=1025\"\n-\n- mode = key + \"_VA\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Start virtio-user with {} path with {}\".format(key, path))\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n- self.virtio_user_pmd.quit()\n-\n- if not self.check_2M_env:\n- self.vhost_user_pmd.quit()\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"pa\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"non_mergeable_path\":\n- virtio_eal_param = \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=1'\".format(\n- self.virtio_mac, path\n- )\n- virtio_param = \" --nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024\"\n-\n- mode = key + \"_PA\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Restart host with {} path with {}\".format(key, path)\n- )\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n- self.virtio_user_pmd.quit()\n-\n- self.result_table_print()\n- self.test_target = self.running_case\n- self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n- self.test_target\n- ]\n- self.handle_expected(mode_list=self.mode_list)\n- self.handle_results(mode_list=self.mode_list)\n- self.vhost_user_pmd.quit()\n-\n- def test_perf_pvp_packed_all_path_multi_queues_vhost_txq_M_to_N_cbdma(self):\n- \"\"\"\n- Test Case 11: PVP packed ring all path vhost enqueue operations with M to N mapping between vrings and CBDMA virtual channels\n- \"\"\"\n- cbdma_num = 8\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- dmas = self.generate_dmas_param(3)\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=/tmp/s0,queues=8,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- )\n- vhost_param = (\n- \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- )\n- allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"va\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- virtio_eal_param = (\n- \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=8'\".format(\n- self.virtio_mac, path\n- )\n- )\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n- if key == \"vectorized_path_not_power_of_2\":\n- virtio_eal_param += \",queue_size=1025\"\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1025 --rxd=1025\"\n-\n- mode = key + \"_VA\" + \"_3dmas\"\n- self.mode_list.append(mode)\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.logger.info(\"Start virtio-user with {} path with {}\".format(key, path))\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n-\n- self.vhost_user_pmd.quit()\n- dmas = self.generate_dmas_param(queues=8)\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=/tmp/s0,queues=8,dmas={},dma_ring_size=2048'\".format(\n- dmas\n- )\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"va\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"inorder_non_mergeable_path\":\n- virtio_eal_param = (\n- \" --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=8'\".format(\n- self.virtio_mac, path\n- )\n- )\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n-\n- mode = key + \"_VA\" + \"_8dmas\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n-\n- if not self.check_2M_env:\n- self.vhost_user_pmd.quit()\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci,\n- iova_mode=\"pa\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"vectorized_path\":\n- virtio_eal_param = \" --force-max-simd-bitwidth=512 --vdev 'net_virtio_user0,mac={},path=/tmp/s0,{},queues=8'\".format(\n- self.virtio_mac, path\n- )\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n-\n- mode = key + \"_PA\" + \"_8dmas\"\n- self.mode_list.append(mode)\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.logger.info(\n- \"Restart host with {} path with {}\".format(key, path)\n- )\n- self.check_each_queue_of_port_packets(queues=8)\n- self.virtio_user_pmd.quit()\n-\n- self.result_table_print()\n- self.test_target = self.running_case\n- self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n- self.test_target\n- ]\n- self.handle_expected(mode_list=self.mode_list)\n- self.handle_results(mode_list=self.mode_list)\n- self.vhost_user_pmd.quit()\n-\n- def test_perf_pvp_packed_dynamic_queues_vhost_txq_M_to_N_cbdma(self):\n- \"\"\"\n- Test Case 12: PVP packed ring dynamic queue number vhost enqueue operations with M to N mapping between vrings and CBDMA virtual channels\n- \"\"\"\n- cbdma_num = 8\n- self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num)\n- vhost_eal_param = \"--vdev 'net_vhost0,iface=/tmp/s0,queues=1,client=1'\"\n- vhost_param = \" --nb-cores=1 --txq=1 --rxq=1 --txd=1024 --rxd=1024\"\n- virtio_param = \" --nb-cores=1 --txq=8 --rxq=8 --txd=1024 --rxd=1024\"\n- allow_pci = [self.dut.ports_info[0][\"pci\"]]\n- for i in range(cbdma_num):\n- allow_pci.append(self.cbdma_list[i])\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci[0:1],\n- iova_mode=\"va\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n- virtio_eal_param = \"--vdev=net_virtio_user0,mac={},path=/tmp/s0,{},queues=8,server=1\".format(\n- self.virtio_mac, path\n- )\n-\n- mode = key + \"_VA\" + \"_without_cbdma\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.start_virtio_testpmd(\n- cores=self.virtio_core_list,\n- param=virtio_param,\n- eal_param=virtio_eal_param,\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets()\n-\n- self.vhost_user_pmd.quit()\n- dmas = self.generate_dmas_param(4)\n- lcore_dma = self.generate_lcore_dma_param(\n- cbdma_list=self.cbdma_list[0:4], core_list=self.vhost_core_list[1:5]\n- )\n- vhost_eal_param = (\n- \"--vdev 'net_vhost0,iface=/tmp/s0,queues=4,client=1,dmas={}'\".format(dmas)\n- )\n- vhost_param = (\n- \" --nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- )\n-\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci[0:5],\n- iova_mode=\"va\",\n- )\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n-\n- mode = key + \"_VA\" + \"_1:1\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=4)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=4)\n-\n- self.vhost_user_pmd.quit()\n- dmas = self.generate_dmas_param(8)\n- core1 = self.vhost_core_list[1]\n- core2 = self.vhost_core_list[2]\n- core3 = self.vhost_core_list[3]\n- core4 = self.vhost_core_list[4]\n- core5 = self.vhost_core_list[5]\n- cbdma0 = self.cbdma_list[0]\n- cbdma1 = self.cbdma_list[1]\n- cbdma2 = self.cbdma_list[2]\n- cbdma3 = self.cbdma_list[3]\n- cbdma4 = self.cbdma_list[4]\n- cbdma5 = self.cbdma_list[5]\n- cbdma6 = self.cbdma_list[6]\n- cbdma7 = self.cbdma_list[7]\n- lcore_dma = (\n- f\"[lcore{core1}@{cbdma0},lcore{core1}@{cbdma7},\"\n- + f\"lcore{core2}@{cbdma1},lcore{core2}@{cbdma2},lcore{core2}@{cbdma3},\"\n- + f\"lcore{core3}@{cbdma2},lcore{core3}@{cbdma3},lcore{core3}@{cbdma4},\"\n- f\"lcore{core4}@{cbdma2},lcore{core4}@{cbdma3},lcore{core4}@{cbdma4},lcore{core4}@{cbdma5},\"\n- f\"lcore{core5}@{cbdma0},lcore{core5}@{cbdma1},lcore{core5}@{cbdma2},lcore{core5}@{cbdma3},\"\n- f\"lcore{core5}@{cbdma4},lcore{core5}@{cbdma5},lcore{core5}@{cbdma6},lcore{core5}@{cbdma7}]\"\n- )\n- vhost_eal_param = (\n- \"--vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas={}'\".format(dmas)\n- )\n- vhost_param = (\n- \" --nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- )\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci[0:9],\n- iova_mode=\"va\",\n- )\n-\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n-\n- mode = key + \"_VA\" + \"_M<N\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- self.vhost_user_pmd.quit()\n- dmas = self.generate_dmas_param(7)\n- lcore_dma = (\n- f\"[lcore{core1}@{cbdma0},lcore{core2}@{cbdma0},lcore{core3}@{cbdma1},lcore{core3}@{cbdma2},\"\n- f\"lcore{core4}@{cbdma1},lcore{core4}@{cbdma2},lcore{core5}@{cbdma1},lcore{core5}@{cbdma2}]\"\n- )\n- vhost_eal_param = (\n- \"--vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas={}'\".format(dmas)\n- )\n- vhost_param = (\n- \" --nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- )\n-\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci[0:5],\n- iova_mode=\"va\",\n- )\n-\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n-\n- mode = key + \"_VA\" + \"_M>N\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\"Restart host with {} path with {}\".format(key, path))\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- if not self.check_2M_env:\n- self.vhost_user_pmd.quit()\n- dmas = self.generate_dmas_param(8)\n- vhost_eal_param = (\n- \"--vdev 'net_vhost0,iface=/tmp/s0,queues=8,client=1,dmas={}'\".format(\n- dmas\n- )\n- )\n- vhost_param = \" --nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma={}\".format(\n- lcore_dma\n- )\n- self.start_vhost_testpmd(\n- cores=self.vhost_core_list,\n- param=vhost_param,\n- eal_param=vhost_eal_param,\n- ports=allow_pci[0:5],\n- iova_mode=\"pa\",\n- )\n-\n- for key, path in PACKED_RING_PATH.items():\n- if key == \"inorder_mergeable_path\":\n-\n- mode = key + \"_PA\" + \"_M>N\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Start virtio-user with {} path with {}\".format(key, path)\n- )\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- mode += \"_RestartVhost\"\n- self.mode_list.append(mode)\n- self.logger.info(\n- \"Restart host with {} path with {}\".format(key, path)\n- )\n- self.vhost_user_pmd.execute_cmd(\"start\")\n- self.send_imix_packets(mode=mode)\n- self.check_each_queue_of_port_packets(queues=8)\n-\n- self.result_table_print()\n- self.test_target = self.running_case\n- self.expected_throughput = self.get_suite_cfg()[\"expected_throughput\"][\n- self.test_target\n- ]\n- self.handle_expected(mode_list=self.mode_list)\n- self.handle_results(mode_list=self.mode_list)\n- self.vhost_user_pmd.quit()\n- self.virtio_user_pmd.quit()\n-\n def send_imix_packets(self, mode):\n \"\"\"\n Send imix packet with packet generator and verify\n@@ -2015,7 +1283,7 @@ class TestVhostCbdma(TestCase):\n },\n }\n pkt = Packet()\n- pkt.assign_layers([\"ether\", \"ipv4\", \"raw\"])\n+ pkt.assign_layers([\"ether\", \"ipv4\", \"tcp\", \"raw\"])\n pkt.config_layers(\n [\n (\"ether\", {\"dst\": \"%s\" % self.virtio_mac}),\n@@ -2025,13 +1293,13 @@ class TestVhostCbdma(TestCase):\n )\n pkt.save_pcapfile(\n self.tester,\n- \"%s/multiqueuerandomip_%s.pcap\" % (self.out_path, frame_size),\n+ \"%s/%s_%s.pcap\" % (self.out_path, self.suite_name, frame_size),\n )\n tgenInput.append(\n (\n port,\n port,\n- \"%s/multiqueuerandomip_%s.pcap\" % (self.out_path, frame_size),\n+ \"%s/%s_%s.pcap\" % (self.out_path, self.suite_name, frame_size),\n )\n )\n \n", "prefixes": [ "V1", "2/2" ] }{ "id": 114816, "url": "