[V1] tests/rss_key_update: modify testplan sync with script
Commit Message
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(-)
@@ -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.
@@ -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(