test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V2 2/3] tests/vhost_cbdma: modify the dmas parameter by DPDK changed
@ 2022-11-22  8:59 Wei Ling
  0 siblings, 0 replies; only message in thread
From: Wei Ling @ 2022-11-22  8:59 UTC (permalink / raw)
  To: dts; +Cc: Wei Ling

From DPDK-22.11, the dmas parameter have been changed by the local patch,
so modify the dmas parameter in the testsuite.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_vhost_cbdma.py | 991 +++++++++++++++------------------
 1 file changed, 446 insertions(+), 545 deletions(-)

diff --git a/tests/TestSuite_vhost_cbdma.py b/tests/TestSuite_vhost_cbdma.py
index 88ee83df..b1492004 100644
--- a/tests/TestSuite_vhost_cbdma.py
+++ b/tests/TestSuite_vhost_cbdma.py
@@ -70,7 +70,7 @@ class TestVhostCbdma(TestCase):
         self.test_result = {}
         self.nb_desc = self.test_parameters.get(list(self.test_parameters.keys())[0])[0]
         self.dut.send_expect("killall -I %s" % self.testpmd_name, "#", 20)
-        self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
+        #self.dut.send_expect("rm -rf %s/vhost-net*" % self.base_dir, "#")
         self.mode_list = []
 
     def get_cbdma_ports_info_and_bind_to_dpdk(self, cbdma_num, allow_diff_socket=False):
@@ -189,29 +189,17 @@ class TestVhostCbdma(TestCase):
         Test Case 1: PVP split ring all path multi-queues vhost async operation with 1 to 1 mapping between vrings and CBDMA virtual channels
         """
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4)
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[1],
-                self.cbdma_list[1],
-                self.vhost_core_list[1],
-                self.cbdma_list[2],
-                self.vhost_core_list[1],
-                self.cbdma_list[3],
-            )
-        )
-        vhost_eal_param = (
-            "--vdev 'net_vhost0,iface=vhost-net0,queues=2,dmas=[txq0;txq1;rxq0;rxq1]'"
-        )
-        vhost_param = (
-            "--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        dmas = "txq0@%s;" \
+               "txq1@%s;" \
+               "rxq0@%s;" \
+               "rxq1@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[2],
+            self.cbdma_list[3],
         )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=2,dmas=[%s]'" % dmas
+        vhost_param = "--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024"
         allow_pci = [self.dut.ports_info[0]["pci"]]
         for i in self.cbdma_list:
             allow_pci.append(i)
@@ -251,6 +239,7 @@ class TestVhostCbdma(TestCase):
 
         if not self.check_2M_env:
             self.vhost_user_pmd.quit()
+            vhost_eal_param += ",dma-ring-size=4096"
             self.start_vhost_testpmd(
                 cores=self.vhost_core_list,
                 param=vhost_param,
@@ -294,30 +283,44 @@ class TestVhostCbdma(TestCase):
         self,
     ):
         """
