test suite reviews and discussions
 help / color / mirror / Atom feed
From: Zhimin Huang <zhiminx.huang@intel.com>
To: dts@dpdk.org
Cc: Zhimin Huang <zhiminx.huang@intel.com>
Subject: [dts] [PATCH V1] tests/cvl_iavf_ip_fragment_rte_flow:simply ipfragment rule
Date: Wed, 28 Jul 2021 23:04:00 +0800	[thread overview]
Message-ID: <20210728150400.31037-2-zhiminx.huang@intel.com> (raw)
In-Reply-To: <20210728150400.31037-1-zhiminx.huang@intel.com>

*.according to the change of dpdk code, simply ipfragment rule

Signed-off-by: Zhimin Huang <zhiminx.huang@intel.com>
---
 ...TestSuite_cvl_iavf_ip_fragment_rte_flow.py | 38 +++++++++----------
 1 file changed, 18 insertions(+), 20 deletions(-)

diff --git a/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py b/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py
index b0e41a1b..3866fe72 100644
--- a/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py
+++ b/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py
@@ -43,7 +43,7 @@ LAUNCH_QUEUE = 16
 
 tv_mac_ipv4_frag_fdir_queue_index = {
     "name": "tv_mac_ipv4_frag_fdir_queue_index",
-    "rule": "flow create 0 ingress pattern eth / ipv4 packet_id spec 0 packet_id last 0xffff packet_id mask 0xffff fragment_offset spec 0x2000 fragment_offset last 0x1fff fragment_offset mask 0xffff / end actions queue index 1 / mark / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / mark / end",
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"]
                   },
@@ -52,8 +52,7 @@ tv_mac_ipv4_frag_fdir_queue_index = {
 
 tv_mac_ipv4_frag_fdir_rss_queues = {
     "name": "tv_mac_ipv4_frag_fdir_rss_queues",
-    "rule": ["flow create 0 ingress pattern eth / ipv4 packet_id spec 0 packet_id last 0xffff packet_id mask 0xffff fragment_offset spec 0x2000 fragment_offset last 0x1fff fragment_offset mask 0xffff / end actions rss queues 2 3 end / mark / end",
-            "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end"],
+    "rule": ["flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions rss queues 2 3 end / mark / end",],
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"]
                   },
@@ -62,16 +61,16 @@ tv_mac_ipv4_frag_fdir_rss_queues = {
 
 tv_mac_ipv4_frag_fdir_passthru = {
     "name": "tv_mac_ipv4_frag_fdir_passthru",
-    "rule": "flow create 0 ingress pattern eth / ipv4 packet_id spec 0 packet_id last 0xffff packet_id mask 0xffff fragment_offset spec 0x2000 fragment_offset last 0x1fff fragment_offset mask 0xffff / end actions passthru / mark / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions passthru / mark / end",
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"]
                   },
-    "check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 0}
+    "check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 0, "rss": True}
 }
 
 tv_mac_ipv4_frag_fdir_drop = {
     "name": "tv_mac_ipv4_frag_fdir_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv4 packet_id spec 0 packet_id last 0xffff packet_id mask 0xffff fragment_offset spec 0x2000 fragment_offset last 0x1fff fragment_offset mask 0xffff / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / end",
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"]
                   },
@@ -80,7 +79,7 @@ tv_mac_ipv4_frag_fdir_drop = {
 
 tv_mac_ipv4_frag_fdir_mark_rss = {
     "name": "tv_mac_ipv4_frag_fdir_mark_rss",
-    "rule": "flow create 0 ingress pattern eth / ipv4 packet_id spec 0 packet_id last 0xffff packet_id mask 0xffff fragment_offset spec 0x2000 fragment_offset last 0x1fff fragment_offset mask 0xffff / end actions mark / rss / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions mark / rss / end",
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"]
                   },
@@ -89,7 +88,7 @@ tv_mac_ipv4_frag_fdir_mark_rss = {
 
 tv_mac_ipv4_frag_fdir_mark = {
     "name": "tv_mac_ipv4_frag_fdir_mark",
-    "rule": "flow create 0 ingress pattern eth / ipv4 packet_id spec 0 packet_id last 0xffff packet_id mask 0xffff fragment_offset spec 0x2000 fragment_offset last 0x1fff fragment_offset mask 0xffff / end actions mark id 1 / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions mark id 1 / end",
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"]
                   },
@@ -106,12 +105,12 @@ tvs_mac_ipv4_fragment_fdir = [
 ]
 
 tvs_mac_ipv4_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv4_frag', 'mac_ipv4_frag_l3src')
-                                                     .replace('ipv4 packet_id', 'ipv4 src is 192.168.1.1 packet_id')
+                                                     .replace('ipv4 fragment_offset', 'ipv4 src is 192.168.1.1 fragment_offset')
                                                      .replace("IP(id=47750)", "IP(id=47750, src='192.168.1.1')"))
                                     for element in tvs_mac_ipv4_fragment_fdir]
 
 tvs_mac_ipv4_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv4_frag', 'mac_ipv4_frag_l3dst')
-                                                     .replace('ipv4 packet_id', 'ipv4 dst is 192.168.1.2 packet_id')
+                                                     .replace('ipv4 fragment_offset', 'ipv4 dst is 192.168.1.2 fragment_offset')
                                                      .replace("IP(id=47750)", "IP(id=47750, dst='192.168.1.2')"))
                                     for element in tvs_mac_ipv4_fragment_fdir]
 
