test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V1] tests/dpdk_gro_lib: fix start QEMU with wrong command issue
@ 2023-02-13  6:58 Wei Ling
  0 siblings, 0 replies; only message in thread
From: Wei Ling @ 2023-02-13  6:58 UTC (permalink / raw)
  To: dts; +Cc: Wei Ling

When start QEMU with multi-queues, the command must include
`mq=on,vectors=x` parameter.

Signed-off-by: Wei Ling <weix.ling@intel.com>
---
 tests/TestSuite_dpdk_gro_lib.py | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py
index eaaf757e..d9858230 100644
--- a/tests/TestSuite_dpdk_gro_lib.py
+++ b/tests/TestSuite_dpdk_gro_lib.py
@@ -180,7 +180,7 @@ class TestDPDKGROLib(TestCase):
                 vm_config.params[i]["cpu"][0]["number"] = 1
                 vm_config.params[i]["cpu"][0]["cpupin"] = self.qemu_cpupin
 
-    def start_vm(self, mode=1, queue=1):
+    def start_vm(self, queue=1):
         self.vm1 = VM(self.dut, "vm0", "vhost_sample")
         self.vm1.load_config()
         vm_params_1 = {}
@@ -188,14 +188,11 @@ class TestDPDKGROLib(TestCase):
         vm_params_1["opt_path"] = self.base_dir + "/vhost-net"
         vm_params_1["opt_mac"] = self.virtio_mac1
         vm_params_1["opt_queue"] = queue
-        if mode == 5:
-            vm_params_1[
-                "opt_settings"
-            ] = "mrg_rxbuf=on,csum=on,gso=on,host_tso4=on,guest_tso4=on,mq=on,vectors=15"
-        else:
-            vm_params_1[
-                "opt_settings"
-            ] = "mrg_rxbuf=on,csum=on,gso=on,host_tso4=on,guest_tso4=on"
+        if int(queue) > 1:
+            mq_pram = ",mq=on,vectors=%s" % (2 + 2 * int(queue))
+        vm_params_1["opt_settings"] = (
+            "mrg_rxbuf=on,csum=on,gso=on,host_tso4=on,guest_tso4=on%s" % mq_pram
+        )
         self.vm1.set_vm_device(**vm_params_1)
         self.set_vm_cpu_number(self.vm1)
         try:
@@ -347,7 +344,7 @@ class TestDPDKGROLib(TestCase):
         """
         self.config_kernel_nic_host(0)
         self.launch_testpmd_gro_on(mode=1, queue=2)
-        self.start_vm(mode=1, queue=2)
+        self.start_vm(queue=2)
         time.sleep(5)
         self.dut.get_session_output(timeout=2)
         # Get the virtio-net device name
-- 
2.25.1


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

only message in thread, other threads:[~2023-02-13  7:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-13  6:58 [dts][PATCH V1] tests/dpdk_gro_lib: fix start QEMU with wrong command issue 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).