-        Test Case 2: PVP split ring all path multi-queues vhost async operations with M to 1 mapping between vrings and CBDMA virtual channels
+        Test Case 2: PVP split ring all path multi-queues vhost async operations test with one CBDMA device being shared among multiple tx/rx queues
         """
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4)
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
-                self.cbdma_list[1],
-                self.vhost_core_list[3],
-                self.cbdma_list[2],
-                self.vhost_core_list[4],
-                self.cbdma_list[3],
-            )
-        )
-        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]'"
-        vhost_param = (
-            "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        dmas = "txq0@%s;" \
+               "txq1@%s;" \
+               "txq2@%s;" \
+               "txq3@%s;" \
+               "txq4@%s;" \
+               "txq5@%s;" \
+               "txq6@%s;" \
+               "txq7@%s;" \
+               "rxq0@%s;" \
+               "rxq1@%s;" \
+               "rxq2@%s;" \
+               "rxq3@%s;" \
+               "rxq4@%s;" \
+               "rxq5@%s;" \
+               "rxq6@%s;" \
+               "rxq7@%s" %(
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
         )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas
+        vhost_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
         allow_pci = [self.dut.ports_info[0]["pci"]]
         for i in self.cbdma_list:
             allow_pci.append(i)
@@ -355,40 +358,110 @@ class TestVhostCbdma(TestCase):
             self.check_each_queue_of_port_packets(queues=8)
             self.virtio_user_pmd.quit()
 
+        self.vhost_user_pmd.quit()
+        dmas = "txq0@%s;" \
+               "txq1@%s;" \
+               "txq2@%s;" \
+               "txq3@%s;" \
+               "txq4@%s;" \
+               "txq5@%s;" \
+               "txq6@%s;" \
+               "txq7@%s;" \
+               "rxq0@%s;" \
+               "rxq1@%s;" \
+               "rxq2@%s;" \
+               "rxq3@%s;" \
+               "rxq4@%s;" \
+               "rxq5@%s;" \
+               "rxq6@%s;" \
+               "rxq7@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[2],
+            self.cbdma_list[2],
+            self.cbdma_list[3],
+            self.cbdma_list[3],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[2],
+            self.cbdma_list[2],
+            self.cbdma_list[3],
+            self.cbdma_list[3],
+        )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas
+        vhost_param = "--nb-cores=6 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
+        self.start_vhost_testpmd(
+            cores=self.vhost_core_list,
+            param=vhost_param,
+            eal_param=vhost_eal_param,
+            ports=allow_pci,
+            iova_mode="va",
+        )
+        for key, path in SPLIT_RING_PATH.items():
+            if key == "mergeable":
+                virtio_eal_param = (
+                    "--vdev 'net_virtio_user0,mac=%s,path=./vhost-net0,%s,queues=8'"
+                    % (self.virtio_mac, path)
+                )
+
+                mode = key + "_VA_diff"
+                self.mode_list.append(mode)
+                self.start_virtio_testpmd(
+                    cores=self.virtio_core_list,
+                    param=virtio_param,
+                    eal_param=virtio_eal_param,
+                )
+                self.send_imix_packets(mode=mode)
+                self.check_each_queue_of_port_packets(queues=8)
+
+                mode += "_RestartVhost"
+                self.vhost_user_pmd.execute_cmd("start")
+                self.mode_list.append(mode)
+                self.send_imix_packets(mode=mode)
+                self.check_each_queue_of_port_packets(queues=8)
+                self.virtio_user_pmd.quit()
+
         if not self.check_2M_env:
             self.vhost_user_pmd.quit()
-            lcore_dma = (
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s"
-                % (
-                    self.vhost_core_list[1],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[2],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[3],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[4],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[5],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[6],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[7],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[8],
-                    self.cbdma_list[0],
-                )
-            )
-            vhost_param = (
-                "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-                % lcore_dma
+            dmas = "txq0@%s;" \
+                   "txq1@%s;" \
+                   "txq2@%s;" \
+                   "txq3@%s;" \
+                   "txq4@%s;" \
+                   "txq5@%s;" \
+                   "txq6@%s;" \
+                   "txq7@%s;" \
+                   "rxq0@%s;" \
+                   "rxq1@%s;" \
+                   "rxq2@%s;" \
+                   "rxq3@%s;" \
+                   "rxq4@%s;" \
+                   "rxq5@%s;" \
+                   "rxq6@%s;" \
+                   "rxq7@%s" % (
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
             )
+            vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas
+            vhost_param = "--nb-cores=6 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
             self.start_vhost_testpmd(
                 cores=self.vhost_core_list,
                 param=vhost_param,
@@ -397,7 +470,7 @@ class TestVhostCbdma(TestCase):
                 iova_mode="pa",
             )
             for key, path in SPLIT_RING_PATH.items():
-                if key == "inorder_mergeable":
+                if key == "inorder_non_mergeable":
                     virtio_eal_param = (
                         "--vdev 'net_virtio_user0,mac=%s,path=./vhost-net0,%s,queues=8'"
                         % (self.virtio_mac, path)
@@ -432,42 +505,16 @@ class TestVhostCbdma(TestCase):
         self,
     ):
         """
