test suite reviews and discussions
 help / color / mirror / Atom feed
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/loopback_virtio_user_server_mode_cbdma: modify the dmas parameter by DPDK changed
Date: Tue, 22 Nov 2022 16:17:26 +0800	[thread overview]
Message-ID: <20221122081726.2896066-1-weix.ling@intel.com> (raw)

From DPDK-22.11, the dmas parameter have changed, so modify the dmas
parameter.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 ..._loopback_virtio_user_server_mode_cbdma.py | 883 ++++++++++++------
 1 file changed, 605 insertions(+), 278 deletions(-)

diff --git a/tests/TestSuite_loopback_virtio_user_server_mode_cbdma.py b/tests/TestSuite_loopback_virtio_user_server_mode_cbdma.py
index 81fae50c..731cce85 100644
--- a/tests/TestSuite_loopback_virtio_user_server_mode_cbdma.py
+++ b/tests/TestSuite_loopback_virtio_user_server_mode_cbdma.py
@@ -42,7 +42,7 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
         Run before each test case.
         """
         self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "#")
-        self.dut.send_expect("rm -rf ./vhost-net*", "#")
+        self.dut.send_expect("rm -rf /root/dpdk/vhost-net*", "#")
         self.table_header = [
             "Mode",
             "Pkt_size",
@@ -63,42 +63,62 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
         """
         start the testpmd of vhost-user, start to send 8k packets
         """
-        time.sleep(3)
-        self.vhost_user_pmd.execute_cmd("set fwd csum")
         self.vhost_user_pmd.execute_cmd("set txpkts 64,64,64,2000,2000,2000")
         self.vhost_user_pmd.execute_cmd("set burst 1")
         self.vhost_user_pmd.execute_cmd("start tx_first 1")
-        self.vhost_user_pmd.execute_cmd("stop")
 
     def send_960_packets_from_vhost(self):
         """
         start the testpmd of vhost-user, start to send 8k packets
         """
-        time.sleep(3)
-        self.vhost_user_pmd.execute_cmd("set fwd csum")
         self.vhost_user_pmd.execute_cmd("set txpkts 64,128,256,512")
         self.vhost_user_pmd.execute_cmd("set burst 1")
         self.vhost_user_pmd.execute_cmd("start tx_first 1")
-        self.vhost_user_pmd.execute_cmd("stop")
 
     def send_chain_packets_from_vhost(self):
-        time.sleep(3)
-        self.vhost_user_pmd.execute_cmd("set txpkts 65535,65535,65535,65535,65535")
+        self.vhost_user_pmd.execute_cmd("set txpkts 65535,65535")
         self.vhost_user_pmd.execute_cmd("start tx_first 32", timeout=30)
 
     def verify_virtio_user_receive_packets(self):
         results = 0.0
-        time.sleep(3)
-        for _ in range(10):
-            out = self.virtio_user_pmd.execute_cmd("show port stats all")
+        for _ in range(5):
+            out = self.virtio_user_pmd.execute_cmd("show port stats 0")
             lines = re.search("Rx-pps:\s*(\d*)", out)
             result = lines.group(1)
             results += float(result)
-        Mpps = results / (1000000 * 10)
+        Mpps = results / (1000000 * 5)
         self.logger.info(Mpps)
         self.verify(Mpps > 0, "virtio-user can not receive packets")
 
-    def launch_pdump_to_capture_pkt(self, capture_all_queue=True):
+    def check_each_queue_has_packets_info_on_virtio_user(
+        self, queues, check_rx=True, check_tx=True
+    ):
+        """
+        check each queue has receive packets on virtio-user0 side
+        """
+        out = self.virtio_user_pmd.execute_cmd("stop")
+        for queue_index in range(0, queues):
+            queue = re.search("Port= 0/Queue=\s*%d" % queue_index, out)
+            queue = queue.group()
+            index = out.find(queue)
+            if check_rx:
+                rx = re.search("RX-packets:\s*(\d*)", out[index:])
+                rx_packets = int(rx.group(1))
+            self.verify(
+                rx_packets > 0,
+                "The queue %d rx-packets is 0 about " % queue_index
+                + "rx-packets:%d" % rx_packets,
+            )
+            if check_tx:
+                tx = re.search("TX-packets:\s*(\d*)", out[index:])
+                tx_packets = int(tx.group(1))
+                self.verify(
+                    tx_packets > 0,
+                    "The queue %d tx-packets is 0 about " % queue_index
+                    + "tx-packets:%d" % tx_packets,
+                )
+
+    def launch_pdump_to_capture_pkt(self):
         command = (
             self.app_pdump
             + " "
@@ -110,24 +130,26 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             command % (self.dump_pcap_q0, self.dump_pcap_q1), "Port"
         )
 
-    def check_packet_payload_valid(self, pkt_len):
+    def check_packet_payload_valid(self, pkt_len, check_payload=True):
         self.pdump_session.send_expect("^c", "# ", 60)
         dump_file_list = [self.dump_pcap_q0, self.dump_pcap_q1]
         for pcap in dump_file_list:
-            self.dut.session.copy_file_from(src="%s" % pcap, dst="%s" % pcap)
             pkt = Packet()
-            pkts = pkt.read_pcapfile(pcap)
+            self.logger.info("Check capture file: %s payload " % pcap)
+            pkts = pkt.read_pcapfile(pcap, crb=self.dut)
             expect_data = str(pkts[0]["Raw"])
             for i in range(len(pkts)):
                 self.verify(
                     len(pkts[i]) == pkt_len,
-                    "virtio-user0 receive packet's length not equal %s Byte" % pkt_len,
-                )
-                check_data = str(pkts[i]["Raw"])
-                self.verify(
-                    check_data == expect_data,
-                    "the payload in receive packets has been changed from %s" % i,
+                    "virtio-user0 receive packet's length %s not equal %s Byte"
+                    % (len(pkts[i]), pkt_len),
                 )
+                if check_payload:
+                    check_data = str(pkts[i]["Raw"])
+                    self.verify(
+                        check_data == expect_data,
+                        "the payload in receive packets has been changed from %s" % i,
+                    )
 
     def start_vhost_testpmd(self, cores, eal_param, param, ports, iova_mode="va"):
         eal_param += " --iova=" + iova_mode
@@ -141,7 +163,12 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
         )
 
     def start_virtio_testpmd_with_vhost_net0(
-        self, cores, eal_param, param, set_fwd_csum=True
+        self,
+        cores,
+        eal_param,
+        param,
+        set_fwd_csum=True,
+        set_fwd_rxonly=False,
     ):
         """
         launch the testpmd as virtio with vhost_net0
