get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/114426/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 114426,
    "url": "https://patches.dpdk.org/api/patches/114426/?format=api",
    "web_url": "https://patches.dpdk.org/project/dts/patch/20220729072728.1007912-1-weix.ling@intel.com/",
    "project": {
        "id": 3,
        "url": "https://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": "<20220729072728.1007912-1-weix.ling@intel.com>",
    "list_archive_url": "https://inbox.dpdk.org/dts/20220729072728.1007912-1-weix.ling@intel.com",
    "date": "2022-07-29T07:27:28",
    "name": "[V2,2/2] tests/vm2vm_virtio_pmd_cbdma: modify testsuite to test virito dequeue",
    "commit_ref": null,
    "pull_url": null,
    "state": "superseded",
    "archived": false,
    "hash": "49b1349f61799018fdd09a0ae86eae74a9d2d262",
    "submitter": {
        "id": 1828,
        "url": "https://patches.dpdk.org/api/people/1828/?format=api",
        "name": "Ling, WeiX",
        "email": "weix.ling@intel.com"
    },
    "delegate": null,
    "mbox": "https://patches.dpdk.org/project/dts/patch/20220729072728.1007912-1-weix.ling@intel.com/mbox/",
    "series": [
        {
            "id": 24128,
            "url": "https://patches.dpdk.org/api/series/24128/?format=api",
            "web_url": "https://patches.dpdk.org/project/dts/list/?series=24128",
            "date": "2022-07-29T07:27:08",
            "name": "modify vm2vm_virtio_pmd_cbdma to test virito dequeue",
            "version": 2,
            "mbox": "https://patches.dpdk.org/series/24128/mbox/"
        }
    ],
    "comments": "https://patches.dpdk.org/api/patches/114426/comments/",
    "check": "warning",
    "checks": "https://patches.dpdk.org/api/patches/114426/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 4CF3CA04FD;\n\tFri, 29 Jul 2022 09:32:29 +0200 (CEST)",
            "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 4A85442C0C;\n\tFri, 29 Jul 2022 09:32:29 +0200 (CEST)",
            "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id 6AF6C40151\n for <dts@dpdk.org>; Fri, 29 Jul 2022 09:32:27 +0200 (CEST)",
            "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 29 Jul 2022 00:32:26 -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 29 Jul 2022 00:32:24 -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=1659079947; x=1690615947;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=zltdxH/ewgfGonkznhz0efVH6fJ93x/PfGTGlyy+DJ4=;\n b=ad6dXHRnoIMgK/iZOfgA0w+pg2BTeMBnvX5fOvpHufWW6VaIja6TXhBB\n EygP/h43y7cvtCi7OjcocwXNZsEd48x/43ZLvQhLz6LdLX0/9Fwm/8Tyg\n ngRa5/46LHB1KAy4UrTkK08pk7dv2qz6MQmEp1qLiKD513lfpWEvj1HY/\n 9rnUFKgyroZZIo7MuOxwzoxmgJ3UyOeEmwORxhbJ2gQpv6Ca+w22Z9acR\n /GFQWrOow4KIAKXNYhkImjyaLkFOO6eoyQcN+F2Y025V+czuWQPBepG4G\n fktrS1lIN0XVv5eff2Pyb4ZwXQtOTb04ZNX67hhnvhf12utR6gxM6xU+X Q==;",
        "X-IronPort-AV": [
            "E=McAfee;i=\"6400,9594,10422\"; a=\"314512436\"",
            "E=Sophos;i=\"5.93,200,1654585200\";\n d=\"scan'208,223\";a=\"314512436\"",
            "E=Sophos;i=\"5.93,200,1654585200\";\n d=\"scan'208,223\";a=\"598177261\""
        ],
        "From": "Wei Ling <weix.ling@intel.com>",
        "To": "dts@dpdk.org",
        "Cc": "Wei Ling <weix.ling@intel.com>",
        "Subject": "[dts][PATCH V2 2/2] tests/vm2vm_virtio_pmd_cbdma: modify testsuite to\n test virito dequeue",
        "Date": "Fri, 29 Jul 2022 03:27:28 -0400",
        "Message-Id": "<20220729072728.1007912-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_pmd_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_pmd_cbdma.py | 546 +++++++++++++++++-----\n 1 file changed, 420 insertions(+), 126 deletions(-)",
    "diff": "diff --git a/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py b/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py\nindex b926534e..f64032e2 100644\n--- a/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py\n+++ b/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py\n@@ -1,6 +1,31 @@\n # SPDX-License-Identifier: BSD-3-Clause\n # Copyright(c) 2022 Intel Corporation\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@@ -20,7 +45,7 @@ from framework.test_case import TestCase\n from framework.virt_common import VM\n \n \n-class TestVM2VMVirtioPmdCbdma(TestCase):\n+class TestVM2VMVirtioPmdCBDMA(TestCase):\n     def set_up_all(self):\n         self.dut_ports = self.dut.get_ports()\n         self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])\n@@ -48,6 +73,7 @@ class TestVM2VMVirtioPmdCbdma(TestCase):\n         self.result_table_create(self.table_header)\n         self.dut.send_expect(\"killall -s INT %s\" % self.testpmd_name, \"#\")\n         self.dut.send_expect(\"killall -s INT qemu-system-x86_64\", \"#\")\n+        self.dut.send_expect(\"killall -s INT perf\", \"#\")\n         self.dut.send_expect(\"rm -rf %s/vhost-net*\" % self.base_dir, \"#\")\n         self.vm_num = 2\n         self.vm_dut = []\n@@ -91,33 +117,6 @@ class TestVM2VMVirtioPmdCbdma(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 start_vhost_testpmd(self, cores, ports, prefix, eal_param, param):\n         \"\"\"\n         launch the testpmd with different parameters\n@@ -130,6 +129,7 @@ class TestVM2VMVirtioPmdCbdma(TestCase):\n     def start_vms(\n         self,\n         vm_queue,\n+        mergeable=True,\n         packed=False,\n         server_mode=True,\n         restart_vm1=False,\n@@ -152,14 +152,22 @@ class TestVM2VMVirtioPmdCbdma(TestCase):\n             else:\n                 vm_params[\"opt_path\"] = self.base_dir + \"/vhost-net%d\" % i + \",server\"\n             vm_params[\"opt_mac\"] = \"52:54:00:00:00:0%d\" % (i + 1)\n-            if not packed:\n+            if mergeable:\n+                mrg_rxbuf = \"on\"\n+            else:\n+                mrg_rxbuf = \"off\"\n+            if packed:\n                 vm_params[\n                     \"opt_settings\"\n-                ] = \"disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on\"\n+                ] = \"disable-modern=false,mrg_rxbuf={},mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on\".format(\n+                    mrg_rxbuf\n+                )\n             else:\n                 vm_params[\n                     \"opt_settings\"\n-                ] = \"disable-modern=false,mrg_rxbuf=on,mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on,packed=on\"\n+                ] = \"disable-modern=false,mrg_rxbuf={},mq=on,vectors=40,csum=on,guest_csum=on,host_tso4=on,guest_tso4=on,guest_ecn=on,guest_ufo=on,host_ufo=on\".format(\n+                    mrg_rxbuf\n+                )\n             vm_info.set_vm_device(**vm_params)\n             time.sleep(3)\n             try:\n@@ -172,32 +180,42 @@ class TestVM2VMVirtioPmdCbdma(TestCase):\n             self.vm_dut.append(vm_dut)\n             self.vm.append(vm_info)\n \n-    def start_vm0_testpmd(self):\n-        param = \"--tx-offloads=0x00 --enable-hw-vlan-strip --txq=8 --rxq=8 --txd=1024 --rxd=1024 --max-pkt-len=9600 --rx-offloads=0x00002000\"\n-        self.vm0_pmd.start_testpmd(cores=\"default\", param=param)\n-        self.vm0_pmd.execute_cmd(\"set fwd mac\")\n-        self.vm0_pmd.execute_cmd(\"start\")\n-\n-    def start_vm1_testpmd(self, resend=False):\n-        param = \"--tx-offloads=0x00 --enable-hw-vlan-strip --txq=8 --rxq=8 --txd=1024 --rxd=1024 --max-pkt-len=9600 --rx-offloads=0x00002000\"\n-        if not resend:\n-            self.vm1_pmd.start_testpmd(cores=\"default\", param=param)\n-            self.vm1_pmd.execute_cmd(\"set fwd mac\")\n-            self.vm1_pmd.execute_cmd(\n-                \"set txpkts 64,256,512,1024,2000,64,256,512,1024,2000\"\n+    def start_vm_testpmd(self, vm_pmd, queues, mergeable=True):\n+        if mergeable:\n+            param = \"--enable-hw-vlan-strip --txq={} --rxq={} --txd=1024 --rxd=1024 --max-pkt-len=9600 --tx-offloads=0x00 --rx-offloads=0x00002000\".format(\n+                queues, queues\n             )\n-            self.vm1_pmd.execute_cmd(\"start tx_first 1\")\n         else:\n-            self.vm1_pmd.execute_cmd(\"stop\")\n-            self.vm0_pmd.execute_cmd(\"start\")\n-            self.vm0_pmd.execute_cmd(\"clear port stats all\")\n-            self.vhost_user_pmd.execute_cmd(\"clear port stats all\")\n-            self.vm1_pmd.execute_cmd(\"clear port stats all\")\n-            self.vm1_pmd.execute_cmd(\"start tx_first 1\")\n+            param = \"--enable-hw-vlan-strip --txq={} --rxq={} --txd=1024 --rxd=1024 --tx-offloads=0x00\".format(\n+                queues, queues\n+            )\n+        vm_pmd.start_testpmd(cores=\"default\", param=param)\n+        vm_pmd.execute_cmd(\"set fwd mac\")\n+\n+    def send_big_imix_packets_from_vm1(self):\n+        self.vm1_pmd.execute_cmd(\"set txpkts 64,256,512,1024,2000,64,256,512,1024,2000\")\n+        self.vm1_pmd.execute_cmd(\"start tx_first 32\")\n+        self.vm1_pmd.execute_cmd(\"show port stats all\")\n+\n+    def send_small_imix_packets_from_vm1(self):\n+        self.vm1_pmd.execute_cmd(\"set txpkts 64,256,512\")\n+        self.vm1_pmd.execute_cmd(\"start tx_first 32\")\n+        self.vm1_pmd.execute_cmd(\"show port stats all\")\n+\n+    def send_small_imix_packets_from_vm1(self):\n+        self.vm1_pmd.execute_cmd(\"set txpkts 64,256,512\")\n+        self.vm1_pmd.execute_cmd(\"start tx_first 32\")\n+        self.vm1_pmd.execute_cmd(\"show port stats all\")\n+\n+    def send_64b_packets_from_vm1(self):\n+        self.vm1_pmd.execute_cmd(\"stop\")\n+        self.vm1_pmd.execute_cmd(\"start tx_first 32\")\n+        self.vm1_pmd.execute_cmd(\"show port stats all\")\n \n     def check_packets_of_each_queue(self, vm_pmd, queues):\n         vm_pmd.execute_cmd(\"show port stats all\")\n         out = vm_pmd.execute_cmd(\"stop\")\n+        self.logger.info(out)\n         for queue in range(queues):\n             reg = \"Queue= %d\" % queue\n             index = out.find(reg)\n@@ -211,28 +229,94 @@ class TestVM2VMVirtioPmdCbdma(TestCase):\n                 + \"rx-packets: {}, tx-packets: {}\".format(rx_packets, tx_packets),\n             )\n \n-    def test_vm2vm_virtio_pmd_split_ring_mergeable_path_8_queues_cbdma_enable_with_server_mode_stable_test(\n+    def dynamic_change_queue_size(self, dut_pmd, queues):\n+        dut_pmd.execute_cmd(\"stop\")\n+        dut_pmd.execute_cmd(\"port stop all\")\n+        dut_pmd.execute_cmd(\"port config all rxq {}\".format(queues))\n+        dut_pmd.execute_cmd(\"port config all txq {}\".format(queues))\n+        dut_pmd.execute_cmd(\"port start all\")\n+        dut_pmd.execute_cmd(\"start\")\n+\n+    def get_and_verify_func_name_of_perf_top(self, func_name_list):\n+        self.dut.send_expect(\"rm -fr perf_top.log\", \"# \", 120)\n+        self.dut.send_expect(\"perf top > perf_top.log\", \"\", 120)\n+        time.sleep(10)\n+        self.dut.send_expect(\"^C\", \"#\")\n+        out = self.dut.send_expect(\"cat perf_top.log\", \"# \", 120)\n+        self.logger.info(out)\n+        for func_name in func_name_list:\n+            self.verify(\n+                func_name in out,\n+                \"the func_name {} is not in the perf top output\".format(func_name),\n+            )\n+\n+    def test_vm2vm_virtio_pmd_split_ring_mergeable_path_dynamic_queue_size_with_cbdma_enable_and_server_mode(\n         self,\n     ):\n         \"\"\"\n-        Test Case 1: VM2VM virtio-pmd split ring mergeable path 8 queues CBDMA enable with server mode stable test\n+        Test Case 1: VM2VM virtio-pmd split ring mergeable path dynamic queue size with cbdma enable and server mode\n         \"\"\"\n+        self.check_path = [\"virtio_dev_rx_async\", \"virtio_dev_tx_async\"]\n         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, allow_diff_socket=True)\n-        dmas = self.generate_dms_param(8)\n-        lcore_dma = self.generate_lcore_dma_param(\n-            cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:]\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+            \"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+                self.vhost_core_list[3],\n+                self.cbdma_list[8],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[9],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[10],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[11],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[12],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[13],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[14],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[15],\n+            )\n         )\n         eal_param = (\n-            \"--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas={}'\".format(\n-                dmas\n-            )\n-            + \" --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas={}'\".format(\n-                dmas\n-            )\n+            \"--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;rxq0;rxq1;rxq2;rxq3]'\"\n+            + \" --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;rxq0;rxq1;rxq2;rxq3]'\"\n         )\n         param = (\n-            \"--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8\"\n-            + \" --lcore-dma={}\".format(lcore_dma)\n+            \"--nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4\"\n+            + \" --lcore-dma=[%s]\" % lcore_dma\n         )\n         self.start_vhost_testpmd(\n             cores=self.vhost_core_list,\n@@ -241,16 +325,35 @@ class TestVM2VMVirtioPmdCbdma(TestCase):\n             eal_param=eal_param,\n             param=param,\n         )\n-        self.start_vms(vm_queue=8, packed=False, server_mode=True)\n+        self.start_vms(vm_queue=8, mergeable=True, packed=False, server_mode=True)\n         self.vm0_pmd = PmdOutput(self.vm_dut[0])\n         self.vm1_pmd = PmdOutput(self.vm_dut[1])\n-        self.start_vm0_testpmd()\n-        self.start_vm1_testpmd(resend=False)\n+        self.start_vm_testpmd(vm_pmd=self.vm0_pmd, queues=8, mergeable=True)\n+        self.vm0_pmd.execute_cmd(\"start\")\n+        self.start_vm_testpmd(vm_pmd=self.vm1_pmd, queues=8, mergeable=True)\n+        self.send_big_imix_packets_from_vm1()\n+        self.get_and_verify_func_name_of_perf_top(self.check_path)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=4)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=4)\n+\n+        self.dynamic_change_queue_size(dut_pmd=self.vhost_user_pmd, queues=8)\n+        self.vm0_pmd.execute_cmd(\"start\")\n+        self.send_64b_packets_from_vm1()\n+        self.get_and_verify_func_name_of_perf_top(self.check_path)\n         self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=8)\n         self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=8)\n-        for _ in range(10):\n+\n+        for _ in range(5):\n             self.logger.info(\"Quit and relaunch vhost side testpmd\")\n-            self.vhost_user_pmd.execute_cmd(\"quit\", \"#\")\n+            self.vhost_user_pmd.quit()\n+            eal_param = (\n+                \"--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'\"\n+                + \" --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'\"\n+            )\n+            param = (\n+                \"--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8\"\n+                + \" --lcore-dma=[%s]\" % lcore_dma\n+            )\n             self.start_vhost_testpmd(\n                 cores=self.vhost_core_list,\n                 ports=self.cbdma_list,\n@@ -258,32 +361,78 @@ class TestVM2VMVirtioPmdCbdma(TestCase):\n                 eal_param=eal_param,\n                 param=param,\n             )\n-            self.start_vm1_testpmd(resend=True)\n+            self.vm0_pmd.execute_cmd(\"start\")\n+            self.send_64b_packets_from_vm1()\n             self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=8)\n             self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=8)\n \n-    def test_vm2vm_virtio_pmd_split_ring_mergeable_path_dynamic_queue_size_cbdma_enable_with_server_mode_test(\n+    def test_vm2vm_virtio_pmd_split_ring_non_mergeable_path_dynamic_queue_size_with_cbdma_enable_and_server_mode(\n         self,\n     ):\n         \"\"\"\n-        Test Case 2: VM2VM virtio-pmd split ring mergeable path dynamic queue size CBDMA enable with server mode test\n+        Test Case 2: VM2VM virtio-pmd split ring non-mergeable path dynamic queue size with cbdma enable and server mode\n         \"\"\"\n+        self.check_path = [\"virtio_dev_rx_async\", \"virtio_dev_tx_async\"]\n         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, allow_diff_socket=True)\n-        dmas = self.generate_dms_param(4)\n-        lcore_dma = self.generate_lcore_dma_param(\n-            cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:]\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+            \"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+                self.vhost_core_list[3],\n+                self.cbdma_list[8],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[9],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[10],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[11],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[12],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[13],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[14],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[15],\n+            )\n         )\n         eal_param = (\n-            \"--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas={}'\".format(\n-                dmas\n-            )\n-            + \" --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas={}'\".format(\n-                dmas\n-            )\n+            \"--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;rxq0;rxq1;rxq2;rxq3]'\"\n+            + \" --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;rxq0;rxq1;rxq2;rxq3]'\"\n         )\n         param = (\n-            \" --nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4\"\n-            + \" --lcore-dma={}\".format(lcore_dma)\n+            \"--nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4\"\n+            + \" --lcore-dma=[%s]\" % lcore_dma\n         )\n         self.start_vhost_testpmd(\n             cores=self.vhost_core_list,\n@@ -292,54 +441,91 @@ class TestVM2VMVirtioPmdCbdma(TestCase):\n             eal_param=eal_param,\n             param=param,\n         )\n-        self.start_vms(vm_queue=8, packed=False, server_mode=True)\n+        self.start_vms(vm_queue=8, mergeable=False, packed=False, server_mode=True)\n         self.vm0_pmd = PmdOutput(self.vm_dut[0])\n         self.vm1_pmd = PmdOutput(self.vm_dut[1])\n-        self.start_vm0_testpmd()\n-        self.start_vm1_testpmd(resend=False)\n+        self.start_vm_testpmd(vm_pmd=self.vm0_pmd, queues=8, mergeable=False)\n+        self.vm0_pmd.execute_cmd(\"start\")\n+        self.start_vm_testpmd(vm_pmd=self.vm1_pmd, queues=8, mergeable=False)\n+        self.send_small_imix_packets_from_vm1()\n+        self.get_and_verify_func_name_of_perf_top(self.check_path)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=4)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=4)\n+\n+        self.dynamic_change_queue_size(dut_pmd=self.vm0_pmd, queues=4)\n+        self.dynamic_change_queue_size(dut_pmd=self.vm1_pmd, queues=4)\n+        self.send_64b_packets_from_vm1()\n+        self.get_and_verify_func_name_of_perf_top(self.check_path)\n         self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=4)\n         self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=4)\n-        for _ in range(10):\n-            self.logger.info(\"Quit and relaunch vhost side testpmd with 8 queues\")\n-            self.vhost_user_pmd.execute_cmd(\"quit\", \"#\")\n-            dmas = self.generate_dms_param(8)\n-            eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas={}'\".format(\n-                dmas\n-            ) + \" --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas={}'\".format(\n-                dmas\n-            )\n-            param = (\n-                \" --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8\"\n-                + \" --lcore-dma={}\".format(lcore_dma)\n-            )\n-            self.start_vhost_testpmd(\n-                cores=self.vhost_core_list,\n-                ports=self.cbdma_list,\n-                prefix=\"vhost\",\n-                eal_param=eal_param,\n-                param=param,\n-            )\n-            self.start_vm1_testpmd(resend=True)\n-            self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=8)\n-            self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=8)\n \n-    def test_vm2vm_virtio_pmd_packed_ring_mergeable_path_8_queues_cbdma_enable_test(\n+    def test_vm2vm_virtio_pmd_packed_ring_mergeable_path_dynamic_queue_size_with_cbdma_enable_and_server_mode(\n         self,\n     ):\n         \"\"\"\n-        Test Case 3: VM2VM virtio-pmd packed ring mergeable path 8 queues CBDMA enable test\n+        Test Case 3: VM2VM virtio-pmd packed ring mergeable path dynamic queue size with cbdma enable and server mode\n         \"\"\"\n+        self.check_path = [\"virtio_dev_rx_async\"]\n         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, allow_diff_socket=True)\n-        dmas = self.generate_dms_param(8)\n-        lcore_dma = self.generate_lcore_dma_param(\n-            cbdma_list=self.cbdma_list, core_list=self.vhost_core_list[1:]\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+            \"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+                self.vhost_core_list[3],\n+                self.cbdma_list[8],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[9],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[10],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[11],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[12],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[13],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[14],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[15],\n+            )\n+        )\n+        eal_param = (\n+            \"--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]'\"\n+            + \" --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]'\"\n         )\n-        eal_param = \"--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas={}'\".format(\n-            dmas\n-        ) + \" --vdev 'net_vhost1,iface=vhost-net1,queues=8,dmas={}'\".format(dmas)\n         param = (\n-            \" --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8\"\n-            + \" --lcore-dma={}\".format(lcore_dma)\n+            \"--nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4\"\n+            + \" --lcore-dma=[%s]\" % lcore_dma\n         )\n         self.start_vhost_testpmd(\n             cores=self.vhost_core_list,\n@@ -348,22 +534,130 @@ class TestVM2VMVirtioPmdCbdma(TestCase):\n             eal_param=eal_param,\n             param=param,\n         )\n-        self.start_vms(vm_queue=8, packed=True, server_mode=False)\n+        self.start_vms(vm_queue=8, mergeable=True, packed=True, server_mode=True)\n         self.vm0_pmd = PmdOutput(self.vm_dut[0])\n         self.vm1_pmd = PmdOutput(self.vm_dut[1])\n-        self.start_vm0_testpmd()\n-        self.start_vm1_testpmd(resend=False)\n-        self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=8)\n-        self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=8)\n+        self.start_vm_testpmd(vm_pmd=self.vm0_pmd, queues=8, mergeable=True)\n+        self.vm0_pmd.execute_cmd(\"start\")\n+        self.start_vm_testpmd(vm_pmd=self.vm1_pmd, queues=8, mergeable=True)\n+        self.send_big_imix_packets_from_vm1()\n+        self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=4)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=4)\n+\n         self.logger.info(\"Quit and relaunch VM2 with split ring\")\n         self.vm1_pmd.execute_cmd(\"quit\", \"#\")\n         self.vm[1].stop()\n         self.vm_dut.remove(self.vm_dut[1])\n         self.vm.remove(self.vm[1])\n-        self.start_vms(vm_queue=8, packed=False, restart_vm1=True, server_mode=False)\n+        self.start_vms(\n+            vm_queue=8, mergeable=True, packed=False, restart_vm1=True, server_mode=True\n+        )\n+        self.vm1_pmd = PmdOutput(self.vm_dut[1])\n+        self.vm0_pmd.execute_cmd(\"start\")\n+        self.start_vm_testpmd(vm_pmd=self.vm1_pmd, queues=8)\n+        self.send_big_imix_packets_from_vm1()\n+        self.get_and_verify_func_name_of_perf_top(self.check_path)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=4)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=4)\n+\n+        self.dynamic_change_queue_size(dut_pmd=self.vhost_user_pmd, queues=8)\n+        self.vm0_pmd.execute_cmd(\"start\")\n+        self.send_64b_packets_from_vm1()\n+        self.get_and_verify_func_name_of_perf_top(self.check_path)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=8)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=8)\n+\n+    def test_vm2vm_virtio_pmd_packed_ring_non_mergeable_path_dynamic_queue_size_with_cbdma_enable_and_server_mode(\n+        self,\n+    ):\n+        \"\"\"\n+        Test Case 4: VM2VM virtio-pmd packed ring non-mergeable path dynamic queue size with cbdma enable and server mode\n+        \"\"\"\n+        self.check_path = [\"virtio_dev_rx_async\"]\n+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, allow_diff_socket=True)\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+            \"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+                self.vhost_core_list[3],\n+                self.cbdma_list[8],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[9],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[10],\n+                self.vhost_core_list[3],\n+                self.cbdma_list[11],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[12],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[13],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[14],\n+                self.vhost_core_list[4],\n+                self.cbdma_list[15],\n+            )\n+        )\n+        eal_param = (\n+            \"--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq5;txq6;txq7]'\"\n+            + \" --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq5;txq6;txq7]'\"\n+        )\n+        param = (\n+            \"--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8\"\n+            + \" --lcore-dma=[%s]\" % lcore_dma\n+        )\n+        self.start_vhost_testpmd(\n+            cores=self.vhost_core_list,\n+            ports=self.cbdma_list,\n+            prefix=\"vhost\",\n+            eal_param=eal_param,\n+            param=param,\n+        )\n+        self.start_vms(vm_queue=8, mergeable=False, packed=True, server_mode=True)\n+        self.vm0_pmd = PmdOutput(self.vm_dut[0])\n         self.vm1_pmd = PmdOutput(self.vm_dut[1])\n+        self.start_vm_testpmd(vm_pmd=self.vm0_pmd, queues=4, mergeable=False)\n+        self.vm0_pmd.execute_cmd(\"start\")\n+        self.start_vm_testpmd(vm_pmd=self.vm1_pmd, queues=4, mergeable=False)\n+        self.send_small_imix_packets_from_vm1()\n+        self.get_and_verify_func_name_of_perf_top(self.check_path)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=4)\n+        self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=4)\n+\n+        self.dynamic_change_queue_size(self.vm0_pmd, queues=8)\n+        self.dynamic_change_queue_size(self.vm1_pmd, queues=8)\n         self.vm0_pmd.execute_cmd(\"start\")\n-        self.start_vm1_testpmd(resend=False)\n+        self.send_64b_packets_from_vm1()\n+        self.get_and_verify_func_name_of_perf_top(self.check_path)\n         self.check_packets_of_each_queue(vm_pmd=self.vm0_pmd, queues=8)\n         self.check_packets_of_each_queue(vm_pmd=self.vm1_pmd, queues=8)\n \n",
    "prefixes": [
        "V2",
        "2/2"
    ]
}