-        Test Case 3: PVP split ring dynamic queue number vhost async operations with M to N mapping between vrings and CBDMA virtual channels
+        Test Case 3: PVP split ring dynamic queue number vhost async operations with cbdma
         """
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8)
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[1],
-                self.cbdma_list[1],
-                self.vhost_core_list[1],
-                self.cbdma_list[2],
-                self.vhost_core_list[1],
-                self.cbdma_list[3],
-                self.vhost_core_list[2],
-                self.cbdma_list[4],
-                self.vhost_core_list[2],
-                self.cbdma_list[5],
-                self.vhost_core_list[2],
-                self.cbdma_list[6],
-                self.vhost_core_list[2],
-                self.cbdma_list[7],
-            )
-        )
-        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;rxq0;rxq1]'"
-        vhost_param = (
-            "--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        dmas = "txq0@%s;" \
+               "txq1@%s" %(
+            self.cbdma_list[0],
+            self.cbdma_list[1],
         )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s],dma-ring-size=64'" % dmas
+        vhost_param = "--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024"
         allow_pci = [self.dut.ports_info[0]["pci"]]
         for i in self.cbdma_list:
             allow_pci.append(i)
@@ -511,27 +558,17 @@ class TestVhostCbdma(TestCase):
         self.check_each_queue_of_port_packets(queues=1)
 
         self.vhost_user_pmd.quit()
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
-                self.cbdma_list[1],
-                self.vhost_core_list[3],
-                self.cbdma_list[2],
-                self.vhost_core_list[4],
-                self.cbdma_list[3],
-            )
-        )
-        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[rxq0;rxq1;rxq2;rxq3]'"
-        vhost_param = (
-            "--nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        dmas = "rxq0@%s;" \
+               "rxq1@%s;" \
+               "rxq2@%s;" \
+               "rxq3@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
         )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s],dma-ring-size=2048'" % dmas
+        vhost_param = "--nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             param=vhost_param,
@@ -545,42 +582,35 @@ class TestVhostCbdma(TestCase):
         self.check_each_queue_of_port_packets(queues=4)
 
         self.vhost_user_pmd.quit()
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[1],
-                self.cbdma_list[1],
-                self.vhost_core_list[2],
-                self.cbdma_list[1],
-                self.vhost_core_list[2],
-                self.cbdma_list[2],
-                self.vhost_core_list[2],
-                self.cbdma_list[3],
-                self.vhost_core_list[2],
-                self.cbdma_list[4],
-                self.vhost_core_list[2],
-                self.cbdma_list[5],
-                self.vhost_core_list[2],
-                self.cbdma_list[6],
-                self.vhost_core_list[2],
-                self.cbdma_list[7],
-            )
-        )
-        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
-        vhost_param = (
-            "--nb-cores=2 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        dmas = "txq0@%s;" \
+               "txq1@%s;" \
+               "txq2@%s;" \
+               "txq3@%s;" \
+               "txq4@%s;" \
+               "txq5@%s;" \
+               "txq6@%s;" \
+               "rxq2@%s;" \
+               "rxq3@%s;" \
+               "rxq4@%s;" \
+               "rxq5@%s;" \
+               "rxq6@%s;" \
+               "rxq7@%s" %(
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
         )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s],dma-ring-size=64'" % dmas
+        vhost_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             param=vhost_param,
@@ -594,51 +624,35 @@ class TestVhostCbdma(TestCase):
         self.check_each_queue_of_port_packets(queues=8)
 
         self.vhost_user_pmd.quit()
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
-                self.cbdma_list[1],
-                self.vhost_core_list[2],
-                self.cbdma_list[2],
-                self.vhost_core_list[3],
-                self.cbdma_list[3],
-                self.vhost_core_list[3],
-                self.cbdma_list[4],
-                self.vhost_core_list[3],
-                self.cbdma_list[5],
-                self.vhost_core_list[3],
-                self.cbdma_list[6],
-                self.vhost_core_list[4],
-                self.cbdma_list[4],
-                self.vhost_core_list[4],
-                self.cbdma_list[5],
-                self.vhost_core_list[4],
-                self.cbdma_list[6],
-                self.vhost_core_list[4],
-                self.cbdma_list[7],
-            )
-        )
-        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]'"
-        vhost_param = (
-            "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        dmas = "txq0@%s;" \
+               "txq1@%s;" \
+               "txq2@%s;" \
+               "txq3@%s;" \
+               "txq4@%s;" \
+               "txq5@%s;" \
+               "txq6@%s;" \
+               "rxq2@%s;" \
+               "rxq3@%s;" \
+               "rxq4@%s;" \
+               "rxq5@%s;" \
+               "rxq6@%s;" \
+               "rxq7@%s" %(
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[2],
+            self.cbdma_list[3],
+            self.cbdma_list[4],
+            self.cbdma_list[5],
+            self.cbdma_list[6],
+            self.cbdma_list[2],
+            self.cbdma_list[3],
+            self.cbdma_list[4],
+            self.cbdma_list[5],
+            self.cbdma_list[6],
+            self.cbdma_list[7],
         )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        vhost_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             param=vhost_param,
@@ -651,70 +665,6 @@ class TestVhostCbdma(TestCase):
         self.send_imix_packets(mode=mode)
         self.check_each_queue_of_port_packets(queues=8)
 
-        self.virtio_user_pmd.quit()
-        virtio_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
-        for key, path in SPLIT_RING_PATH.items():
-            if key == "mergeable":
-                virtio_eal_param = (
-                    "--vdev 'net_virtio_user0,mac=%s,path=vhost-net0,%s,queues=8,server=1'"
-                    % (self.virtio_mac, path)
-                )
-                mode = key + "_VA_M:N_diff"
-                self.mode_list.append(mode)
-                self.start_virtio_testpmd(
-                    cores=self.virtio_core_list,
-                    param=virtio_param,
-                    eal_param=virtio_eal_param,
-                )
-                self.send_imix_packets(mode=mode)
-                self.check_each_queue_of_port_packets(queues=8)
-
-        self.vhost_user_pmd.quit()
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
-                self.cbdma_list[0],
-                self.vhost_core_list[3],
-                self.cbdma_list[1],
-                self.vhost_core_list[3],
-                self.cbdma_list[2],
-                self.vhost_core_list[4],
-                self.cbdma_list[1],
-                self.vhost_core_list[4],
-                self.cbdma_list[2],
-                self.vhost_core_list[5],
-                self.cbdma_list[1],
-                self.vhost_core_list[5],
-                self.cbdma_list[2],
-            )
-        )
-        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]'"
-        vhost_param = (
-            "--nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
-        )
-        self.start_vhost_testpmd(
-            cores=self.vhost_core_list,
-            param=vhost_param,
-            eal_param=vhost_eal_param,
-            ports=allow_pci,
-            iova_mode="pa",
-        )
-        mode = "mergeable" + "_PA_M:N_diff"
-        self.mode_list.append(mode)
-        self.send_imix_packets(mode=mode)
-        self.check_each_queue_of_port_packets(queues=8)
-
         self.test_target = self.running_case
         self.expected_throughput = self.get_suite_cfg()["expected_throughput"][
             self.test_target
@@ -727,32 +677,22 @@ class TestVhostCbdma(TestCase):
         self,
     ):
         """
