[V1] tests/pmdrss_hash: remove port stop all command

Message ID 20221109060923.21957-1-linglix.chen@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] tests/pmdrss_hash: remove port stop all command |

Checks

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

Commit Message

Lingli Chen Nov. 9, 2022, 6:09 a.m. UTC
  1. Executing the `port stop all` command destroys all flow rules associated with the port. Therefore, remove this command.
2. modify toeplitz_symmetric case sync with testplan: the hash value and queue should be the same for symmetric packets.

Signed-off-by: Lingli Chen <linglix.chen@intel.com>
---
 tests/TestSuite_pmdrss_hash.py | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)
  

Comments

Tu, Lijuan Nov. 18, 2022, 8:04 a.m. UTC | #1
On Wed,  9 Nov 2022 01:09:23 -0500, Lingli Chen <linglix.chen@intel.com> wrote:
> 1. Executing the `port stop all` command destroys all flow rules associated with the port. Therefore, remove this command.
> 2. modify toeplitz_symmetric case sync with testplan: the hash value and queue should be the same for symmetric packets.
> 
> Signed-off-by: Lingli Chen <linglix.chen@intel.com>


Applied, thanks
  

Patch

diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
index da9d143a..afa30bf3 100644
--- a/tests/TestSuite_pmdrss_hash.py
+++ b/tests/TestSuite_pmdrss_hash.py
@@ -456,7 +456,7 @@  class TestPmdrssHash(TestCase):
                 status = "true"
                 result.insert(i, 0)
                 if i % 2 == 1:
-                    if pre_RSS_hash != tmp_reta_line["RSS hash"]:
+                    if pre_RSS_hash == tmp_reta_line["RSS hash"]:
                         status = "true"
                         result.insert(len(reta_lines) + (i - 1) // 2, 0)
                     else:
@@ -549,7 +549,6 @@  class TestPmdrssHash(TestCase):
             self.dut.send_expect("set promisc all off", "testpmd> ")
             self.dut.send_expect("set nbcore %d" % (queue + 1), "testpmd> ")
 
-            self.dut.send_expect("port stop all", "testpmd> ")
             self.dut.send_expect("flow flush 0", "testpmd> ")
             rule_cmd = f"flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end {rule_action}"
             if "sctp" in iptype or "udp" in iptype or "tcp" in iptype:
@@ -558,7 +557,6 @@  class TestPmdrssHash(TestCase):
                 rule_cmd = rule_cmd.replace("ipv4", "ipv6")
             outx = self.dut.send_expect(rule_cmd, "testpmd> ")
             self.verify("created" in outx, "Create flow failed")
-            self.dut.send_expect("port start all", "testpmd> ")
             out = self.dut.send_expect("port config all rss %s" % rsstype, "testpmd> ")
             self.verify(
                 "error" not in out, "Configuration of RSS hash failed: Invalid argument"
@@ -600,7 +598,6 @@  class TestPmdrssHash(TestCase):
             self.dut.send_expect("set promisc all off", "testpmd> ")
             self.dut.send_expect("set nbcore %d" % (queue + 1), "testpmd> ")
 
-            self.dut.send_expect("port stop all", "testpmd> ")
             self.dut.send_expect("flow flush 0", "testpmd> ")
             rule_cmd = f"flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end {rule_action}"
             if "sctp" in iptype or "udp" in iptype or "tcp" in iptype:
@@ -609,7 +606,6 @@  class TestPmdrssHash(TestCase):
                 rule_cmd = rule_cmd.replace("ipv4", "ipv6")
             outx = self.dut.send_expect(rule_cmd, "testpmd> ")
             self.verify("created" in outx, "Create flow failed")
-            self.dut.send_expect("port start all", "testpmd> ")
             out = self.dut.send_expect("port config all rss %s" % rsstype, "testpmd> ")
             self.verify(
                 "error" not in out, "Configuration of RSS hash failed: Invalid argument"
@@ -657,7 +653,6 @@  class TestPmdrssHash(TestCase):
             self.dut.send_expect("set promisc all off", "testpmd> ")
             self.dut.send_expect("set nbcore %d" % (queue + 1), "testpmd> ")
 
-            self.dut.send_expect("port stop all", "testpmd> ")
             # some nic not support change hash algorithm
             self.dut.send_expect("flow flush 0", "testpmd> ")
             rule_cmd = f"flow create 0 ingress pattern eth / ipv4 / end actions rss types {iptype} end queues end {rule_action}"
@@ -667,7 +662,6 @@  class TestPmdrssHash(TestCase):
                 rule_cmd = rule_cmd.replace("ipv4", "ipv6")
             outx = self.dut.send_expect(rule_cmd, "testpmd> ")
             self.verify("created" in outx, "Create flow failed")
-            self.dut.send_expect("port start all", "testpmd> ")
             out = self.dut.send_expect("port config all rss %s" % rsstype, "testpmd> ")
             self.verify(
                 "error" not in out, "Configuration of RSS hash failed: Invalid argument"