@@ -158,6 +185,8 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
         )
         if set_fwd_csum:
             self.virtio_user_pmd.execute_cmd("set fwd csum")
+        if set_fwd_rxonly:
+            self.virtio_user_pmd.execute_cmd("set fwd rxonly")
         self.virtio_user_pmd.execute_cmd("start")
 
     @staticmethod
@@ -224,47 +253,45 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
         self.dut.close_session(self.vhost_user)
         self.dut.close_session(self.virtio_user)
 
-    def test_loopback_packed_ring_all_path_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+    def test_loopback_packed_ring_inorder_mergeable_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
         self,
     ):
         """
-        Test Case 1: Loopback packed ring all path multi-queues payload check with server mode and cbdma enable
+        Test Case 1: Loopback packed ring inorder mergeable path multi-queues payload check with server mode and cbdma enable
         """
-        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8)
-        vhost_eal_param = "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
-        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.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=1)
+        dmas = (
+            "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.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[2],
-                self.vhost_core_list[2],
-                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[4],
-                self.cbdma_list[6],
-                self.vhost_core_list[4],
-                self.cbdma_list[7],
+                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_param = (
-            " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
         )
-
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -272,18 +299,57 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
-
         virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,packed_vq=1,server=1"
         virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_virtio_testpmd_with_vhost_net0(
             cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
         )
-
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_6192_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=6192)
 
-        self.vhost_user_pmd.quit()
+    def test_loopback_packed_ring_mergeable_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+        self,
+    ):
+        """
+        Test Case 2: Loopback packed ring mergeable path multi-queues payload check with server mode and cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)
+        dmas = (
+            "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[0],
+                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],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+            )
+        )
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        )
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -291,21 +357,57 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
-        self.launch_pdump_to_capture_pkt()
-        self.send_6192_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=6192)
-
-        self.virtio_user_pmd.quit()
         virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=0,packed_vq=1,server=1"
         virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_virtio_testpmd_with_vhost_net0(
             cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
         )
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_6192_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=6192)
 
-        self.vhost_user_pmd.quit()
+    def test_loopback_packed_ring_inorder_non_mergeable_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+        self,
+    ):
+        """
+        Test Case 3: Loopback packed ring inorder non-mergeable path multi-queues payload check with server mode and cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4)
+        dmas = (
+            "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[0],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+                self.cbdma_list[2],
+                self.cbdma_list[2],
+                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 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        )
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -313,21 +415,57 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
-        self.launch_pdump_to_capture_pkt()
-        self.send_6192_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=6192)
-
-        self.virtio_user_pmd.quit()
-        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,packed_vq=1,server=1"
+        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,server=1"
         virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_virtio_testpmd_with_vhost_net0(
             cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
         )
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_960_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=960)
 