-        Test Case 4: PVP packed ring all path multi-queues vhost async operations with 1 to 1 mapping between vrings and CBDMA virtual channels
+        Test Case 4: PVP packed ring all path multi-queues vhost async operation test with each tx/rx queue using one CBDMA device
         """
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4)
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[1],
-                self.cbdma_list[1],
-                self.vhost_core_list[1],
-                self.cbdma_list[2],
-                self.vhost_core_list[1],
-                self.cbdma_list[3],
-            )
-        )
+        dmas = "txq0@%s;" \
+               "txq1@%s;" \
+               "rxq0@%s;" \
+               "rxq1@%s" % (
+                   self.cbdma_list[0],
+                   self.cbdma_list[1],
+                   self.cbdma_list[2],
+                   self.cbdma_list[3],
+               )
         vhost_eal_param = (
-            "--vdev 'net_vhost0,iface=vhost-net0,queues=2,dmas=[txq0;txq1;rxq0;rxq1]'"
-        )
-        vhost_param = (
-            "--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+            "--vdev 'net_vhost0,iface=vhost-net0,queues=2,dmas=[%s]'" % dmas
         )
+        vhost_param = "--nb-cores=1 --txq=2 --rxq=2 --txd=1024 --rxd=1024"
         allow_pci = [self.dut.ports_info[0]["pci"]]
         for i in self.cbdma_list:
             allow_pci.append(i)
@@ -840,27 +780,41 @@ class TestVhostCbdma(TestCase):
         Test Case 5: PVP packed ring all path multi-queues vhost async operations with M to 1 mapping between vrings and CBDMA virtual channels
         """
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4)
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
-                self.cbdma_list[1],
-                self.vhost_core_list[3],
-                self.cbdma_list[2],
-                self.vhost_core_list[4],
-                self.cbdma_list[3],
-            )
-        )
-        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]'"
-        vhost_param = (
-            "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        dmas = "txq0@%s;" \
+               "txq1@%s;" \
+               "txq2@%s;" \
+               "txq3@%s;" \
+               "txq4@%s;" \
+               "txq5@%s;" \
+               "txq6@%s;" \
+               "txq7@%s;" \
+               "rxq0@%s;" \
+               "rxq1@%s;" \
+               "rxq2@%s;" \
+               "rxq3@%s;" \
+               "rxq4@%s;" \
+               "rxq5@%s;" \
+               "rxq6@%s;" \
+               "rxq7@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
         )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas
