diff mbox series

[V2,2/2] tests/vm2vm_virtio_pmd_cbdma: modify the dmas parameter by DPDK changed

Message ID 20221122082604.2896586-1-weix.ling@intel.com (mailing list archive)
State Superseded
Headers show
Series modify the dmas parameter by DPDK changed | expand

Checks

Context Check Description
ci/Intel-dts-format-test success Testing OK
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-doc-test success Testing OK
ci/Intel-dts-suite-test warning SKIPPED

Commit Message

Wei Ling Nov. 22, 2022, 8:26 a.m. UTC
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_vm2vm_virtio_pmd_cbdma.py | 373 +++++++++-------------
 1 file changed, 145 insertions(+), 228 deletions(-)
diff mbox series

Patch

diff --git a/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py b/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py
index b00d7b04..578c7ea4 100644
--- a/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py
+++ b/tests/TestSuite_vm2vm_virtio_pmd_cbdma.py
@@ -99,6 +99,7 @@  class TestVM2VMVirtioPmdCBDMA(TestCase):
         self.vhost_user_pmd.start_testpmd(
             cores=cores, ports=ports, prefix=prefix, eal_param=eal_param, param=param
         )
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.vhost_user_pmd.execute_cmd("start")
 
     def start_vms(
@@ -228,69 +229,46 @@  class TestVM2VMVirtioPmdCBDMA(TestCase):
         """
         self.check_path = ["virtio_dev_rx_async", "virtio_dev_tx_async"]
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, allow_diff_socket=True)
-        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,"
-            "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],
-                self.vhost_core_list[3],
-                self.cbdma_list[8],
-                self.vhost_core_list[3],
-                self.cbdma_list[9],
-                self.vhost_core_list[3],
-                self.cbdma_list[10],
-                self.vhost_core_list[3],
-                self.cbdma_list[11],
-                self.vhost_core_list[4],
-                self.cbdma_list[12],
-                self.vhost_core_list[4],
-                self.cbdma_list[13],
-                self.vhost_core_list[4],
-                self.cbdma_list[14],
-                self.vhost_core_list[4],
-                self.cbdma_list[15],
-            )
-        )
-        eal_param = (
+
+        """eal_param = (
             "--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;rxq0;rxq1;rxq2;rxq3]'"
             + " --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;rxq0;rxq1;rxq2;rxq3]'"
         )
         param = (
             "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4"
             + " --lcore-dma=[%s]" % lcore_dma
+        )"""
+
+        dmas1 = "txq0@%s;txq1@%s;txq2@%s;txq3@%s;rxq0@%s;rxq1@%s;rxq2@%s;rxq3@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
         )
+        dmas2 = "txq0@%s;txq1@%s;txq2@%s;txq3@%s;rxq0@%s;rxq1@%s;rxq2@%s;rxq3@%s" % (
+            self.cbdma_list[2],
+            self.cbdma_list[2],
+            self.cbdma_list[3],
+            self.cbdma_list[3],
+            self.cbdma_list[2],
+            self.cbdma_list[2],
+            self.cbdma_list[3],
+            self.cbdma_list[3],
+        )
+        eal_param = (
+            "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]' "
+            "--vdev 'net_vhost1,iface=vhost-net1,queues=8,client=1,dmas=[%s]'"
+            % (dmas1, dmas2)
+        )
+        param = " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4"
+
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
-            ports=self.cbdma_list,
+            ports=self.cbdma_list[0:4],
             prefix="vhost",
             eal_param=eal_param,
             param=param,
@@ -316,14 +294,55 @@  class TestVM2VMVirtioPmdCBDMA(TestCase):
         for _ in range(5):
             self.logger.info("Quit and relaunch vhost side testpmd")
             self.vhost_user_pmd.quit()
-            eal_param = (
+            """eal_param = (
                 "--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
                 + " --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
             )
             param = (
                 "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8"
                 + " --lcore-dma=[%s]" % lcore_dma
+            )"""
+
+            dmas1 = (
+                "txq0@%s;txq1@%s;txq2@%s;txq3@%s;txq4@%s;txq5@%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[2],
+                    self.cbdma_list[3],
+                    self.cbdma_list[4],
+                    self.cbdma_list[5],
+                    self.cbdma_list[6],
+                    self.cbdma_list[7],
+                )
+            )
+            dmas2 = (
+                "txq0@%s;txq1@%s;txq2@%s;txq3@%s;txq4@%s;txq5@%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[2],
+                    self.cbdma_list[3],
+                    self.cbdma_list[4],
+                    self.cbdma_list[5],
+                    self.cbdma_list[6],
+                    self.cbdma_list[7],
+                )
             )
+            eal_param = (
+                "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]' "
+                "--vdev 'net_vhost1,iface=vhost-net1,queues=8,client=1,dmas=[%s]'"
+                % (dmas1, dmas2)
+            )
+            param = " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8"
             self.start_vhost_testpmd(
                 cores=self.vhost_core_list,
                 ports=self.cbdma_list,
@@ -344,69 +363,35 @@  class TestVM2VMVirtioPmdCBDMA(TestCase):
         """
         self.check_path = ["virtio_dev_rx_async", "virtio_dev_tx_async"]
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, allow_diff_socket=True)
-        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,"
-            "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],
-                self.vhost_core_list[3],
-                self.cbdma_list[8],
-                self.vhost_core_list[3],
-                self.cbdma_list[9],
-                self.vhost_core_list[3],
-                self.cbdma_list[10],
-                self.vhost_core_list[3],
-                self.cbdma_list[11],
-                self.vhost_core_list[4],
-                self.cbdma_list[12],
-                self.vhost_core_list[4],
-                self.cbdma_list[13],
-                self.vhost_core_list[4],
-                self.cbdma_list[14],
-                self.vhost_core_list[4],
-                self.cbdma_list[15],
-            )
+        dmas1 = "txq0@%s;txq1@%s;txq2@%s;txq3@%s;rxq0@%s;rxq1@%s;rxq2@%s;rxq3@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
         )
