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

Message ID 20211101120056.12228-5-zhiminx.huang@intel.com (mailing list archive)
State Accepted
Headers
Series [V1,1/5] test_plans/cvl_iavf_ip_fragment_rte_flow:modify testplan to adapt dpdk changed |

Checks

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

Commit Message

Huang, ZhiminX Nov. 1, 2021, noon UTC
  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@intel.com>
---
 tests/rte_flow_common.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
  

Comments

Tu, Lijuan Nov. 5, 2021, 1:28 p.m. UTC | #1
> -----Original Message-----
> From: dts <dts-bounces@dpdk.org> On Behalf Of Zhimin Huang
> Sent: 2021年11月1日 20:01
> To: dts@dpdk.org
> Cc: Huang, ZhiminX <zhiminx.huang@intel.com>
> Subject: [dts] [PATCH V1 5/5] tests/rte_flow_common:modify flow common to
> adapt dpdk changed
> 
> 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@intel.com>

Series applied
  

Patch

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: