From: Lewei Yang <leweix.yang@intel.com>
To: dts@dpdk.org
Cc: Lewei Yang <leweix.yang@intel.com>
Subject: [dts] [PATCH V1] smoke test support config different queues
Date: Mon, 18 Oct 2021 19:22:25 +0000 [thread overview]
Message-ID: <20211018192225.12775-1-leweix.yang@intel.com> (raw)
smoke test support config different queues
Signed-off-by: Lewei Yang <leweix.yang@intel.com>
---
test_plans/pf_smoke_test_plan.rst | 19 ++++++++++--
test_plans/vf_smoke_test_plan.rst | 17 +++++++++--
tests/TestSuite_pf_smoke.py | 2 +-
tests/smoke_base.py | 48 +++++++++++++++++++++++++++++--
4 files changed, 76 insertions(+), 10 deletions(-)
diff --git a/test_plans/pf_smoke_test_plan.rst b/test_plans/pf_smoke_test_plan.rst
index 2b6c6128..f7c75150 100644
--- a/test_plans/pf_smoke_test_plan.rst
+++ b/test_plans/pf_smoke_test_plan.rst
@@ -150,14 +150,27 @@ Test Case 3: test reset RX/TX queues
====================================================
1. Run ``port stop all`` to stop all ports.
-2. Run ``port config all rxq 2`` to change the number of receiving queues to two.
+2. Run ``port config all rxq 16`` to change the number of receiving queues to 16.
-3. Run ``port config all txq 2`` to change the number of transmitting queues to two.
+3. Run ``port config all txq 16`` to change the number of transmitting queues to 16.
4. Run ``port start all`` to restart all ports.
5. Check with ``show config rxtx`` that the configuration for these parameters changed.
-6. Run ``start`` again to restart the forwarding, then start packet generator to transmit
+6. Run ``start`` again to restart the forwarding, then Send different hash types' packets
+ with different keywords, then check rx port could receive packets by different queues.
+
+7. Run ``port stop all`` to stop all ports.
+
+8. Run ``port config 0 rx_offload rss_hash off`` to stop rss_hash
+
+9. Run ``port config all rxq 1`` to change the number of receiving queues to 1.
+
+10. Run ``port config all txq 1`` to change the number of transmitting queues to 1.
+
+11. Run ``start`` again to restart the forwarding, then start packet generator to transmit
and receive packets, and check if testpmd is able to receive and forward packets
successfully.
+
+
diff --git a/test_plans/vf_smoke_test_plan.rst b/test_plans/vf_smoke_test_plan.rst
index 650f759c..5c45a652 100644
--- a/test_plans/vf_smoke_test_plan.rst
+++ b/test_plans/vf_smoke_test_plan.rst
@@ -163,14 +163,25 @@ Test Case 3: test reset RX/TX queues
====================================================
1. Run ``port stop all`` to stop all ports.
-2. Run ``port config all rxq 2`` to change the number of receiving queues to two.
+2. Run ``port config all rxq 16`` to change the number of receiving queues to 16.
-3. Run ``port config all txq 2`` to change the number of transmitting queues to two.
+3. Run ``port config all txq 16`` to change the number of transmitting queues to 16.
4. Run ``port start all`` to restart all ports.
5. Check with ``show config rxtx`` that the configuration for these parameters changed.
-6. Run ``start`` again to restart the forwarding, then start packet generator to transmit
+6. Run ``start`` again to restart the forwarding, then Send different hash types' packets
+ with different keywords, then check rx port could receive packets by different queues.
+
+7. Run ``port stop all`` to stop all ports.
+
+8. Run ``port config 0 rx_offload rss_hash off`` to stop rss_hash
+
+9. Run ``port config all rxq 1`` to change the number of receiving queues to 1.
+
+10. Run ``port config all txq 1`` to change the number of transmitting queues to 1.
+
+11. Run ``start`` again to restart the forwarding, then start packet generator to transmit
and receive packets, and check if testpmd is able to receive and forward packets
successfully.
diff --git a/tests/TestSuite_pf_smoke.py b/tests/TestSuite_pf_smoke.py
index 63eb2c7e..12838e24 100644
--- a/tests/TestSuite_pf_smoke.py
+++ b/tests/TestSuite_pf_smoke.py
@@ -58,7 +58,7 @@ class TestPfSmoke(TestCase):
self.smoke_tester_nic = self.tester.get_interface(self.smoke_tester_port)
self.smoke_tester_mac = self.tester.get_mac(self.smoke_dut_ports[0])
self.smoke_dut_mac = self.dut.get_mac_address(self.smoke_dut_ports[0])
-
+ self.smoke_dut_nic_name = self.nic
# Verify that enough core
self.cores = self.dut.get_core_list("1S/4C/1T")
self.verify(self.cores is not None, "Insufficient cores for speed testing")
diff --git a/tests/smoke_base.py b/tests/smoke_base.py
index 0d7046b0..505b7e19 100644
--- a/tests/smoke_base.py
+++ b/tests/smoke_base.py
@@ -40,7 +40,7 @@ JUMBO_FRAME_LENGTH = 9000
IPV4_SRC = '192.168.0.11'
IPV4_DST = '192.168.0.12'
LAUNCH_QUEUE = 4
-PACKAGE_COUNT = 32
+PACKAGE_COUNT = 256
class SmokeTest(object):
@@ -79,8 +79,9 @@ class SmokeTest(object):
# wait package update
time.sleep(1)
self.test_case.pkt.send_pkt(crb=self.test_case.tester, tx_port=self.test_case.smoke_tester_nic)
- time.sleep(.5)
- out = self.test_case.pmd_out.get_output(timeout=1)
+ time.sleep(3)
+
+ out = self.test_case.pmd_out.get_output(timeout=10)
queue_pattern = re.compile(r'Receive\squeue=(\w+)')
# collect all queues
queues = queue_pattern.findall(out)
@@ -155,6 +156,47 @@ class SmokeTest(object):
self.test_case.dut.send_expect("stop", "testpmd> ")
self.test_case.dut.send_expect("port stop all", "testpmd> ")
+
+ if self.test_case.smoke_dut_nic_name in 'foxville':
+ queues_rss = 2
+ self.test_case.dut.send_expect("port config all rxq {}".format(queues_rss), "testpmd> ")
+ self.test_case.dut.send_expect("port config all txq {}".format(queues_rss), "testpmd> ")
+ out = self.test_case.dut.send_expect("show config rxtx", "testpmd> ")
+ if 'RX queue number: 2' not in out:
+ self.test_case.logger.info("RX queue number {} no display".format(queues_rss))
+ return False
+ if 'Tx queue number: 2' not in out:
+ self.test_case.logger.info("Tx queue number {} no display".format(queues_rss))
+ return False
+ else:
+ queues_rss = 16
+ self.test_case.dut.send_expect("port config all rxq {}".format(queues_rss), "testpmd> ")
+ self.test_case.dut.send_expect("port config all txq {}".format(queues_rss), "testpmd> ")
+ out = self.test_case.dut.send_expect("show config rxtx", "testpmd> ")
+ if 'RX queue number: 16' not in out:
+ self.test_case.logger.info("RX queue number {} no display".format(queues_rss))
+ return False
+ if 'Tx queue number: 16' not in out:
+ self.test_case.logger.info("Tx queue number {} no display".format(queues_rss))
+ return False
+
+ self.test_case.dut.send_expect("port start all", "testpmd> ")
+ self.test_case.dut.send_expect("start", "testpmd> ")
+ hash_flag, queues, hash_values = self.send_pkg_return_stats(rss=True)
+ if queues is None:
+ self.test_case.logger.info("txq rxq the queues[{}] error".format(queues))
+ return False
+ queues = list(set(queues))
+ hash_values = list(set(hash_values))
+ # verify that each queue has packets, verify hash value are not equal, and hash flag exists.
+ if queues_rss != len(queues) or 1 == hash_values or hash_flag is False:
+ self.test_case.logger.info("rss the hash flag [{}] [{}] error".format(queues, hash_values))
+ return False
+
+ # modify queues to 1 can work
+ self.test_case.dut.send_expect("stop", "testpmd> ")
+ self.test_case.dut.send_expect("port stop all", "testpmd> ")
+ self.test_case.dut.send_expect("port config 0 rx_offload rss_hash off", "testpmd> ")
self.test_case.dut.send_expect("port config all rxq 1", "testpmd> ")
self.test_case.dut.send_expect("port config all txq 1", "testpmd> ")
out = self.test_case.dut.send_expect("show config rxtx", "testpmd> ")
--
2.17.1
reply other threads:[~2021-10-18 10:51 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=20211018192225.12775-1-leweix.yang@intel.com \
--to=leweix.yang@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).