[dts] [PATCH V1] tests/TestSuite_multiple_pthread: Allocate enough streams based on the number of CPU cores
Jiang, YuX
yux.jiang at intel.com
Wed Apr 15 07:24:25 CEST 2020
From: "Jiang, YuX" <yux.jiang at intel.com>
Add queue number for allocating enough streams according to the count of CPU cores
Signed-off-by: Jiang, YuX <yux.jiang at 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
More information about the dts
mailing list