+        vhost_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
         allow_pci = [self.dut.ports_info[0]["pci"]]
         for i in self.cbdma_list:
             allow_pci.append(i)
@@ -899,40 +853,110 @@ class TestVhostCbdma(TestCase):
             self.check_each_queue_of_port_packets(queues=8)
             self.virtio_user_pmd.quit()
 
+
+        self.vhost_user_pmd.quit()
+        dmas = "txq0@%s;" \
+               "txq1@%s;" \
+               "txq2@%s;" \
+               "txq3@%s;" \
+               "txq4@%s;" \
+               "txq5@%s;" \
+               "txq6@%s;" \
+               "txq7@%s;" \
+               "rxq0@%s;" \
+               "rxq1@%s;" \
+               "rxq2@%s;" \
+               "rxq3@%s;" \
+               "rxq4@%s;" \
+               "rxq5@%s;" \
+               "rxq6@%s;" \
+               "rxq7@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[2],
+            self.cbdma_list[2],
+            self.cbdma_list[3],
+            self.cbdma_list[3],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[2],
+            self.cbdma_list[2],
+            self.cbdma_list[3],
+            self.cbdma_list[3],
+        )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas
+        self.start_vhost_testpmd(
+            cores=self.vhost_core_list,
+            param=vhost_param,
+            eal_param=vhost_eal_param,
+            ports=allow_pci,
+            iova_mode="va",
+        )
+        virtio_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
+        for key, path in PACKED_RING_PATH.items():
+            if key == "vectorized_path_not_power_of_2":
+                virtio_eal_param = (
+                    "--vdev 'net_virtio_user0,mac=%s,path=./vhost-net0,%s,queues=8'"
+                    % (self.virtio_mac, path)
+                )
+
+                mode = key + "_VA_diff"
+                self.mode_list.append(mode)
+                self.start_virtio_testpmd(
+                    cores=self.virtio_core_list,
+                    param=virtio_param,
+                    eal_param=virtio_eal_param,
+                )
+                self.send_imix_packets(mode=mode)
+                self.check_each_queue_of_port_packets(queues=8)
+
+                mode += "_RestartVhost"
+                self.vhost_user_pmd.execute_cmd("start")
+                self.mode_list.append(mode)
+                self.send_imix_packets(mode=mode)
+                self.check_each_queue_of_port_packets(queues=8)
+                self.virtio_user_pmd.quit()
+
         if not self.check_2M_env:
             self.vhost_user_pmd.quit()
-            lcore_dma = (
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s,"
-                "lcore%s@%s"
-                % (
-                    self.vhost_core_list[1],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[2],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[3],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[4],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[5],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[6],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[7],
-                    self.cbdma_list[0],
-                    self.vhost_core_list[8],
-                    self.cbdma_list[0],
-                )
-            )
-            vhost_param = (
-                "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-                % lcore_dma
-            )
+            dmas = "txq0@%s;" \
+                   "txq1@%s;" \
+                   "txq2@%s;" \
+                   "txq3@%s;" \
+                   "txq4@%s;" \
+                   "txq5@%s;" \
+                   "txq6@%s;" \
+                   "txq7@%s;" \
+                   "rxq0@%s;" \
+                   "rxq1@%s;" \
+                   "rxq2@%s;" \
+                   "rxq3@%s;" \
+                   "rxq4@%s;" \
+                   "rxq5@%s;" \
+                   "rxq6@%s;" \
+                   "rxq7@%s" % (
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                       self.cbdma_list[0],
+                   )
+            vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,dmas=[%s]'" % dmas
             self.start_vhost_testpmd(
                 cores=self.vhost_core_list,
                 param=vhost_param,
@@ -942,10 +966,10 @@ class TestVhostCbdma(TestCase):
             )
             virtio_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
             for key, path in PACKED_RING_PATH.items():
