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

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

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_basic_4k_pages_cbdma.py | 617 ++++++++++--------------
 1 file changed, 253 insertions(+), 364 deletions(-)

diff --git a/tests/TestSuite_basic_4k_pages_cbdma.py b/tests/TestSuite_basic_4k_pages_cbdma.py
index 2c316a4f..e183f66f 100644
--- a/tests/TestSuite_basic_4k_pages_cbdma.py
+++ b/tests/TestSuite_basic_4k_pages_cbdma.py
@@ -111,8 +111,7 @@ class TestBasic4kPagesCbdma(TestCase):
         """
         self.dut.send_expect("killall -s INT %s" % self.testpmd_name, "# ")
         self.dut.send_expect("killall -s INT qemu-system-x86_64", "#")
-        self.dut.send_expect("rm -rf /tmp/vhost-net*", "# ")
-        self.umount_tmpfs_for_4k()
+        self.dut.send_expect("rm -rf /root/dpdk/vhost-net*", "# ")
         # Prepare the result table
         self.table_header = ["Frame"]
         self.table_header.append("Mode")
@@ -379,7 +378,7 @@ class TestBasic4kPagesCbdma(TestCase):
 
     def check_ping_between_vms(self):
         ping_out = self.vm0_dut.send_expect(
-            "ping {} -c 4".format(self.virtio_ip2), "#", 20
+            "ping {} -c 4".format(self.virtio_ip2), "#", 60
         )
         self.logger.info(ping_out)
 
@@ -497,12 +496,12 @@ class TestBasic4kPagesCbdma(TestCase):
         Test Case 1: Basic test vhost-user/virtio-user split ring vhost async operation using 4K-pages and cbdma enable
         """
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=1)
-        lcore_dma = "lcore%s@%s," % (self.vhost_core_list[1], self.cbdma_list[0])
-        vhost_eal_param = "--no-huge -m 1024 --vdev 'net_vhost0,iface=./vhost-net,queues=1,dmas=[txq0;rxq0]'"
-        vhost_param = " --no-numa --socket-num=%s --lcore-dma=[%s]" % (
-            self.ports_socket,
-            lcore_dma,
+        dmas = "txq0@%s;rxq0@%s" % (self.cbdma_list[0], self.cbdma_list[0])
+        vhost_eal_param = (
+            "--no-huge -m 1024 --vdev 'net_vhost0,iface=./vhost-net,queues=1,dmas=[%s]'"
+            % dmas
         )
+        vhost_param = "--no-numa --socket-num=%s " % self.ports_socket
         ports = [self.dut.ports_info[0]["pci"]]
         for i in self.cbdma_list:
             ports.append(i)
@@ -529,12 +528,12 @@ class TestBasic4kPagesCbdma(TestCase):
         Test Case 2: Basic test vhost-user/virtio-user packed ring vhost async operation using 4K-pages and cbdma enable
         """
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=1)
-        lcore_dma = "lcore%s@%s," % (self.vhost_core_list[1], self.cbdma_list[0])
-        vhost_eal_param = "--no-huge -m 1024 --vdev 'net_vhost0,iface=./vhost-net,queues=1,dmas=[txq0;rxq0]'"
-        vhost_param = " --no-numa --socket-num=%s --lcore-dma=[%s]" % (
-            self.ports_socket,
-            lcore_dma,
+        dmas = "txq0@%s;rxq0@%s" % (self.cbdma_list[0], self.cbdma_list[0])
+        vhost_eal_param = (
+            "--no-huge -m 1024 --vdev 'net_vhost0,iface=./vhost-net,queues=1,dmas=[%s]'"
+            % dmas
         )
+        vhost_param = "--no-numa --socket-num=%s " % self.ports_socket
         ports = [self.dut.ports_info[0]["pci"]]
         for i in self.cbdma_list:
             ports.append(i)
@@ -561,18 +560,16 @@ class TestBasic4kPagesCbdma(TestCase):
         Test Case 3: VM2VM vhost-user/virtio-net split ring vhost async operation test with tcp traffic using 4K-pages and cbdma enable
         """
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)
-        lcore_dma = "lcore%s@%s," "lcore%s@%s" % (
-            self.vhost_core_list[1],
-            self.cbdma_list[0],
-            self.vhost_core_list[2],
-            self.cbdma_list[1],
-        )
+        dmas1 = "txq0@%s;rxq0@%s" % (self.cbdma_list[0], self.cbdma_list[0])
+        dmas2 = "txq0@%s;rxq0@%s" % (self.cbdma_list[1], self.cbdma_list[1])
         vhost_eal_param = (
             "--no-huge -m 1024 "
-            + "--vdev 'net_vhost0,iface=./vhost-net0,queues=1,tso=1,dmas=[txq0;rxq0]'"
-            + " --vdev 'net_vhost1,iface=./vhost-net1,queues=1,tso=1,dmas=[txq0;rxq0]'"
+            + "--vdev 'net_vhost0,iface=./vhost-net0,queues=1,tso=1,dmas=[%s],dma-ring-size=2048'"
+            % dmas1
+            + " --vdev 'net_vhost1,iface=./vhost-net1,queues=1,tso=1,dmas=[%s],dma-ring-size=2048'"
+            % dmas2
         )
