[V2,5/8] tests/ice_switch_filter: create rss rule to switch on ip fragment rss function

Message ID 20220525111934.106784-5-songx.jiale@intel.com (mailing list archive)
State Accepted
Headers
Series [V2,1/8] tests/ice_advanced_iavf_rss: remove ip fragment packets |

Commit Message

Jiale, SongX May 25, 2022, 11:19 a.m. UTC
  modify the script to adapt to the change of dpdk function.
add rule to enable ip fragment RSS function.

According to dpdk commit cc46bab5968 ("net/ice: remove support for IP fragment default RSS").

Signed-off-by: Jiale Song <songx.jiale@intel.com>
---
 test_plans/ice_switch_filter_test_plan.rst | 20 +++++++++++++++++
 tests/TestSuite_ice_switch_filter.py       | 26 ++++++++++++++++------
 2 files changed, 39 insertions(+), 7 deletions(-)
  

Patch

diff --git a/test_plans/ice_switch_filter_test_plan.rst b/test_plans/ice_switch_filter_test_plan.rst
index b6d0d596..6db690fb 100644
--- a/test_plans/ice_switch_filter_test_plan.rst
+++ b/test_plans/ice_switch_filter_test_plan.rst
@@ -2766,6 +2766,10 @@  to queue action
 
    check the rule not exists in the list.
 
+   create rss rule to switch on ipfrag rss function::
+
+     flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end
+
 2. create a rule::
 
      testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 3 / end
@@ -2808,6 +2812,10 @@  to queue group action
 
    check the rule not exists in the list.
 
+   create rss rule to switch on ipfrag rss function::
+
+     flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end
+
 2. create a rule::
 
      testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / end
@@ -3528,6 +3536,10 @@  to queue group action
 
    check the rule not exists in the list.
 
+   create rss rule to switch on ipfrag rss function::
+
+     flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end
+
 2. create a rule::
 
      testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions rss queues 2 3 end / end
@@ -3627,6 +3639,10 @@  to queue action
 
    check the rule not exists in the list.
 
+   create rss rule to switch on ipfrag rss function::
+
+     flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end
+
 2. create a rule::
 
      testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions queue index 3 / end
@@ -3669,6 +3685,10 @@  to queue group action
 
    check the rule not exists in the list.
 
+   create rss rule to switch on ipfrag rss function::
+
+     flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end
+
 2. create a rule::
 
      testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions rss queues 2 3 end / end
diff --git a/tests/TestSuite_ice_switch_filter.py b/tests/TestSuite_ice_switch_filter.py
index 2622a5cd..c402fffc 100644
--- a/tests/TestSuite_ice_switch_filter.py
+++ b/tests/TestSuite_ice_switch_filter.py
@@ -3087,7 +3087,9 @@  mac_ipv4_frag_pipeline_mode_scapy_str = {
 
 tv_mac_ipv4_frag_pipeline_mode_in_queue_01 = {
     "name": "tv_mac_ipv4_frag_pipeline_mode_in_queue_01",
-    "rte_flow_pattern": "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 3 / end",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end",
+        "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 3 / end",],
     "configuration": {"is_non_pipeline": False, "is_need_rss_rule": False},
     "matched": {
         "scapy_str": mac_ipv4_frag_pipeline_mode_scapy_str["matched"],
@@ -3109,7 +3111,9 @@  tv_mac_ipv4_frag_pipeline_mode_in_queue_01 = {
 
 tv_mac_ipv4_frag_pipeline_mode_queue_region_02 = {
     "name": "tv_mac_ipv4_frag_pipeline_mode_queue_region_02",
-    "rte_flow_pattern": "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / end",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end",
+        "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / end",],
     "configuration": {"is_non_pipeline": False, "is_need_rss_rule": False},
     "matched": {
         "scapy_str": mac_ipv4_frag_pipeline_mode_scapy_str["matched"],
@@ -3525,7 +3529,9 @@  mac_ipv6_src_ipv6_dst_ipv6_pipeline_mode_scapy_str = {
 
 tv_mac_ipv6_src_ipv6_dst_ipv6_pipeline_mode_in_queue_01 = {
     "name": "tv_mac_ipv6_src_ipv6_dst_ipv6_pipeline_mode_in_queue_01",
-    "rte_flow_pattern": "flow create 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 5 / end",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end",
+        "flow create 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 5 / end",],
     "configuration": {"is_non_pipeline": False, "is_need_rss_rule": False},
     "matched": {
         "scapy_str": mac_ipv6_src_ipv6_dst_ipv6_pipeline_mode_scapy_str["matched"],
@@ -3547,7 +3553,9 @@  tv_mac_ipv6_src_ipv6_dst_ipv6_pipeline_mode_in_queue_01 = {
 
 tv_mac_ipv6_src_ipv6_dst_ipv6_pipeline_mode_queue_region_02 = {
     "name": "tv_mac_ipv6_src_ipv6_dst_ipv6_pipeline_mode_queue_region_02",
-    "rte_flow_pattern": "flow create 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions rss queues 2 3 end / end",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end",
+        "flow create 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions rss queues 2 3 end / end",],
     "configuration": {"is_non_pipeline": False, "is_need_rss_rule": False},
     "matched": {
         "scapy_str": mac_ipv6_src_ipv6_dst_ipv6_pipeline_mode_scapy_str["matched"],
@@ -3611,7 +3619,9 @@  mac_ipv6_dst_ipv6_tc_pipeline_mode_scapy_str = {
 
 tv_mac_ipv6_dst_ipv6_tc_pipeline_mode_in_queue_01 = {
     "name": "tv_mac_ipv6_dst_ipv6_tc_pipeline_mode_in_queue_01",
-    "rte_flow_pattern": "flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions queue index 3 / end",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end",
+        "flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions queue index 3 / end",],
     "configuration": {"is_non_pipeline": False, "is_need_rss_rule": False},
     "matched": {
         "scapy_str": mac_ipv6_dst_ipv6_tc_pipeline_mode_scapy_str["matched"],
@@ -3633,7 +3643,9 @@  tv_mac_ipv6_dst_ipv6_tc_pipeline_mode_in_queue_01 = {
 
 tv_mac_ipv6_dst_ipv6_tc_pipeline_mode_queue_region_02 = {
     "name": "tv_mac_ipv6_dst_ipv6_tc_pipeline_mode_queue_region_02",
-    "rte_flow_pattern": "flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions rss queues 2 3 end / end",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end",
+        "flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions rss queues 2 3 end / end",],
     "configuration": {"is_non_pipeline": False, "is_need_rss_rule": False},
     "matched": {
         "scapy_str": mac_ipv6_dst_ipv6_tc_pipeline_mode_scapy_str["matched"],
@@ -4445,7 +4457,7 @@  class ICESwitchFilterTest(TestCase):
         if isinstance(rte_flow_pattern, list):
             for rule in rte_flow_pattern:
                 out = self.dut.send_expect(rule, "testpmd> ")  # create a rule
-                if s not in out:
+                if s not in out and 'frag' not in rule:
                     rule_list.append(False)
                 else:
                     m = p.search(out)