-                if key == "inorder_mergeable":
+                if key == "vectorized_path_not_power_of_2":
                     virtio_eal_param = (
-                        "--vdev 'net_virtio_user0,mac=%s,path=./vhost-net0,%s,queues=8'"
-                        % (self.virtio_mac, path)
+                            "--vdev 'net_virtio_user0,mac=%s,path=./vhost-net0,%s,queues=8'"
+                            % (self.virtio_mac, path)
                     )
 
                     mode = key + "_PA"
@@ -980,39 +1004,14 @@ class TestVhostCbdma(TestCase):
         Test Case 6: PVP packed ring dynamic queue number vhost async operations with M to N mapping between vrings and CBDMA virtual channels
         """
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8)
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[1],
-                self.cbdma_list[1],
-                self.vhost_core_list[1],
-                self.cbdma_list[2],
-                self.vhost_core_list[1],
-                self.cbdma_list[3],
-                self.vhost_core_list[2],
-                self.cbdma_list[4],
-                self.vhost_core_list[2],
-                self.cbdma_list[5],
-                self.vhost_core_list[2],
-                self.cbdma_list[6],
-                self.vhost_core_list[2],
-                self.cbdma_list[7],
-            )
-        )
-        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;rxq0;rxq1]'"
-        vhost_param = (
-            "--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        dmas = "txq0@%s;" \
+               "txq1@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[1],
         )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s],dma-ring-size=64'" % dmas
+        vhost_param = "--nb-cores=2 --txq=2 --rxq=2 --txd=1024 --rxd=1024"
+
         allow_pci = [self.dut.ports_info[0]["pci"]]
         for i in self.cbdma_list:
             allow_pci.append(i)
@@ -1056,27 +1055,17 @@ class TestVhostCbdma(TestCase):
         self.check_each_queue_of_port_packets(queues=1)
 
         self.vhost_user_pmd.quit()
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
-                self.cbdma_list[1],
-                self.vhost_core_list[3],
-                self.cbdma_list[2],
-                self.vhost_core_list[4],
-                self.cbdma_list[3],
-            )
-        )
-        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[rxq0;rxq1;rxq2;rxq3]'"
-        vhost_param = (
-            "--nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        dmas = "rxq0@%s;" \
+               "rxq1@%s;" \
+               "rxq2@%s;" \
+               "rxq3@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
         )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s],dma-ring-size=2048'" % dmas
+        vhost_param = "--nb-cores=4 --txq=4 --rxq=4 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             param=vhost_param,
@@ -1090,42 +1079,35 @@ class TestVhostCbdma(TestCase):
         self.check_each_queue_of_port_packets(queues=4)
 
         self.vhost_user_pmd.quit()
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[1],
-                self.cbdma_list[1],
-                self.vhost_core_list[2],
-                self.cbdma_list[1],
-                self.vhost_core_list[2],
-                self.cbdma_list[2],
-                self.vhost_core_list[2],
-                self.cbdma_list[3],
-                self.vhost_core_list[2],
-                self.cbdma_list[4],
-                self.vhost_core_list[2],
-                self.cbdma_list[5],
-                self.vhost_core_list[2],
-                self.cbdma_list[6],
-                self.vhost_core_list[2],
-                self.cbdma_list[7],
-            )
-        )
-        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
-        vhost_param = (
-            "--nb-cores=2 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        dmas = "txq0@%s;" \
+               "txq1@%s;" \
+               "txq2@%s;" \
+               "txq3@%s;" \
+               "txq4@%s;" \
+               "txq5@%s;" \
+               "txq6@%s;" \
+               "rxq2@%s;" \
+               "rxq3@%s;" \
+               "rxq4@%s;" \
+               "rxq5@%s;" \
+               "rxq6@%s;" \
+               "rxq7@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
         )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        vhost_param = "--nb-cores=2 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             param=vhost_param,
@@ -1139,51 +1121,34 @@ class TestVhostCbdma(TestCase):
         self.check_each_queue_of_port_packets(queues=8)
 
         self.vhost_user_pmd.quit()
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
-                self.cbdma_list[1],
-                self.vhost_core_list[2],
-                self.cbdma_list[2],
-                self.vhost_core_list[3],
-                self.cbdma_list[3],
-                self.vhost_core_list[3],
-                self.cbdma_list[4],
-                self.vhost_core_list[3],
-                self.cbdma_list[5],
-                self.vhost_core_list[3],
-                self.cbdma_list[6],
-                self.vhost_core_list[4],
-                self.cbdma_list[4],
-                self.vhost_core_list[4],
-                self.cbdma_list[5],
-                self.vhost_core_list[4],
-                self.cbdma_list[6],
-                self.vhost_core_list[4],
-                self.cbdma_list[7],
-            )
-        )
-        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]'"
-        vhost_param = (
-            "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
-        )
+        dmas = "txq0@%s;" \
+               "txq1@%s;" \
+               "txq2@%s;" \
+               "txq3@%s;" \
+               "txq4@%s;" \
+               "txq5@%s;" \
+               "txq6@%s;" \
+               "rxq2@%s;" \
+               "rxq3@%s;" \
+               "rxq4@%s;" \
+               "rxq5@%s;" \
+               "rxq6@%s;" \
+               "rxq7@%s" % (
+                   self.cbdma_list[0],
+                   self.cbdma_list[1],
+                   self.cbdma_list[2],
+                   self.cbdma_list[3],
+                   self.cbdma_list[4],
+                   self.cbdma_list[5],
+                   self.cbdma_list[6],
+                   self.cbdma_list[2],
+                   self.cbdma_list[3],
+                   self.cbdma_list[4],
+                   self.cbdma_list[5],
+                   self.cbdma_list[6],
+                   self.cbdma_list[7],
+               )
+        vhost_eal_param = "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             param=vhost_param,
@@ -1196,70 +1161,6 @@ class TestVhostCbdma(TestCase):
         self.send_imix_packets(mode=mode)
         self.check_each_queue_of_port_packets(queues=8)
 
-        self.virtio_user_pmd.quit()
-        virtio_param = "--nb-cores=4 --txq=8 --rxq=8 --txd=1024 --rxd=1024"
-        for key, path in PACKED_RING_PATH.items():
-            if key == "mergeable":
-                virtio_eal_param = (
-                    "--vdev 'net_virtio_user0,mac=%s,path=vhost-net0,%s,queues=8,server=1'"
-                    % (self.virtio_mac, path)
-                )
-                mode = key + "_VA_M:N_diff"
-                self.mode_list.append(mode)
-                self.start_virtio_testpmd(
-                    cores=self.virtio_core_list,
-                    param=virtio_param,
-                    eal_param=virtio_eal_param,
-                )
-                self.send_imix_packets(mode=mode)
-                self.check_each_queue_of_port_packets(queues=8)
-
-        self.vhost_user_pmd.quit()
-        lcore_dma = (
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
-            % (
-                self.vhost_core_list[1],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
-                self.cbdma_list[0],
-                self.vhost_core_list[3],
-                self.cbdma_list[1],
-                self.vhost_core_list[3],
-                self.cbdma_list[2],
-                self.vhost_core_list[4],
-                self.cbdma_list[1],
-                self.vhost_core_list[4],
-                self.cbdma_list[2],
-                self.vhost_core_list[5],
-                self.cbdma_list[1],
-                self.vhost_core_list[5],
-                self.cbdma_list[2],
-            )
-        )
-        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]'"
-        vhost_param = (
-            "--nb-cores=5 --txq=8 --rxq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
-        )
-        self.start_vhost_testpmd(
-            cores=self.vhost_core_list,
-            param=vhost_param,
-            eal_param=vhost_eal_param,
-            ports=allow_pci,
-            iova_mode="pa",
-        )
-        mode = "mergeable" + "_PA_M:N_diff"
-        self.mode_list.append(mode)
-        self.send_imix_packets(mode=mode)
-        self.check_each_queue_of_port_packets(queues=8)
-
         self.test_target = self.running_case
         self.expected_throughput = self.get_suite_cfg()["expected_throughput"][
             self.test_target
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-22  9:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22  8:59 [dts][PATCH V2 2/3] tests/vhost_cbdma: modify the dmas parameter by DPDK changed Wei Ling

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).