test suite reviews and discussions
 help / color / mirror / Atom feed
From: Bo Chen <BoX.C.Chen@intel.com>
To: dts@dpdk.org
Cc: Bo Chen <BoX.C.Chen@intel.com>
Subject: [dts] [PATCH V1] tests/pmdrss_hash: use flow api replace legancy
Date: Thu,  6 May 2021 16:19:26 +0000	[thread overview]
Message-ID: <20210506161926.432035-1-BoX.C.Chen@intel.com> (raw)

use flow api replace legancy filter command

Signed-off-by: Bo Chen <BoX.C.Chen@intel.com>
---
 tests/TestSuite_pmdrss_hash.py | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
index fb83f78d..54c0a89d 100644
--- a/tests/TestSuite_pmdrss_hash.py
+++ b/tests/TestSuite_pmdrss_hash.py
@@ -390,7 +390,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:
@@ -494,6 +494,7 @@ class TestPmdrssHash(TestCase):
         dutPorts = self.dut.get_ports(self.nic)
         localPort = self.tester.get_local_port(dutPorts[0])
         itf = self.tester.get_interface(localPort)
+        rule_action = 'func symmetric_toeplitz queues end / end'
         global reta_num
         global iptypes
 
@@ -512,10 +513,13 @@ class TestPmdrssHash(TestCase):
                 "set nbcore %d" % (queue + 1), "testpmd> ")
 
             self.dut.send_expect("port stop all", "testpmd> ")
-            self.dut.send_expect(
-                "set_hash_global_config 0 toeplitz %s enable" % iptype, "testpmd> ")
-            self.dut.send_expect(
-                "set_sym_hash_ena_per_port 0 enable", "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:
+                rule_cmd = rule_cmd.replace('/ ipv4 /', f'/ ipv4 / {rsstype} /')
+            if 'ipv6' in iptype:
+                rule_cmd = rule_cmd.replace('ipv4', 'ipv6')
+            self.dut.send_expect(rule_cmd, "testpmd> ")
             self.dut.send_expect("port start all", "testpmd> ")
             out = self.dut.send_expect(
                 "port config all rss %s" % rsstype, "testpmd> ")
@@ -528,6 +532,7 @@ class TestPmdrssHash(TestCase):
                     "port config 0 rss reta (%d,%d)" % (i, reta_entries[i]), "testpmd> ")
 
             self.send_packet_symmetric(itf, iptype)
+            self.dut.send_expect("flow flush 0", "testpmd> ")
 
         self.dut.send_expect("quit", "# ", 30)
 
-- 
2.31.1


             reply	other threads:[~2021-05-06  8:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-06 16:19 Bo Chen [this message]
2021-05-06  8:18 ` Chen, BoX C
2021-05-26  6:14   ` Tu, Lijuan

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=20210506161926.432035-1-BoX.C.Chen@intel.com \
    --to=box.c.chen@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).