diff mbox series

[V3,2/2] tests/pmdrss_hash: replace legacy filter with rte_flow

Message ID 1636355396-12864-3-git-send-email-yux.jiang@intel.com (mailing list archive)
State Accepted
Headers show
Series v3 pmdrss_hash: replace legacy filter with rte_flow | expand

Commit Message

Jiang, YuX Nov. 8, 2021, 7:09 a.m. UTC
According to dpdk commit 81db321da("ethdev: remove legacy HASH filter type support"),
remove legacy hash filter to use rte_flow api replace.

Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
 tests/TestSuite_pmdrss_hash.py | 52 +++++++++++++++++++++++++-----------------
 1 file changed, 31 insertions(+), 21 deletions(-)

Comments

Jiang, YuX Nov. 8, 2021, 7:21 a.m. UTC | #1
> -----Original Message-----
> From: Jiang, YuX <yux.jiang@intel.com>
> Sent: Monday, November 8, 2021 3:10 PM
> To: Peng, Yuan <yuan.peng@intel.com>; dts@dpdk.org
> Cc: Jiang, YuX <yux.jiang@intel.com>
> Subject: [dts][PATCH V3 2/2] tests/pmdrss_hash: replace legacy filter with
> rte_flow
> 
> According to dpdk commit 81db321da("ethdev: remove legacy HASH filter
> type support"), remove legacy hash filter to use rte_flow api replace.
> 
> Signed-off-by: Yu Jiang <yux.jiang@intel.com>
Tested-by: Yu Jiang <yux.jiang@intel.com>

"pmdrss_hash/test_dynamic_rss_bond_config" Failed due to dpdk commit 
81db321da "ethdev: remove legacy HASH filter type support" 
do not support get_hash_global_config <port-id> cmd.

"x86_64-native-linuxapp-gcc": {
            "pmdrss_hash/test_dynamic_rss_bond_config": "failed",
            "pmdrss_hash/test_simple": "passed",
            "pmdrss_hash/test_simple_symmetric": "n/a",
            "pmdrss_hash/test_toeplitz": "passed",
            "pmdrss_hash/test_toeplitz_symmetric": "passed"
        }
Tu, Lijuan Nov. 9, 2021, 9:11 a.m. UTC | #2
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Yu Jiang
> Sent: 2021年11月8日 15:10
> To: Peng, Yuan <yuan.peng@intel.com>; dts@dpdk.org
> Cc: Jiang, YuX <yux.jiang@intel.com>
> Subject: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy filter with
> rte_flow
> 
> According to dpdk commit 81db321da("ethdev: remove legacy HASH filter type
> support"), remove legacy hash filter to use rte_flow api replace.
> 
> Signed-off-by: Yu Jiang <yux.jiang@intel.com>

Is there any other case impact by the dpdk commit ? if yes, please fix them too.
Jiang, YuX Nov. 9, 2021, 9:22 a.m. UTC | #3
> -----Original Message-----
> From: Tu, Lijuan <lijuan.tu@intel.com>
> Sent: Tuesday, November 9, 2021 5:11 PM
> To: Jiang, YuX <yux.jiang@intel.com>; Peng, Yuan <yuan.peng@intel.com>;
> dts@dpdk.org
> Cc: Jiang, YuX <yux.jiang@intel.com>
> Subject: RE: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy filter
> with rte_flow
> 
> > -----Original Message-----
> > From: dts <dts-bounces@dpdk.org> On Behalf Of Yu Jiang
> > Sent: 2021年11月8日 15:10
> > To: Peng, Yuan <yuan.peng@intel.com>; dts@dpdk.org
> > Cc: Jiang, YuX <yux.jiang@intel.com>
> > Subject: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy filter
> > with rte_flow
> >
> > According to dpdk commit 81db321da("ethdev: remove legacy HASH filter
> > type support"), remove legacy hash filter to use rte_flow api replace.
> >
> > Signed-off-by: Yu Jiang <yux.jiang@intel.com>
> 
> Is there any other case impact by the dpdk commit ? if yes, please fix them
> too.
Other two TCs will be removed from this plan and suite due to no cmd to support them any more.
Tu, Lijuan Nov. 9, 2021, 12:03 p.m. UTC | #4
> -----Original Message-----
> From: Jiang, YuX <yux.jiang@intel.com>
> Sent: 2021年11月9日 17:23
> To: Tu, Lijuan <lijuan.tu@intel.com>; Peng, Yuan <yuan.peng@intel.com>;
> dts@dpdk.org
> Subject: RE: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy filter with
> rte_flow
> 
> > -----Original Message-----
> > From: Tu, Lijuan <lijuan.tu@intel.com>
> > Sent: Tuesday, November 9, 2021 5:11 PM
> > To: Jiang, YuX <yux.jiang@intel.com>; Peng, Yuan
> > <yuan.peng@intel.com>; dts@dpdk.org
> > Cc: Jiang, YuX <yux.jiang@intel.com>
> > Subject: RE: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy
> > filter with rte_flow
> >
> > > -----Original Message-----
> > > From: dts <dts-bounces@dpdk.org> On Behalf Of Yu Jiang
> > > Sent: 2021年11月8日 15:10
> > > To: Peng, Yuan <yuan.peng@intel.com>; dts@dpdk.org
> > > Cc: Jiang, YuX <yux.jiang@intel.com>
> > > Subject: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy
> > > filter with rte_flow
> > >
> > > According to dpdk commit 81db321da("ethdev: remove legacy HASH
> > > filter type support"), remove legacy hash filter to use rte_flow api replace.
> > >
> > > Signed-off-by: Yu Jiang <yux.jiang@intel.com>
> >
> > Is there any other case impact by the dpdk commit ? if yes, please fix
> > them too.
> Other two TCs will be removed from this plan and suite due to no cmd to
> support them any more.

Series applied
Jiang, YuX Nov. 10, 2021, 11:03 a.m. UTC | #5
> -----Original Message-----
> From: Tu, Lijuan <lijuan.tu@intel.com>
> Sent: Tuesday, November 9, 2021 8:04 PM
> To: Jiang, YuX <yux.jiang@intel.com>; Peng, Yuan <yuan.peng@intel.com>;
> dts@dpdk.org
> Subject: RE: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy filter
> with rte_flow
> 
> > -----Original Message-----
> > From: Jiang, YuX <yux.jiang@intel.com>
> > Sent: 2021年11月9日 17:23
> > To: Tu, Lijuan <lijuan.tu@intel.com>; Peng, Yuan
> > <yuan.peng@intel.com>; dts@dpdk.org
> > Subject: RE: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy
> > filter with rte_flow
> >
> > > -----Original Message-----
> > > From: Tu, Lijuan <lijuan.tu@intel.com>
> > > Sent: Tuesday, November 9, 2021 5:11 PM
> > > To: Jiang, YuX <yux.jiang@intel.com>; Peng, Yuan
> > > <yuan.peng@intel.com>; dts@dpdk.org
> > > Cc: Jiang, YuX <yux.jiang@intel.com>
> > > Subject: RE: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy
> > > filter with rte_flow
> > >
> > > > -----Original Message-----
> > > > From: dts <dts-bounces@dpdk.org> On Behalf Of Yu Jiang
> > > > Sent: 2021年11月8日 15:10
> > > > To: Peng, Yuan <yuan.peng@intel.com>; dts@dpdk.org
> > > > Cc: Jiang, YuX <yux.jiang@intel.com>
> > > > Subject: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy
> > > > filter with rte_flow
> > > >
> > > > According to dpdk commit 81db321da("ethdev: remove legacy HASH
> > > > filter type support"), remove legacy hash filter to use rte_flow api
> replace.
> > > >
> > > > Signed-off-by: Yu Jiang <yux.jiang@intel.com>
> > >
> > > Is there any other case impact by the dpdk commit ? if yes, please
> > > fix them too.
> > Other two TCs will be removed from this plan and suite due to no cmd
> > to support them any more.
> 
> Series applied
> 
Seems that series failed to apply, I check the latest dts has no such code....., Could you pls have a look?
Tu, Lijuan Nov. 10, 2021, 3:07 p.m. UTC | #6
> -----Original Message-----
> From: Jiang, YuX <yux.jiang@intel.com>
> Sent: 2021年11月10日 19:03
> To: Tu, Lijuan <lijuan.tu@intel.com>; Peng, Yuan <yuan.peng@intel.com>;
> dts@dpdk.org
> Subject: RE: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy filter with
> rte_flow
> 
> > -----Original Message-----
> > From: Tu, Lijuan <lijuan.tu@intel.com>
> > Sent: Tuesday, November 9, 2021 8:04 PM
> > To: Jiang, YuX <yux.jiang@intel.com>; Peng, Yuan
> > <yuan.peng@intel.com>; dts@dpdk.org
> > Subject: RE: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy
> > filter with rte_flow
> >
> > > -----Original Message-----
> > > From: Jiang, YuX <yux.jiang@intel.com>
> > > Sent: 2021年11月9日 17:23
> > > To: Tu, Lijuan <lijuan.tu@intel.com>; Peng, Yuan
> > > <yuan.peng@intel.com>; dts@dpdk.org
> > > Subject: RE: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy
> > > filter with rte_flow
> > >
> > > > -----Original Message-----
> > > > From: Tu, Lijuan <lijuan.tu@intel.com>
> > > > Sent: Tuesday, November 9, 2021 5:11 PM
> > > > To: Jiang, YuX <yux.jiang@intel.com>; Peng, Yuan
> > > > <yuan.peng@intel.com>; dts@dpdk.org
> > > > Cc: Jiang, YuX <yux.jiang@intel.com>
> > > > Subject: RE: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace
> > > > legacy filter with rte_flow
> > > >
> > > > > -----Original Message-----
> > > > > From: dts <dts-bounces@dpdk.org> On Behalf Of Yu Jiang
> > > > > Sent: 2021年11月8日 15:10
> > > > > To: Peng, Yuan <yuan.peng@intel.com>; dts@dpdk.org
> > > > > Cc: Jiang, YuX <yux.jiang@intel.com>
> > > > > Subject: [dts] [PATCH V3 2/2] tests/pmdrss_hash: replace legacy
> > > > > filter with rte_flow
> > > > >
> > > > > According to dpdk commit 81db321da("ethdev: remove legacy HASH
> > > > > filter type support"), remove legacy hash filter to use rte_flow
> > > > > api
> > replace.
> > > > >
> > > > > Signed-off-by: Yu Jiang <yux.jiang@intel.com>
> > > >
> > > > Is there any other case impact by the dpdk commit ? if yes, please
> > > > fix them too.
> > > Other two TCs will be removed from this plan and suite due to no cmd
> > > to support them any more.
> >
> > Series applied
> >
> Seems that series failed to apply, I check the latest dts has no such code.....,
> Could you pls have a look?

It show works now, it got some network issues yesterday and now it fixed.
diff mbox series

Patch

diff --git a/tests/TestSuite_pmdrss_hash.py b/tests/TestSuite_pmdrss_hash.py
index 2ff98cb..9eb17cf 100644
--- a/tests/TestSuite_pmdrss_hash.py
+++ b/tests/TestSuite_pmdrss_hash.py
@@ -41,6 +41,7 @@  import re
 import time
 
 import framework.utils as utils
+from framework.test_case import skip_unsupported_nic
 
 queue = 16
 reta_entries = []
@@ -411,33 +412,18 @@  class TestPmdrssHash(TestCase):
         self.verify(
             sum(result) == 0, "the symmetric RSS hash function failed!")
 
+    @skip_unsupported_nic(["columbiaville_25g", "columbiaville_100g", "niantic", "foxville"])
     def set_up_all(self):
         """
         Run at the start of each test suite.
         """
 
-        self.verify(self.nic in ["columbiaville_25g", "columbiaville_100g","fortville_eagle", "fortville_spirit",
-                    "fortville_spirit_single", "fortpark_TLV", "fortpark_BASE-T","fortville_25g", "niantic", "carlsville", "foxville"],
-                    "NIC Unsupported: " + str(self.nic))
         global reta_num
         global iptypes
         global queue
-        if self.nic in ["foxville"]:
-            queue = 4
 
         if self.nic in ["fortville_eagle", "fortville_spirit", "fortville_spirit_single", "fortpark_TLV", "fortpark_BASE-T","fortville_25g", "carlsville"]:
             reta_num = 512
-        elif self.nic in ["niantic", "foxville"]:
-            reta_num = 128
-            iptypes = {'ipv4-other': 'ip',
-                       'ipv4-frag': 'ip',
-                       'ipv4-udp': 'udp',
-                       'ipv4-tcp': 'tcp',
-                       'ipv6-other': 'ip',
-                       'ipv6-udp': 'udp',
-                       'ipv6-tcp': 'tcp',
-                       'ipv6-frag': 'ip'
-                       }
         else:
             self.verify(False, "NIC Unsupported:%s" % str(self.nic))
         ports = self.dut.get_ports(self.nic)
@@ -453,9 +439,13 @@  class TestPmdrssHash(TestCase):
         self.coremask = utils.create_mask(cores)
 
     def test_toeplitz(self):
+        """
+            Test Case:  test_toeplitz
+        """
         dutPorts = self.dut.get_ports(self.nic)
         localPort = self.tester.get_local_port(dutPorts[0])
         itf = self.tester.get_interface(localPort)
+        rule_action = 'func toeplitz queues end / end'
         global reta_num
         global iptypes
 
@@ -474,8 +464,14 @@  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("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')
+            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> ")
@@ -491,6 +487,9 @@  class TestPmdrssHash(TestCase):
         self.dut.send_expect("quit", "# ", 30)
 
     def test_toeplitz_symmetric(self):
+        """
+            Test Case:  test_toeplitz_symmetric
+        """
         dutPorts = self.dut.get_ports(self.nic)
         localPort = self.tester.get_local_port(dutPorts[0])
         itf = self.tester.get_interface(localPort)
@@ -519,7 +518,8 @@  class TestPmdrssHash(TestCase):
                 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> ")
+            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> ")
@@ -537,9 +537,13 @@  class TestPmdrssHash(TestCase):
         self.dut.send_expect("quit", "# ", 30)
 
     def test_simple(self):
+        """
+            Test Case:  test_simple
+        """
         dutPorts = self.dut.get_ports(self.nic)
         localPort = self.tester.get_local_port(dutPorts[0])
         itf = self.tester.get_interface(localPort)
+        rule_action = 'func simple_xor queues end / end'
         global reta_num
         global iptypes
 
@@ -560,8 +564,14 @@  class TestPmdrssHash(TestCase):
 
             self.dut.send_expect("port stop all", "testpmd> ")
             # some nic not support change hash algorithm
-            self.dut.send_expect(
-                "set_hash_global_config 0 simple_xor %s enable" % iptype, "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')
+            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> ")