-        vhost_param = " --nb-cores=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]" % lcore_dma
+        vhost_param = "--nb-cores=2 --txd=1024 --rxd=1024"
         self.start_vhost_user_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -599,18 +596,16 @@ class TestBasic4kPagesCbdma(TestCase):
         Test Case 4: VM2VM vhost-user/virtio-net packed ring vhost async operation test with tcp traffic using 4K-pages and cbdma enable
         """
         self.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2)
-        lcore_dma = "lcore%s@%s," "lcore%s@%s" % (
-            self.vhost_core_list[1],
-            self.cbdma_list[0],
-            self.vhost_core_list[2],
-            self.cbdma_list[1],
-        )
+        dmas1 = "txq0@%s;rxq0@%s" % (self.cbdma_list[0], self.cbdma_list[0])
+        dmas2 = "txq0@%s;rxq0@%s" % (self.cbdma_list[1], self.cbdma_list[1])
         vhost_eal_param = (
             "--no-huge -m 1024 "
-            + "--vdev 'net_vhost0,iface=./vhost-net0,queues=1,tso=1,dmas=[txq0;rxq0]'"
-            + " --vdev 'net_vhost1,iface=./vhost-net1,queues=1,tso=1,dmas=[txq0;rxq0]'"
+            + "--vdev 'net_vhost0,iface=./vhost-net0,queues=1,tso=1,dmas=[%s],dma-ring-size=2048'"
+            % dmas1
+            + " --vdev 'net_vhost1,iface=./vhost-net1,queues=1,tso=1,dmas=[%s],dma-ring-size=2048'"
+            % dmas2
         )
-        vhost_param = " --nb-cores=2 --txd=1024 --rxd=1024 --lcore-dma=[%s]" % lcore_dma
+        vhost_param = "--nb-cores=2 --txd=1024 --rxd=1024"
         self.start_vhost_user_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -634,68 +629,55 @@ class TestBasic4kPagesCbdma(TestCase):
         """
         Test Case 5: vm2vm vhost/virtio-net split ring multi queues using 4K-pages and cbdma enable
         """
-        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.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4, allow_diff_socket=True)
+        dmas1 = (
+            "txq0@%s;"
+            "txq1@%s;"
+            "txq2@%s;"
+            "txq3@%s;"
+            "txq4@%s;"
+            "txq5@%s;"
+            "txq6@%s;"
+            "txq7@%s"
             % (
-                self.vhost_core_list[1],
                 self.cbdma_list[0],
-                self.vhost_core_list[1],
+                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.vhost_core_list[1],
+            )
+        )
+        dmas2 = (
+            "txq0@%s;"
+            "txq1@%s;"
+            "txq2@%s;"
+            "txq3@%s;"
+            "txq4@%s;"
+            "txq5@%s;"
+            "txq6@%s;"
+            "txq7@%s"
+            % (
+                self.cbdma_list[2],
+                self.cbdma_list[2],
+                self.cbdma_list[2],
                 self.cbdma_list[2],
-                self.vhost_core_list[1],
                 self.cbdma_list[3],
-                self.vhost_core_list[1],
-                self.cbdma_list[4],
-                self.vhost_core_list[1],
-                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[3],
-                self.cbdma_list[12],
-                self.vhost_core_list[3],
-                self.cbdma_list[13],
-                self.vhost_core_list[3],
-                self.cbdma_list[14],
-                self.vhost_core_list[3],
-                self.cbdma_list[15],
+                self.cbdma_list[3],
+                self.cbdma_list[3],
+                self.cbdma_list[3],
             )
         )
         vhost_eal_param = (
             "--no-huge -m 1024 "
-            + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]'"
-            + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]'"
-        )
-        vhost_param = (
-            " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[%s]"
-            % lcore_dma
+            + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=8,dmas=[%s]'"
+            % dmas1
+            + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=8,dmas=[%s]'"
+            % dmas2
         )
+        vhost_param = "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8"
         self.start_vhost_user_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -712,79 +694,70 @@ class TestBasic4kPagesCbdma(TestCase):
         self.get_iperf_result()
 
         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,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
+        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.vhost_core_list[1],
                 self.cbdma_list[0],
-                self.vhost_core_list[1],
+                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.vhost_core_list[1],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+                self.cbdma_list[1],
+            )
+        )
+        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[2],
-                self.vhost_core_list[1],
-                self.cbdma_list[3],
-                self.vhost_core_list[2],
-                self.cbdma_list[0],
-                self.vhost_core_list[2],
                 self.cbdma_list[2],
-                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[1],
-                self.vhost_core_list[3],
+                self.cbdma_list[2],
+                self.cbdma_list[2],
+                self.cbdma_list[2],
+                self.cbdma_list[2],
+                self.cbdma_list[3],
+                self.cbdma_list[3],
+                self.cbdma_list[3],
+                self.cbdma_list[3],
+                self.cbdma_list[3],
                 self.cbdma_list[3],
-                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[3],
-                self.cbdma_list[12],
-                self.vhost_core_list[3],
-                self.cbdma_list[13],
-                self.vhost_core_list[3],
-                self.cbdma_list[14],
-                self.vhost_core_list[4],
-                self.cbdma_list[15],
             )
         )
         vhost_eal_param = (
             "--no-huge -m 1024 "
-            + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]'"
-            + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]'"
-        )
-        vhost_param = (
-            " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[%s]"
-            % lcore_dma
+            + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=8,dmas=[%s],dma-ring-size=1024'"
+            % dmas1
+            + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=8,dmas=[%s],dma-ring-size=1024'"
+            % dmas2
         )
+        vhost_param = "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8"
         self.start_vhost_user_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -803,7 +776,7 @@ class TestBasic4kPagesCbdma(TestCase):
             + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=4'"
             + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=4'"
         )
-        vhost_param = " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4"
+        vhost_param = "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=4 --txq=4"
         self.start_vhost_user_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -845,68 +818,35 @@ class TestBasic4kPagesCbdma(TestCase):
         """
         Test Case 6: vm2vm vhost/virtio-net packed ring multi queues using 4K-pages and cbdma enable
         """
-        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.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=2, allow_diff_socket=True)
+        dmas = (
+            "txq0@%s;"
+            "txq1@%s;"
+            "txq2@%s;"
+            "txq3@%s;"
+            "txq4@%s;"
+            "txq5@%s;"
+            "txq6@%s;"
+            "txq7@%s"
             % (
-                self.vhost_core_list[1],
                 self.cbdma_list[0],
-                self.vhost_core_list[1],
+                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.vhost_core_list[1],
-                self.cbdma_list[2],
-                self.vhost_core_list[1],
-                self.cbdma_list[3],
-                self.vhost_core_list[1],
-                self.cbdma_list[4],
-                self.vhost_core_list[1],
-                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[3],
-                self.cbdma_list[12],
-                self.vhost_core_list[3],
-                self.cbdma_list[13],
-                self.vhost_core_list[3],
-                self.cbdma_list[14],
-                self.vhost_core_list[3],
-                self.cbdma_list[15],
             )
         )
         vhost_eal_param = (
             "--no-huge -m 1024 "
-            + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]'"
-            + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7]'"
-        )
-        vhost_param = (
-            " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[%s]"
-            % lcore_dma
+            + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=8,tso=1,dmas=[%s]'"
+            % dmas
+            + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=8,tso=1,dmas=[%s]'"
+            % dmas
         )
+        vhost_param = "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8"
         self.start_vhost_user_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -931,68 +871,43 @@ class TestBasic4kPagesCbdma(TestCase):
         """
         Test Case 7: vm2vm vhost/virtio-net split ring multi queues using 1G/4k-pages and cbdma enable
         """
-        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.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=4, allow_diff_socket=True)
+        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[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],
-                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],
             )
         )
         vhost_eal_param = (
             "-m 1024 "
-            + "--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]'"
-        )
-        vhost_param = (
-            " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[%s]"
-            % lcore_dma
+            + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=8,tso=1,dmas=[%s],dma-ring-size=1024'"
+            % dmas
+            + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=8,tso=1,dmas=[%s],dma-ring-size=1024'"
+            % dmas
         )
+        vhost_param = "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8"
         self.start_vhost_user_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -1010,79 +925,50 @@ class TestBasic4kPagesCbdma(TestCase):
         self.get_iperf_result()
 
         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,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s,"
-            "lcore%s@%s"
+        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.vhost_core_list[1],
                 self.cbdma_list[0],
-                self.vhost_core_list[1],
+                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.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[0],
-                self.vhost_core_list[2],
                 self.cbdma_list[2],
-                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[1],
-                self.vhost_core_list[3],
+                self.cbdma_list[2],
+                self.cbdma_list[2],
+                self.cbdma_list[3],
+                self.cbdma_list[3],
+                self.cbdma_list[3],
                 self.cbdma_list[3],
-                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[3],
-                self.cbdma_list[12],
-                self.vhost_core_list[3],
-                self.cbdma_list[13],
-                self.vhost_core_list[3],
-                self.cbdma_list[14],
-                self.vhost_core_list[4],
-                self.cbdma_list[15],
             )
         )
         vhost_eal_param = (
             "--no-huge -m 1024 "
-            + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;rxq0;rxq1;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
-            + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=8,dmas=[txq0;txq1;txq2;txq3;txq4;txq5;txq6;txq7;rxq0;rxq1;rxq2;rxq3;rxq4;rxq5;rxq6;rxq7]'"
-        )
-        vhost_param = (
-            " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[%s]"
-            % lcore_dma
+            + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=8,dmas=[%s]'"
+            % dmas
+            + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=8,dmas=[%s]'"
+            % dmas
         )
+        vhost_param = "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8"
         self.start_vhost_user_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
@@ -1105,68 +991,71 @@ class TestBasic4kPagesCbdma(TestCase):
         """
         Test Case 8: vm2vm vhost/virtio-net split packed ring multi queues with 1G/4k-pages and cbdma enable
         """
-        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.get_cbdma_ports_info_and_bind_to_dpdk(cbdma_num=8, allow_diff_socket=True)
+        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.vhost_core_list[1],
                 self.cbdma_list[0],
-                self.vhost_core_list[1],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
+                self.cbdma_list[0],
                 self.cbdma_list[1],
-                self.vhost_core_list[1],
+                self.cbdma_list[1],
+                self.cbdma_list[2],
                 self.cbdma_list[2],
-                self.vhost_core_list[1],
                 self.cbdma_list[3],
-                self.vhost_core_list[2],
+                self.cbdma_list[3],
+                self.cbdma_list[3],
+                self.cbdma_list[3],
+            )
+        )
+        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[4],
+                self.cbdma_list[4],
                 self.cbdma_list[4],
-                self.vhost_core_list[2],
+                self.cbdma_list[4],
+                self.cbdma_list[5],
                 self.cbdma_list[5],
-                self.vhost_core_list[2],
                 self.cbdma_list[6],
-                self.vhost_core_list[2],
+                self.cbdma_list[6],
+                self.cbdma_list[7],
+                self.cbdma_list[7],
+                self.cbdma_list[7],
                 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],
             )
         )
         vhost_eal_param = (
             "-m 1024 "
-            + "--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]'"
-        )
-        vhost_param = (
-            " --nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8 --lcore-dma=[%s]"
-            % lcore_dma
+            + "--vdev 'net_vhost0,iface=./vhost-net0,client=1,queues=8,dmas=[%s]'"
+            % dmas1
+            + " --vdev 'net_vhost1,iface=./vhost-net1,client=1,queues=8,dmas=[%s]'"
+            % dmas2
         )
+        vhost_param = "--nb-cores=4 --txd=1024 --rxd=1024 --rxq=8 --txq=8"
         self.start_vhost_user_testpmd(
             cores=self.vhost_core_list,
             eal_param=vhost_eal_param,
-- 
2.25.1


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

only message in thread, other threads:[~2022-11-28  2:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28  2:42 [dts][PATCH V4 2/2] tests/basic_4k_pages_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).