diff mbox series

[V1] tests/rss_key_update: modify testplan sync with script

Message ID 20220811101558.8761-1-linglix.chen@intel.com (mailing list archive)
State Accepted
Headers show
Series [V1] tests/rss_key_update: modify testplan sync with script | expand

Checks

Context Check Description
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-format-test success Testing OK
ci/Intel-dts-doc-test success Testing OK
ci/Intel-dts-suite-test success Testing OK

Commit Message

Lingli Chen Aug. 11, 2022, 10:15 a.m. UTC
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(-)

Comments

Weiyuan Li Aug. 24, 2022, 8:43 a.m. UTC | #1
> -----Original Message-----
> From: Lingli Chen <linglix.chen@intel.com>
> Sent: Thursday, August 11, 2022 6:16 PM
> To: dts@dpdk.org
> Cc: Peng, Yuan <yuan.peng@intel.com>; Chen, LingliX
> <linglix.chen@intel.com>
> Subject: [dts][PATCH V1] tests/rss_key_update: modify testplan sync with
> script
> 
> 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>
> ---
Tested-by: Weiyuan Li <weiyuanx.li@intel.com>
Peng, Yuan Aug. 25, 2022, 3:01 a.m. UTC | #2
Acked-by Peng, Yuan <yuan.peng@intel.com>

-----Original Message-----
From: Chen, LingliX <linglix.chen@intel.com> 
Sent: Thursday, August 11, 2022 6:16 PM
To: dts@dpdk.org
Cc: Peng, Yuan <yuan.peng@intel.com>; Chen, LingliX <linglix.chen@intel.com>
Subject: [dts][PATCH V1] tests/rss_key_update: modify testplan sync with script

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>
Tu, Lijuan Aug. 25, 2022, 3:55 a.m. UTC | #3
On Thu, 11 Aug 2022 06:15:58 -0400, Lingli Chen <linglix.chen@intel.com> wrote:
> 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>

Acked-by: Lijuan Tu <lijuan.tu@intel.com>
Applied, thanks
diff mbox series

Patch

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(