-        eal_param = (
-            "--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;rxq0;rxq1;rxq2;rxq3]'"
-            + " --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;rxq0;rxq1;rxq2;rxq3]'"
+        dmas2 = "txq0@%s;txq1@%s;txq2@%s;txq3@%s;rxq0@%s;rxq1@%s;rxq2@%s;rxq3@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
         )
-        param = (
-            "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4"
-            + " --lcore-dma=[%s]" % lcore_dma
+        eal_param = (
+            "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]' "
+            "--vdev 'net_vhost1,iface=vhost-net1,queues=8,client=1,dmas=[%s]'"
+            % (dmas1, dmas2)
         )
+        param = " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
-            ports=self.cbdma_list,
+            ports=self.cbdma_list[0:4],
             prefix="vhost",
             eal_param=eal_param,
             param=param,
@@ -437,66 +422,32 @@  class TestVM2VMVirtioPmdCBDMA(TestCase):
         """
         self.check_path = ["virtio_dev_rx_async", "virtio_dev_tx_async"]
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, allow_diff_socket=True)
-        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,"
-            "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],
-                self.vhost_core_list[3],
-                self.cbdma_list[8],
-                self.vhost_core_list[3],
-                self.cbdma_list[9],
-                self.vhost_core_list[3],
-                self.cbdma_list[10],
-                self.vhost_core_list[3],
-                self.cbdma_list[11],
-                self.vhost_core_list[4],
-                self.cbdma_list[12],
-                self.vhost_core_list[4],
-                self.cbdma_list[13],
-                self.vhost_core_list[4],
-                self.cbdma_list[14],
-                self.vhost_core_list[4],
-                self.cbdma_list[15],
-            )
+        dmas1 = "txq0@%s;txq1@%s;txq2@%s;txq3@%s;rxq0@%s;rxq1@%s;rxq2@%s;rxq3@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
         )
-        eal_param = (
-            "--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;rxq0;rxq1;rxq2;rxq3]'"
-            + " --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;rxq0;rxq1;rxq2;rxq3]'"
+        dmas2 = "txq0@%s;txq1@%s;txq2@%s;txq3@%s;rxq0@%s;rxq1@%s;rxq2@%s;rxq3@%s" % (
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
+            self.cbdma_list[0],
+            self.cbdma_list[0],
+            self.cbdma_list[1],
+            self.cbdma_list[1],
         )
-        param = (
-            "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4"
-            + " --lcore-dma=[%s]" % lcore_dma
+        eal_param = (
+            "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]' "
+            "--vdev 'net_vhost1,iface=vhost-net1,queues=8,client=1,dmas=[%s]'"
+            % (dmas1, dmas2)
         )
+        param = " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             ports=self.cbdma_list,
@@ -545,69 +496,35 @@  class TestVM2VMVirtioPmdCBDMA(TestCase):
         """
         self.check_path = ["virtio_dev_rx_async", "virtio_dev_tx_async"]
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=16, allow_diff_socket=True)
-        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,"
-            "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],
-                self.vhost_core_list[3],
-                self.cbdma_list[8],
-                self.vhost_core_list[3],
-                self.cbdma_list[9],
-                self.vhost_core_list[3],
-                self.cbdma_list[10],
-                self.vhost_core_list[3],
-                self.cbdma_list[11],
-                self.vhost_core_list[4],
-                self.cbdma_list[12],
-                self.vhost_core_list[4],
-                self.cbdma_list[13],
-                self.vhost_core_list[4],
-                self.cbdma_list[14],
-                self.vhost_core_list[4],
-                self.cbdma_list[15],
-            )
+        dmas1 = "txq0@%s;txq1@%s;txq2@%s;txq3@%s;rxq0@%s;rxq1@%s;rxq2@%s;rxq3@%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[7],
         )
-        eal_param = (
-            "--vdev 'net_vhost0,iface=vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
-            + " --vdev 'net_vhost1,iface=vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
+        dmas2 = "txq0@%s;txq1@%s;txq2@%s;txq3@%s;rxq0@%s;rxq1@%s;rxq2@%s;rxq3@%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[7],
         )
-        param = (
-            "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8"
-            + " --lcore-dma=[%s]" % lcore_dma
+        eal_param = (
+            "--vdev 'net_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]' "
+            "--vdev 'net_vhost1,iface=vhost-net1,queues=8,client=1,dmas=[%s]'"
+            % (dmas1, dmas2)
         )
+        param = " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
-            ports=self.cbdma_list,
+            ports=self.cbdma_list[0:8],
             prefix="vhost",
             eal_param=eal_param,
             param=param,