From: Wei Ling <weix.ling@intel.com>
To: dts@dpdk.org
Cc: Wei Ling <weix.ling@intel.com>
Subject: [dts][PATCH V1] tests/dpdk_gro_lib: fix start QEMU with wrong command issue
Date: Mon, 13 Feb 2023 14:58:15 +0800 [thread overview]
Message-ID: <20230213065815.3484779-1-weix.ling@intel.com> (raw)
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
reply other threads:[~2023-02-13 7:11 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=20230213065815.3484779-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).