-        self.vhost_user_pmd.quit()
+    def test_loopback_packed_ring_non_mergeable_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+        self,
+    ):
+        """
+        Test Case 4: Loopback packed ring non-mergeable path multi-queues payload check with server mode and cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8)
+        dmas = (
+            "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],
+            )
+        )
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        )
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -335,21 +473,57 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
-        self.launch_pdump_to_capture_pkt()
-        self.send_960_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=960)
-
-        self.virtio_user_pmd.quit()
-        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,server=1"
+        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,packed_vq=1,server=1"
         virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_virtio_testpmd_with_vhost_net0(
             cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
         )
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_960_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=960)
 
-        self.vhost_user_pmd.quit()
+    def test_loopback_packed_ring_vectorized_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+        self,
+    ):
+        """
+        Test Case 5: Loopback packed ring vectorized path multi-queues payload check with server mode and cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)
+        dmas = (
+            "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[0],
+                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],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+            )
+        )
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        )
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -357,21 +531,57 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
-        self.launch_pdump_to_capture_pkt()
-        self.send_960_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=960)
-
-        self.virtio_user_pmd.quit()
-        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,vectorized=1,server=1"
+        virtio_eal_param = "--force-max-simd-bitwidth=512 --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,vectorized=1,server=1"
         virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_virtio_testpmd_with_vhost_net0(
             cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
         )
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_960_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=960)
 
-        self.vhost_user_pmd.quit()
+    def test_loopback_packed_ring_vectorized_not_power_of_2_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+        self,
+    ):
+        """
+        Test Case 6: Loopback packed ring vectorized path and ring size is not power of 2 multi-queues payload check with server mode and cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)
+        dmas = (
+            "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[0],
+                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],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+            )
+        )
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        )
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -379,102 +589,57 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
-        self.launch_pdump_to_capture_pkt()
-        self.send_960_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=960)
-
-        self.virtio_user_pmd.quit()
-        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,vectorized=1,queue_size=1025,server=1"
+        virtio_eal_param = "--force-max-simd-bitwidth=512 --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,packed_vq=1,vectorized=1,queue_size=1025,server=1"
         virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1025 --rxd=1025"
         self.start_virtio_testpmd_with_vhost_net0(
             cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
         )
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_960_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=960)
 
-        self.vhost_user_pmd.quit()
-        self.start_vhost_testpmd(
-            cores=self.vhost_core_list,
-            eal_param=vhost_eal_param,
-            param=vhost_param,
-            ports=self.cbdma_list,
-            iova_mode="va",
-        )
-        self.launch_pdump_to_capture_pkt()
-        self.send_960_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=960)
-
-        if not self.check_2M_env:
-            self.virtio_user_pmd.quit()
-            self.vhost_user_pmd.quit()
-            vhost_eal_param = "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq6;txq7;rxq0;rxq1;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
-            vhost_param = (
-                " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-                % lcore_dma
-            )
-            self.start_vhost_testpmd(
-                cores=self.vhost_core_list,
-                eal_param=vhost_eal_param,
-                param=vhost_param,
-                ports=self.cbdma_list,
-                iova_mode="pa",
-            )
-
-            virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,packed_vq=1,server=1"
-            virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
-            self.logger.info("Launch virtio with packed ring mergeable inorder path")
-            self.start_virtio_testpmd_with_vhost_net0(
-                cores=self.virtio0_core_list,
-                eal_param=virtio_eal_param,
-                param=virtio_param,
-            )
-
-            self.launch_pdump_to_capture_pkt()
-            self.send_6192_packets_from_vhost()
-            self.check_packet_payload_valid(pkt_len=6192)
-
-    def test_loopback_split_ring_all_path_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+    def test_loopback_split_ring_inorder_mergeable_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
         self,
     ):
         """
