test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1] tests/TestSuite_multiple_pthread: Allocate enough streams based on the number of CPU cores
@ 2020-04-15  5:24 Jiang, YuX
  2020-04-17  3:11 ` Zhao, XinfengX
  2020-04-20  5:21 ` Tu, Lijuan
  0 siblings, 2 replies; 3+ messages in thread
From: Jiang, YuX @ 2020-04-15  5:24 UTC (permalink / raw)
  To: dts; +Cc: Jiang, YuX

From: "Jiang, YuX" <yux.jiang@intel.com>

Add queue number for allocating enough streams according to the count of CPU cores

Signed-off-by: Jiang, YuX <yux.jiang@intel.com>
---
 tests/TestSuite_multiple_pthread.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/tests/TestSuite_multiple_pthread.py b/tests/TestSuite_multiple_pthread.py
index fb55de2..8825628 100644
--- a/tests/TestSuite_multiple_pthread.py
+++ b/tests/TestSuite_multiple_pthread.py
@@ -124,7 +124,12 @@ class TestMultiplePthread(TestCase):
         self.result_table_create(header_row)
         self.out_view['data'] = []
 
-        cmdline = './%s/app/testpmd --lcores="%s" -n 4 -- -i' % (self.target, lcores)
+        # Allocate enough streams based on the number of CPUs
+        if len(cpu_list) > 2:
+            queue_num = len(cpu_list)
+            cmdline = './%s/app/testpmd --lcores="%s" -n 4 -- -i --txq=%d --rxq=%d' % (self.target, lcores, queue_num, queue_num)
+        else:
+            cmdline = './%s/app/testpmd --lcores="%s" -n 4 -- -i' % (self.target, lcores)
         # start application
         self.dut.send_expect(cmdline, "testpmd", 60)
 
@@ -178,7 +183,7 @@ class TestMultiplePthread(TestCase):
                       "cpu_list":n[2:4],
                       "core_list":n[4:]},
                      {"lcores": "(%s,%s,%s,%s)@(%s,%s)" % (n[0], n[1], n[2], n[3], n[4], n[5]),
-                      "cpu_list":n[1:3],
+                      "cpu_list":n[1:4],
                       "core_list":n[4:6]},
                      {"lcores": "%s,(%s,%s,%s)@%s" % (n[0], n[1], n[2], n[3], n[4]),
                       "cpu_list":n[1:4],
-- 
2.7.4


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-20  5:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-15  5:24 [dts] [PATCH V1] tests/TestSuite_multiple_pthread: Allocate enough streams based on the number of CPU cores Jiang, YuX
2020-04-17  3:11 ` Zhao, XinfengX
2020-04-20  5:21 ` Tu, Lijuan

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).