test suite reviews and discussions
 help / color / mirror / Atom feed
From: Hongbo Li <hongbox.li@intel.com>
To: dts@dpdk.org
Cc: yuan.peng@intel.com, Lingli Chen <linglix.chen@intel.com>
Subject: [dts][PATCH V1] tests/rss_key_update: modify testplan sync with script
Date: Thu, 11 Aug 2022 04:38:44 -0400	[thread overview]
Message-ID: <20220811083844.70803-1-hongbox.li@intel.com> (raw)

From: Lingli Chen <linglix.chen@intel.com>

1. modify testplan according to dts commit: 2865e5b5ec53(replace legacy filter with rte flow).
2. modify case test_set_hash_key_toeplitz sync with testplan

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
 test_plans/rss_key_update_test_plan.rst | 13 ++++++++++---
 tests/TestSuite_rss_key_update.py       | 10 +++++++++-
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git a/test_plans/rss_key_update_test_plan.rst b/test_plans/rss_key_update_test_plan.rst
index 8c574a0f..78cae6c2 100644
--- a/test_plans/rss_key_update_test_plan.rst
+++ b/test_plans/rss_key_update_test_plan.rst
@@ -23,7 +23,7 @@ Test Case: test_set_hash_key_toeplitz
 
 #. Launch the ``testpmd`` application with the following arguments::
 
-    ./<build_target>/app/dpdk-testpmd -c ffffff -n 4 -- -i --portmask=0x6 --rxq=16 --txq=16
+    ./<build_target>/app/dpdk-testpmd -c ffffff -n 4 -- -i --rxq=16 --txq=16
 
 #. PMD fwd only receive the packets::
 
@@ -39,7 +39,14 @@ Test Case: test_set_hash_key_toeplitz
 
 #. Set hash function, symmetric, port and packet type::
 
-    testpmd> set_hash_global_config 0 toeplitz ipv4-udp enable
+    testpmd> flow create 0 ingress pattern eth / ipv4 / udp / end actions rss types ipv4-udp end queues end func toeplitz / end
+    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func toeplitz / end
+    types in pattern must match rss types.
+
+#. Configure RSS hash::
+
+    testpmd> port config all rss <udp|tcp>
+    verify "error" not in out
 
 #. Send packet and print the hash value and queue id of every packet. \
    Then use the hash value % the table size to find expected queue id. \
@@ -68,7 +75,7 @@ Test Case: test_set_hash_key_toeplitz_symmetric
 Same steps as the "test_set_hash_key_toeplitz" test case.
 When set hash function you will need to add::
 
-    testpmd>  set_sym_hash_ena_per_port 0 enable
+    testpmd> flow create 0 ingress pattern eth / ipv4 / tcp / end actions rss types ipv4-tcp end queues end func symmetric_toeplitz queues end / end
 
 Then send in packet as normal.
 
diff --git a/tests/TestSuite_rss_key_update.py b/tests/TestSuite_rss_key_update.py
index 0ce422ec..77f11839 100644
--- a/tests/TestSuite_rss_key_update.py
+++ b/tests/TestSuite_rss_key_update.py
@@ -228,7 +228,7 @@ class TestRssKeyUpdate(TestCase):
 
         self.dut.kill_all()
 
-        self.pmdout.start_testpmd("Default", f"--rxq={queue} --txq={queue}")
+        self.pmdout.start_testpmd("all", f"--rxq={queue} --txq={queue}")
 
     def test_set_hash_key_toeplitz(self):
 
@@ -255,6 +255,10 @@ class TestRssKeyUpdate(TestCase):
             )
             self.dut.send_expect("flow flush 0", "testpmd> ")
             cmd = f"flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end func toeplitz / end"
+            if "sctp" in iptype or "udp" in iptype or "tcp" in iptype:
+                cmd = cmd.replace("/ ipv4 /", f"/ ipv4 / {rsstype} /")
+            if "ipv6" in iptype:
+                cmd = cmd.replace("ipv4", "ipv6")
             self.dut.send_expect(cmd, "testpmd> ")
             out = self.dut.send_expect(f"port config all rss {rsstype}", "testpmd> ")
             self.verify(
@@ -267,6 +271,10 @@ class TestRssKeyUpdate(TestCase):
             )
             self.dut.send_expect("flow flush 0", "testpmd> ")
             cmd = f"flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end func toeplitz / end"
+            if "sctp" in iptype or "udp" in iptype or "tcp" in iptype:
+                cmd = cmd.replace("/ ipv4 /", f"/ ipv4 / {rsstype} /")
+            if "ipv6" in iptype:
+                cmd = cmd.replace("ipv4", "ipv6")
             self.dut.send_expect(cmd, "testpmd> ")
             new_output = self.send_packet(self.itf, iptype, False)
             self.verify(
-- 
2.17.1


             reply	other threads:[~2022-08-11  9:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11  8:38 Hongbo Li [this message]
2022-08-11 10:15 Lingli Chen
2022-08-24  8:43 ` Li, WeiyuanX
2022-08-25  3:01 ` Peng, Yuan
2022-08-25  3:55 ` lijuan.tu

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=20220811083844.70803-1-hongbox.li@intel.com \
    --to=hongbox.li@intel.com \
    --cc=dts@dpdk.org \
    --cc=linglix.chen@intel.com \
    --cc=yuan.peng@intel.com \
    /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).