-        Test Case 2: Loopback split ring all path multi-queues payload check with server mode and cbdma enable
-        """
-        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=3)
-        vhost_eal_param = "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
-        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"
+        Test Case 7: Loopback split ring inorder mergeable path multi-queues payload check with server mode and cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=1)
+        dmas = (
+            "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.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],
+                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_param = (
-            " --nb-cores=5 --rxq=8 --txq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-            % lcore_dma
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
         )
-
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -482,18 +647,57 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
-
         virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,server=1"
-        virtio_param = " --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
+        virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_virtio_testpmd_with_vhost_net0(
             cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
         )
-
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_6192_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=6192)
 
-        self.vhost_user_pmd.quit()
+    def test_loopback_split_ring_mergeable_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+        self,
+    ):
+        """
+        Test Case 8: Loopback split ring mergeable path multi-queues payload check with server mode and cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)
+        dmas = (
+            "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[0],
+                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],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+            )
+        )
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        )
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -501,45 +705,57 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
-        self.launch_pdump_to_capture_pkt()
-        self.send_6192_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=6192)
-
-        self.virtio_user_pmd.quit()
         virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=0,server=1"
-        virtio_param = " --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
+        virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_virtio_testpmd_with_vhost_net0(
             cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
         )
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_6192_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=6192)
 
-        self.vhost_user_pmd.quit()
-        self.start_vhost_testpmd(
-            cores=self.vhost_core_list,
-            eal_param=vhost_eal_param,
-            param=vhost_param,
-            ports=self.cbdma_list,
-            iova_mode="va",
-        )
-        self.launch_pdump_to_capture_pkt()
-        self.send_6192_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=6192)
-
-        self.virtio_user_pmd.quit()
-        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,server=1"
-        virtio_param = (
-            "--enable-hw-vlan-strip --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
+    def test_loopback_split_ring_inorder_non_mergeable_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+        self,
+    ):
+        """
+        Test Case 9: Loopback split ring inorder non-mergeable path multi-queues payload check with server mode and cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4)
+        dmas = (
+            "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[0],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+                self.cbdma_list[2],
+                self.cbdma_list[2],
+                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.start_virtio_testpmd_with_vhost_net0(
-            cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
         )
-        self.launch_pdump_to_capture_pkt()
-        self.send_960_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=960)
-
-        self.vhost_user_pmd.quit()
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -547,21 +763,57 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
-        self.launch_pdump_to_capture_pkt()
-        self.send_960_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=960)
-
-        self.virtio_user_pmd.quit()
         virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,server=1"
-        virtio_param = " --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
+        virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_virtio_testpmd_with_vhost_net0(
             cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
         )
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_960_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=960)
 
-        self.vhost_user_pmd.quit()
+    def test_loopback_split_ring_non_mergeable_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+        self,
+    ):
+        """
+        Test Case 10: Loopback split ring non-mergeable path multi-queues payload check with server mode and cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)
+        dmas = (
+            "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[0],
+                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],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+            )
+        )
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        )
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -569,21 +821,57 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
-        self.launch_pdump_to_capture_pkt()
-        self.send_960_packets_from_vhost()
-        self.check_packet_payload_valid(pkt_len=960)
-
-        self.virtio_user_pmd.quit()
-        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,vectorized=1,server=1"
-        virtio_param = " --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
+        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,server=1"
+        virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_virtio_testpmd_with_vhost_net0(
             cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
         )
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_960_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=960)
 
-        self.vhost_user_pmd.quit()
+    def test_loopback_split_ring_vectorized_multi_queues_payload_check_with_server_mode_and_cbdma_enable(
+        self,
+    ):
+        """
+        Test Case 11: Loopback split ring vectorized path multi-queues payload check with server mode and cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)
+        dmas = (
+            "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[0],
+                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],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+            )
+        )
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        )
+        vhost_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
         self.start_vhost_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -591,51 +879,35 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
             ports=self.cbdma_list,
             iova_mode="va",
         )
+        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=1,vectorized=1,server=1"
+        virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
+        self.start_virtio_testpmd_with_vhost_net0(
+            cores=self.virtio0_core_list, eal_param=virtio_eal_param, param=virtio_param
+        )
         self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd mac")
         self.send_960_packets_from_vhost()
+        self.vhost_user_pmd.execute_cmd("show port stats all")
+        self.vhost_user_pmd.execute_cmd("stop")
         self.check_packet_payload_valid(pkt_len=960)
 
-        if not self.check_2M_env:
-            self.virtio_user_pmd.quit()
-            self.vhost_user_pmd.quit()
-            vhost_eal_param = "--vdev 'eth_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 --rxq=8 --txq=8 --txd=1024 --rxd=1024 --lcore-dma=[%s]"
-                % lcore_dma
-            )
-            self.start_vhost_testpmd(
-                cores=self.vhost_core_list,
-                eal_param=vhost_eal_param,
-                param=vhost_param,
-                ports=self.cbdma_list,
-                iova_mode="pa",
-            )
-
-            virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,server=1"
-            virtio_param = " --nb-cores=4 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
-            self.logger.info("Launch virtio with packed ring mergeable inorder path")
-            self.start_virtio_testpmd_with_vhost_net0(
-                cores=self.virtio0_core_list,
-                eal_param=virtio_eal_param,
-                param=virtio_param,
-            )
-
-            self.launch_pdump_to_capture_pkt()
-            self.send_6192_packets_from_vhost()
-            self.check_packet_payload_valid(pkt_len=6192)
-
-    def test_loopback_split_ring_large_chain_packets_stress_test_with_server_mode_and_cbdma_enable(
+    def test_loopback_split_ring_large_chain_packets_stress_test_with_server_moede_and_cbdma_enable(
         self,
     ):
         """
