[dts] [PATCH V1 5/5] tests/rte_flow_common:modify flow common to adapt dpdk changed

Zhimin Huang zhiminx.huang at intel.com
Mon Nov 1 13:00:56 CET 2021


1.according to 54d78462344e2b3ec0a54cb6f13af0bf3da47032.
the default rss not support ipfrag rss, need take a rss rule to enable ipfrag rss for fdir test.

fix rte flow common code to adapt dts changed.

Signed-off-by: Zhimin Huang <zhiminx.huang at intel.com>
---
 tests/rte_flow_common.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py
index eae24e2e..fb76bf86 100644
--- a/tests/rte_flow_common.py
+++ b/tests/rte_flow_common.py
@@ -1252,6 +1252,11 @@ class FdirProcessing(object):
                 drop = tv["check_param"].get("drop")
                 # create rule
                 self.test_case.dut.send_expect("flow flush %d" % port_id, "testpmd> ", 120)
+                rule_rss = []
+                if "tv_mac_ipv4_frag_fdir" in tv['name']:
+                    rule_rss = self.create_rule("flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end")
+                elif "tv_mac_ipv6_frag_fdir" in tv['name']:
+                    rule_rss = self.create_rule("flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end")
                 rule_li = self.create_rule(tv["rule"])
                 # send and check match packets
                 out1 = self.send_pkt_get_output(pkts=tv["scapy_str"]["matched"], port_id=port_id, drop=drop)
@@ -1274,7 +1279,10 @@ class FdirProcessing(object):
                     self.verify(matched_queue == matched_queue2 and None not in matched_queue,
                                      "send twice matched packet, received in deferent queues")
                 # check not rule exists
-                self.check_rule(port_id=port_id, stats=False)
+                if rule_rss:
+                    self.check_rule(port_id=tv["check_param"]["port_id"], rule_list=rule_rss)
+                else:
+                    self.check_rule(port_id=port_id, stats=False)
                 test_results[tv["name"]] = True
                 self.logger.info((GREEN("case passed: %s" % tv["name"])))
             except Exception as e:
-- 
2.17.1



More information about the dts mailing list