test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Jiang, YuX" <yux.jiang@intel.com>
To: dts@dpdk.org
Cc: "Jiang, YuX" <yux.jiang@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_multiple_pthread: Allocate enough streams based on the number of CPU cores
Date: Wed, 15 Apr 2020 13:24:25 +0800	[thread overview]
Message-ID: <1586928265-382574-1-git-send-email-yux.jiang@intel.com> (raw)

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


             reply	other threads:[~2020-04-15  5:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-15  5:24 Jiang, YuX [this message]
2020-04-17  3:11 ` Zhao, XinfengX
2020-04-20  5:21 ` Tu, Lijuan

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=1586928265-382574-1-git-send-email-yux.jiang@intel.com \
    --to=yux.jiang@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).