-        Test Case 3: Loopback split ring large chain packets stress test with server mode and cbdma enable
+        Test Case 12: Loopback split ring large chain packets stress test with server mode and cbdma enable
         """
         if not self.check_2M_env:
             self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=1)
-            vhost_eal_param = "--vdev 'eth_vhost0,iface=vhost-net0,queues=1,client=1,dmas=[txq0;rxq0]'"
-            lcore_dma = "lcore%s@%s" % (self.vhost_core_list[1], self.cbdma_list[0])
-
-            vhost_param = " --nb-cores=1 --mbuf-size=65535 --lcore-dma=[%s]" % lcore_dma
+            dmas = "txq0@%s;" "rxq0@%s" % (
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+            )
+            vhost_eal_param = (
+                "--vdev 'eth_vhost0,iface=vhost-net0,queues=1,client=1,dmas=[%s]'"
+                % dmas
+            )
+            vhost_param = "--nb-cores=1 --mbuf-size=65535"
             self.start_vhost_testpmd(
                 cores=self.vhost_core_list,
                 eal_param=vhost_eal_param,
@@ -643,7 +915,6 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
                 ports=self.cbdma_list,
                 iova_mode="va",
             )
-
             virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=1,server=1,mrg_rxbuf=1,in_order=0,vectorized=1,queue_size=2048"
             virtio_param = " --nb-cores=1 --rxq=1 --txq=1 --txd=2048 --rxd=2048"
             self.start_virtio_testpmd_with_vhost_net0(
@@ -652,33 +923,26 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
                 param=virtio_param,
                 set_fwd_csum=False,
             )
-
             self.send_chain_packets_from_vhost()
             self.verify_virtio_user_receive_packets()
 
-            self.vhost_user_pmd.quit()
-            self.start_vhost_testpmd(
-                cores=self.vhost_core_list,
-                eal_param=vhost_eal_param,
-                param=vhost_param,
-                ports=self.cbdma_list,
-                iova_mode="pa",
-            )
-            self.send_chain_packets_from_vhost()
-            self.verify_virtio_user_receive_packets()
-
-    def test_loopback_packed_ring_large_chain_packets_stress_test_with_server_mode_and_cbdma_enable(
+    def test_loopback_packed_ring_large_chain_packets_stress_test_with_server_moede_and_cbdma_enable(
         self,
     ):
         """