@@ -119,7 +118,7 @@ tvs_mac_ipv4_frag_fdir_with_l3 = tvs_mac_ipv4_fragment_fdir_l3src + tvs_mac_ipv4
 
 tv_mac_ipv6_frag_fdir_queue_index = {
     "name": "tv_mac_ipv6_frag_fdir_queue_index",
-    "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext packet_id spec 0 packet_id last 0xffffffff packet_id mask 0xffffffff frag_data spec 0x0001 frag_data last 0xffff frag_data mask 0xffff / end actions queue index 1 / mark / end",
+    "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions queue index 1 / mark / end",
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"]
                   },
@@ -128,8 +127,7 @@ tv_mac_ipv6_frag_fdir_queue_index = {
 
 tv_mac_ipv6_frag_fdir_rss_queues = {
     "name": "tv_mac_ipv6_frag_fdir_rss_queues",
-    "rule": ["flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext packet_id spec 0 packet_id last 0xffffffff packet_id mask 0xffffffff frag_data spec 0x0001 frag_data last 0xffff frag_data mask 0xffff / end actions rss queues 2 3 end / mark / end",
-            "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end"],
+    "rule": ["flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions rss queues 2 3 end / mark / end",],
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"]
                   },
@@ -138,16 +136,16 @@ tv_mac_ipv6_frag_fdir_rss_queues = {
 
 tv_mac_ipv6_frag_fdir_passthru = {
     "name": "tv_mac_ipv6_frag_fdir_passthru",
-    "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext packet_id spec 0 packet_id last 0xffffffff packet_id mask 0xffffffff frag_data spec 0x0001 frag_data last 0xffff frag_data mask 0xffff / end actions passthru / mark / end",
+    "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions passthru / mark / end",
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"]
                   },
-    "check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 0}
+    "check_param": {"port_id": 0, "rxq": LAUNCH_QUEUE, "mark_id": 0, "rss": True}
 }
 
 tv_mac_ipv6_frag_fdir_drop = {
     "name": "tv_mac_ipv6_frag_fdir_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext packet_id spec 0 packet_id last 0xffffffff packet_id mask 0xffffffff frag_data spec 0x0001 frag_data last 0xffff frag_data mask 0xffff / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / end",
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"]
                   },
@@ -156,7 +154,7 @@ tv_mac_ipv6_frag_fdir_drop = {
 
 tv_mac_ipv6_frag_fdir_mark_rss = {
     "name": "tv_mac_ipv6_frag_fdir_mark_rss",
-    "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext packet_id spec 0 packet_id last 0xffffffff packet_id mask 0xffffffff frag_data spec 0x0001 frag_data last 0xffff frag_data mask 0xffff / end actions mark / rss / end",
+    "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions mark / rss / end",
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"]
                   },
@@ -165,7 +163,7 @@ tv_mac_ipv6_frag_fdir_mark_rss = {
 
 tv_mac_ipv6_frag_fdir_mark = {
     "name": "tv_mac_ipv6_frag_fdir_mark",
-    "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext packet_id spec 0 packet_id last 0xffffffff packet_id mask 0xffffffff frag_data spec 0x0001 frag_data last 0xffff frag_data mask 0xffff / end actions mark id 1 / end",
+    "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions mark id 1 / end",
     "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"],
                   "unmatched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"]
                   },
@@ -372,7 +370,7 @@ class TestCvlIavfIpFragmentRteFlow(TestCase):
         result_list = []
         rule_list_fdir = [
             'flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 / end actions queue index 1 / end',
-            'flow create 0 ingress pattern eth / ipv4 packet_id spec 0 packet_id last 0xffff packet_id mask 0xffff fragment_offset spec 0x2000 fragment_offset last 0x1fff fragment_offset mask 0xffff / end actions queue index 2 / end']
+            'flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / end']
         pkt_fdir = "Ether()/IP(src='192.168.0.20', id=47750)/Raw('X'*666)"
 
         self.logger.info('Subcase 1: exclusive validation fdir rule')
@@ -447,7 +445,7 @@ class TestCvlIavfIpFragmentRteFlow(TestCase):
         if hashes1[0] != hashes1[1] and hashes2[0] != hashes2[1]:
             result = False
             self.logger.error("hash value is incorrect")
-        if hashes1[0] != hashes2[0]:
+        if hashes1[0] == hashes2[0]:
             result = False
             self.logger.error("hash value is incorrect")
         result_list.append(result)
-- 
2.17.1


  reply	other threads:[~2021-07-28  6:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-28 15:03 [dts] [PATCH V1] test_plans/cvl_iavf_ip_fragment_rte_flow:simply ipfargment rule Zhimin Huang
2021-07-28 15:04 ` Zhimin Huang [this message]
2021-07-28  6:33   ` [dts] [PATCH V1] tests/cvl_iavf_ip_fragment_rte_flow:simply ipfragment rule Huang, ZhiminX
2021-08-04  2:21   ` Fu, Qi
2021-09-14  8:14     ` Tu, Lijuan
2021-08-04  2:23 ` [dts] [PATCH V1] test_plans/cvl_iavf_ip_fragment_rte_flow:simply ipfargment rule Fu, Qi
2021-09-13  4:39 ` Tu, Lijuan
2021-09-13  5:12   ` Huang, ZhiminX
2021-09-14  8:13     ` 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=20210728150400.31037-2-zhiminx.huang@intel.com \
    --to=zhiminx.huang@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).