-        Test Case 4: Loopback packed ring large chain packets stress test with server mode and cbdma enable
+        Test Case 13: Loopback packed ring large chain packets stress test with server mode and cbdma enable
         """
         if not self.check_2M_env:
             self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=1)
-            vhost_eal_param = "--vdev 'eth_vhost0,iface=vhost-net0,queues=1,client=1,dmas=[txq0;rxq0]'"
-            lcore_dma = "lcore%s@%s" % (self.vhost_core_list[1], self.cbdma_list[0])
-
-            vhost_param = " --nb-cores=1 --mbuf-size=65535 --lcore-dma=[%s]" % lcore_dma
+            dmas = "txq0@%s;" "rxq0@%s" % (
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+            )
+            vhost_eal_param = (
+                "--vdev 'eth_vhost0,iface=vhost-net0,queues=1,client=1,dmas=[%s]'"
+                % dmas
+            )
+            vhost_param = "--nb-cores=1 --mbuf-size=65535"
             self.start_vhost_testpmd(
                 cores=self.vhost_core_list,
                 eal_param=vhost_eal_param,
@@ -686,7 +950,6 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
                 ports=self.cbdma_list,
                 iova_mode="va",
             )
-
             virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=1,server=1,mrg_rxbuf=1,in_order=0,vectorized=1,packed_vq=1,queue_size=2048"
             virtio_param = " --nb-cores=1 --rxq=1 --txq=1 --txd=2048 --rxd=2048"
             self.start_virtio_testpmd_with_vhost_net0(
@@ -695,20 +958,84 @@ class TestLoopbackVirtioUserServerModeCbama(TestCase):
                 param=virtio_param,
                 set_fwd_csum=False,
             )
-
             self.send_chain_packets_from_vhost()
             self.verify_virtio_user_receive_packets()
 
-            self.vhost_user_pmd.quit()
-            self.start_vhost_testpmd(
-                cores=self.vhost_core_list,
-                eal_param=vhost_eal_param,
-                param=vhost_param,
-                ports=self.cbdma_list,
-                iova_mode="pa",
+    def test_pv_split_and_packed_test_txonly_mode_with_cbdma_enable(self):
+        """
+        Test Case 14: PV split and packed ring test txonly mode with cbdma enable
+        """
+        self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)
+        dmas = (
+            "txq0@%s;"
+            "txq1@%s;"
+            "txq2@%s;"
+            "txq3@%s;"
+            "txq4@%s;"
+            "txq5@%s;"
+            "txq6@%s;"
+            "txq7@%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.send_chain_packets_from_vhost()
-            self.verify_virtio_user_receive_packets()
+        )
+        vhost_eal_param = (
+            "--vdev 'eth_vhost0,iface=vhost-net0,queues=8,client=1,dmas=[%s]'" % dmas
+        )
+        vhost_param = " --nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
+        self.start_vhost_testpmd(
+            cores=self.vhost_core_list,
+            eal_param=vhost_eal_param,
+            param=vhost_param,
+            ports=self.cbdma_list,
+            iova_mode="va",
+        )
+        virtio_eal_param = "--vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=1,in_order=1,server=1"
+        virtio_param = "--nb-cores=1 --rxq=8 --txq=8 --txd=1024 --rxd=1024"
+        self.start_virtio_testpmd_with_vhost_net0(
+            cores=self.virtio0_core_list,
+            eal_param=virtio_eal_param,
+            param=virtio_param,
+            set_fwd_csum=False,
+            set_fwd_rxonly=True,
+        )
+        self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd txonly")
+        self.vhost_user_pmd.execute_cmd("async_vhost tx poll completed on")
+        self.send_6192_packets_from_vhost()
+        self.verify_virtio_user_receive_packets()
+        self.check_each_queue_has_packets_info_on_virtio_user(
+            queues=8, check_rx=True, check_tx=False
+        )
+        self.check_packet_payload_valid(pkt_len=6192, check_payload=False)
+
+        self.vhost_user_pmd.execute_cmd("stop")
+        self.virtio_user_pmd.quit()
+        virtio_eal_param = "--force-max-simd-bitwidth=512 --vdev=net_virtio_user0,mac=00:11:22:33:44:10,path=./vhost-net0,queues=8,mrg_rxbuf=0,in_order=0,vectorized=1,packed_vq=1,server=1,queue_size=1025"
+        virtio_param = "--nb-cores=1 --rxq=8 --txq=8 --txd=1025 --rxd=1025"
+        self.start_virtio_testpmd_with_vhost_net0(
+            cores=self.virtio0_core_list,
+            eal_param=virtio_eal_param,
+            param=virtio_param,
+            set_fwd_csum=False,
+            set_fwd_rxonly=True,
+        )
+        self.launch_pdump_to_capture_pkt()
+        self.vhost_user_pmd.execute_cmd("set fwd txonly")
+        self.vhost_user_pmd.execute_cmd("async_vhost tx poll completed on")
+        self.send_960_packets_from_vhost()
+        self.verify_virtio_user_receive_packets()
+        self.check_each_queue_has_packets_info_on_virtio_user(
+            queues=8, check_rx=True, check_tx=False
+        )
+        self.check_packet_payload_valid(pkt_len=960, check_payload=False)
 
     def tear_down(self):
         """
-- 
2.25.1


                 reply	other threads:[~2022-11-22  8:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221122081726.2896066-1-weix.ling@intel.com \
    --to=weix.ling@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).