test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1 1/2] tests/cvl_fdir: modify the priority of switch and fdir and length of qfi
@ 2021-10-19 17:55 Zou Ping
  2021-10-19 17:55 ` [dts] [PATCH V1 2/2] test_plans/cvl_fdir: modify " Zou Ping
  0 siblings, 1 reply; 2+ messages in thread
From: Zou Ping @ 2021-10-19 17:55 UTC (permalink / raw)
  To: dts; +Cc: Zou Ping

the priority of switch and fdir changed,length of qfi change.
modified influenced rules and deleted unsupported rules.

Signed-off-by: Zou Ping <pingx.zou@intel.com>
---
 tests/TestSuite_cvl_fdir.py | 80 ++++++++++++++++++-------------------
 1 file changed, 38 insertions(+), 42 deletions(-)

diff --git a/tests/TestSuite_cvl_fdir.py b/tests/TestSuite_cvl_fdir.py
index 541599fe..d7aa4a55 100644
--- a/tests/TestSuite_cvl_fdir.py
+++ b/tests/TestSuite_cvl_fdir.py
@@ -30,18 +30,17 @@
 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
-import re
-import time
 import copy
 import os
+import re
+import time
 
-from packet import Packet
-from pmd_output import PmdOutput
-from test_case import TestCase, skip_unsupported_pkg
-import rte_flow_common as rfc
-
-from utils import GREEN, RED
-import utils
+import framework.utils as utils
+import tests.rte_flow_common as rfc
+from framework.packet import Packet
+from framework.pmd_output import PmdOutput
+from framework.test_case import TestCase, skip_unsupported_pkg
+from framework.utils import GREEN, RED
 
 MAC_IPV4_PAY = {
     "match": [
@@ -399,7 +398,7 @@ tv_mac_ipv4_pay_passthru = {
 
 tv_mac_ipv4_pay_drop = {
     "name": "test_mac_ipv4_pay_drop",
-    "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions drop / mark / end",
     "scapy_str": MAC_IPV4_PAY,
     "check_func": rfc.check_mark,
     "check_param": {"port_id": 0, "drop": True}
@@ -450,7 +449,7 @@ tv_mac_ipv4_udp_passthru = {
 
 tv_mac_ipv4_udp_drop = {
     "name": "test_mac_ipv4_udp_drop",
-    "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions drop / mark / end",
     "scapy_str": MAC_IPV4_UDP,
     "check_func": rfc.check_mark,
     "check_param": {"port_id": 0, "drop": True}
@@ -992,7 +991,7 @@ tv_mac_ipv4_tun_mac_ipv4_pay_passthru = {
 
 tv_mac_ipv4_tun_mac_ipv4_pay_drop = {
     "name": "test_mac_ipv4_tun_mac_ipv4_pay_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / mark / end",
     "scapy_str": MAC_IPV4_TUN_IPV4_PAY_MAC_IPV4_TUN_MAC_IPV4_PAY,
     "check_func": rfc.check_mark,
     "check_param": {"port_id": 0, "drop": True}
@@ -1459,7 +1458,7 @@ tv_mac_ipv4_gtpu_passthru = {
 
 tv_mac_ipv4_gtpu_drop = {
     "name": "test_mac_ipv4_gtpu_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions drop / mark / end",
     "scapy_str": MAC_IPV4_GTPU,
     "check_func": rfc.check_mark,
     "check_param": {"port_id": 0, "drop": True}
@@ -1507,7 +1506,7 @@ tv_mac_ipv4_gtpu_3tuple_passthru = {
 
 tv_mac_ipv4_gtpu_3tuple_drop = {
     "name": "test_mac_ipv4_gtpu_3tuple_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / gtpu teid is 0x12345678 / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / gtpu teid is 0x12345678 / end actions drop / mark / end",
     "scapy_str": MAC_IPV4_GTPU,
     "check_func": rfc.check_mark,
     "check_param": {"port_id": 0, "drop": True}
@@ -1562,7 +1561,7 @@ tv_mac_ipv4_gtpu_dstip_passthru = {
 
 tv_mac_ipv4_gtpu_dstip_drop = {
     "name": "test_mac_ipv4_gtpu_dstip_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp / gtpu / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp / gtpu / end actions drop / mark / end",
     "scapy_str": {"match":
         [
             'Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.21", dst="192.168.0.21")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/IPv6()/TCP()/Raw("x"*20)'],
@@ -1627,7 +1626,7 @@ tv_mac_ipv4_gtpu_srcip_passthru = {
 
 tv_mac_ipv4_gtpu_srcip_drop = {
     "name": "test_mac_ipv4_gtpu_srcip_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 / udp / gtpu / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 / udp / gtpu / end actions drop / mark / end",
     "scapy_str": {"match":
         [
             'Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IP(src="192.168.0.20", dst="192.168.0.22")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/IPv6()/UDP()/Raw("x"*20)'],
@@ -1925,7 +1924,7 @@ tv_mac_ipv6_gtpu_dstip_passthru = {
 
 tv_mac_ipv6_gtpu_dstip_drop = {
     "name": "test_mac_ipv6_gtpu_dstip_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp / gtpu / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp / gtpu / end actions drop / mark / end",
     "scapy_str": {"match":
         [
             'Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IPv6(src="2001::3", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/IPv6()/IPv6ExtHdrFragment()/Raw("x"*20)'],
@@ -1990,7 +1989,7 @@ tv_mac_ipv6_gtpu_srcip_passthru = {
 
 tv_mac_ipv6_gtpu_srcip_drop = {
     "name": "test_mac_ipv6_gtpu_srcip_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv6 src is 2001::2 / udp / gtpu / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv6 src is 2001::2 / udp / gtpu / end actions drop / mark / end",
     "scapy_str": {"match":
         [
             'Ether(src="a4:bf:01:51:27:ca", dst="00:11:22:33:44:55")/IPv6(src="2001::2", dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x1234567)/IPv6()/TCP(sport=22, dport=23)/Raw("x"*20)'],
@@ -2137,11 +2136,11 @@ tv_l2_ethertype_mark = {
 tv_l2_ethertype_drop = {
     "name": "test_l2_ethertype_drop",
     "rule": [
-        "flow create 0 ingress pattern eth type is 0x8863 / end actions drop / end",
-        "flow create 0 ingress pattern eth type is 0x8864 / end actions drop / end",
-        "flow create 0 ingress pattern eth type is 0x0806 / end actions drop / end",
-        "flow create 0 ingress pattern eth type is 0x8100 / end actions drop / end",
-        "flow create 0 ingress pattern eth type is 0x88f7 / end actions drop / end"],
+        "flow create 0 ingress pattern eth type is 0x8863 / end actions drop / mark / end",
+        "flow create 0 ingress pattern eth type is 0x8864 / end actions drop / mark / end",
+        "flow create 0 ingress pattern eth type is 0x0806 / end actions drop / mark / end",
+        "flow create 0 ingress pattern eth type is 0x8100 / end actions drop / mark / end",
+        "flow create 0 ingress pattern eth type is 0x88f7 / end actions drop / mark / end"],
     "scapy_str": L2_Ethertype,
     "check_param": [
         {"port_id": 0, "drop": 1},
@@ -2195,7 +2194,7 @@ tv_mac_ipv4_esp_passthru = {
 
 tv_mac_ipv4_esp_drop = {
     "name": "tv_mac_ipv4_esp_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / esp spi is 7 / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / esp spi is 7 / end actions drop / mark / end",
     "scapy_str": {"match": MAC_IPV4_ESP['matched'],
                   "unmatched": MAC_IPV4_ESP['unmatched'],
                   },
@@ -2333,7 +2332,7 @@ tv_mac_ipv4_nat_t_esp_passthru = {
 
 tv_mac_ipv4_nat_t_esp_drop = {
     "name": "tv_mac_ipv4_nat_t_esp_drop",
-    "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / esp spi is 7 / end actions drop / end",
+    "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / esp spi is 7 / end actions drop / mark / end",
     "scapy_str": {"match": MAC_IPV4_NAT_T_ESP['matched'],
                   "unmatched": MAC_IPV4_NAT_T_ESP['unmatched'],
                   },
@@ -2748,9 +2747,6 @@ class TestCVLFdir(TestCase):
         self.validate_fdir_rule(
             'flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions rss queues 63 64 end / end',
             check_stats=False, check_msg='Invalid argument')
-        self.validate_fdir_rule(
-            'flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x100 / end actions queue index 1 / end',
-            check_stats=False, check_msg='Bad arguments')
         self.validate_fdir_rule(
             'flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / gtp_psc qfi is 0x5 / end actions queue index 2 / end',
             check_stats=False, check_msg='Bad arguments')
@@ -2917,7 +2913,6 @@ class TestCVLFdir(TestCase):
 
     def test_invalid_parameters_of_input_set(self):
         rule = [
-            "flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x100 / end actions queue index 1 / end",
             "flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / gtp_psc qfi is 0x5 / end actions queue index 2 / end",
             "flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / end actions queue index 1 / end"
         ]
@@ -2930,19 +2925,19 @@ class TestCVLFdir(TestCase):
         self.check_fdir_rule(stats=False)
 
     def test_duplicated_rules(self):
-        rule = "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end"
+        rule = "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / mark / end"
         rule_li = self.create_fdir_rule(rule, check_stats=True)
         self.create_fdir_rule(rule, check_stats=False, msg="Rule already exists!: File exists", validate=False)
         self.check_fdir_rule(stats=True, rule_list=rule_li)
 
     def test_conflicted_rules(self):
         rule1 = [
-            'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end',
+            'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / mark / end',
             'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions queue index 1 / mark / end']
         rule_li = self.create_fdir_rule(rule1, check_stats=True)
         rule2 = [
-            "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 2 / end",
-            "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions drop / end",
+            "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 2 / mark / end",
+            "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions drop / mark / end",
             'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions queue index 2 / mark / end',
             'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions rss queues 2 3 end / mark / end',
             'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 3 / mark / end',
@@ -2950,8 +2945,7 @@ class TestCVLFdir(TestCase):
             'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2021 / end actions mark / end',
             'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / udp src is 22 dst is 23 / end actions queue index 1 / mark / end']
         self.create_fdir_rule(rule2[0:4], check_stats=False, msg="Rule already exists!: File exists", validate=False)
-        self.create_fdir_rule(rule2[4:7], check_stats=False, msg="error", validate=False)
-        self.create_fdir_rule(rule2[7:], check_stats=False, msg="Invalid input set: Invalid argument", validate=False)
+        self.create_fdir_rule(rule2[4:], check_stats=False, msg="error", validate=False)
         self.check_fdir_rule(stats=True, rule_list=rule_li)
 
     def test_conflicted_actions(self):
@@ -3001,29 +2995,31 @@ class TestCVLFdir(TestCase):
         switch_flag = "ice_flow_create(): Succeeded to create (2) flow"
         pkts = ['Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/Raw("x" * 80)',
                 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21") /UDP(sport=22, dport=23)/ Raw("x" * 80)']
-        rule1 = 'flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions queue index 1 / end'
+        rule1 = 'flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions queue index 1 / mark id 1 / end'
         out = self.pmd_output.execute_cmd(rule1)
         self.verify(fdir_flag in out, "fdir rule should be created")
         out = self.send_pkts_getouput(pkts=pkts)
-        rfc.check_mark(out, pkt_num=2, check_param={"port_id": 0, "queue": 1}, stats=True)
+        rfc.check_mark(out, pkt_num=2, check_param={"port_id": 0, "queue": 1,"mark_id":1}, stats=True)
 
         rule2 = "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 2 / end"
         out = self.pmd_output.execute_cmd(rule2)
         self.verify(switch_flag in out, "switch rule should be created")
         out = self.send_pkts_getouput(pkts=pkts[0])
-        rfc.check_mark(out, pkt_num=1, check_param={"port_id": 0, "queue": 1}, stats=True)
+        rfc.check_mark(out, pkt_num=1, check_param={"port_id": 0, "queue": 1,"mark_id":1}, stats=True)
         out = self.send_pkts_getouput(pkts=pkts[1])
         rfc.check_mark(out, pkt_num=1, check_param={"port_id": 0, "queue": 2}, stats=True)
 
+        rule3 = "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 2 / mark id 1 / end"
+        rule4 = "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions queue index 1 / end"
         self.pmd_output.execute_cmd('flow flush 0')
-        out = self.pmd_output.execute_cmd(rule2)
+        out = self.pmd_output.execute_cmd(rule3)
         self.verify(fdir_flag in out, "fdir rule should be created")
         out = self.send_pkts_getouput(pkts=pkts[1])
-        rfc.check_mark(out, pkt_num=1, check_param={"port_id": 0, "queue": 2}, stats=True)
-        out = self.pmd_output.execute_cmd(rule1)
+        rfc.check_mark(out, pkt_num=1, check_param={"port_id": 0, "queue": 2,"mark_id":1}, stats=True)
+        out = self.pmd_output.execute_cmd(rule4)
         self.verify(switch_flag in out, "switch rule should be created")
         out = self.send_pkts_getouput(pkts=pkts[1])
-        rfc.check_mark(out, pkt_num=1, check_param={"port_id": 0, "queue": 1}, stats=True)
+        rfc.check_mark(out, pkt_num=1, check_param={"port_id": 0, "queue": 1,"mark_id":1}, stats=True)
 
     def test_count_for_1_rule(self):
         rule = ["flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / count / end",
-- 
2.18.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [dts] [PATCH V1 2/2] test_plans/cvl_fdir: modify priority of switch and fdir and length of qfi
  2021-10-19 17:55 [dts] [PATCH V1 1/2] tests/cvl_fdir: modify the priority of switch and fdir and length of qfi Zou Ping
@ 2021-10-19 17:55 ` Zou Ping
  0 siblings, 0 replies; 2+ messages in thread
From: Zou Ping @ 2021-10-19 17:55 UTC (permalink / raw)
  To: dts; +Cc: Zou Ping

the priority of switch and fdir changed,length of qfi change.
modified influenced rules and deleted unsupported rules.

Signed-off-by: Zou Ping <pingx.zou@intel.com>
---
 test_plans/cvl_fdir_test_plan.rst | 42 +++++++++++++++----------------
 1 file changed, 20 insertions(+), 22 deletions(-)

diff --git a/test_plans/cvl_fdir_test_plan.rst b/test_plans/cvl_fdir_test_plan.rst
index 64d06f1b..f1d138b7 100644
--- a/test_plans/cvl_fdir_test_plan.rst
+++ b/test_plans/cvl_fdir_test_plan.rst
@@ -682,7 +682,6 @@ Note: there may be error message change.
 
 7. Invalid value of input set::
 
-    flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x100 / end actions queue index 1 / end
     flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / gtp_psc qfi is 0x5 / end actions queue index 2 / end
     flow validate 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / end actions queue index 1 / end
 
@@ -773,7 +772,7 @@ Subcase 4: MAC_IPV4_PAY drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions drop / end
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 proto is 255 ttl is 2 tos is 4 / end actions drop / mark / end
 
 2. send matched packets, check the packets are dropped
    send unmatched packets, check the packets are not dropped.
@@ -903,7 +902,7 @@ Subcase 4: MAC_IPV4_UDP drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions drop / end
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions drop / mark / end
 
 2. send matched packet, check the packet is dropped.
    send unmatched packets, check the packets are not dropped.
@@ -1431,7 +1430,7 @@ Subcase 4: MAC_IPV4_TUN_MAC_IPV4_PAY drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / end
+    flow create 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / end actions drop / mark / end
 
 2. send matched packets, check the packets are dropped.
    send unmatched packets, check the packets are not dropped.
@@ -2014,7 +2013,7 @@ Subcase 4: MAC_IPV4_GTPU drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions drop / end
+    flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / end actions drop / mark / end
 
 2. send matched packets, check the packets are dropped.
    send unmatched packets, check the packets are not dropped.
@@ -2106,7 +2105,7 @@ Subcase 10: MAC_IPV4_GTPU 3 tuple drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / gtpu teid is 0x12345678  / end actions drop / end
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / gtpu teid is 0x12345678  / end actions drop / mark / end
 
 2. send matched packets, check the packets are dropped.
    send unmatched packets, check the packets are not dropped without FDIR matched ID.
@@ -2181,7 +2180,7 @@ Subcase 15: MAC_IPV4_GTPU outer dst ip drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp / gtpu / end actions drop / end
+    flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp / gtpu / end actions drop / mark / end
 
 2. send matched packets, check the packets are dropped.
    send unmatched packets, check the packets are not dropped without FDIR matched ID.
@@ -2261,7 +2260,7 @@ Subcase 20: MAC_IPV4_GTPU outer src ip drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 / udp / gtpu  / end actions drop / end
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 / udp / gtpu  / end actions drop / mark / end
 
 2. send matched packets, check the packets are dropped.
    send unmatched packets, check the packets are not dropped without FDIR matched ID.
@@ -2673,7 +2672,7 @@ Subcase 9: MAC_IPV6_GTPU outer dst ipv6 drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth /  ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp / gtpu / end actions drop / end
+    flow create 0 ingress pattern eth /  ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp / gtpu / end actions drop / mark / end
 
 2. send matched packets, check the packets are dropped.
    send unmatched packets, check the packets are not dropped without FDIR matched ID.
@@ -2753,7 +2752,7 @@ Subcase 14: MAC_IPV6_GTPU outer src ipv6 drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth / ipv6 src is 2001::2 / udp / gtpu / end actions drop / end
+    flow create 0 ingress pattern eth / ipv6 src is 2001::2 / udp / gtpu / end actions drop / mark / end
 
 2. send matched packets, check the packets are dropped.
    send unmatched packets, check the packets are not dropped without FDIR matched ID.
@@ -2882,7 +2881,7 @@ Subcase 4: L2 Ethertype drop
 
 1. create rules for PPPoED with drop action::
 
-    flow create 0 ingress pattern eth type is 0x8863 / end actions drop / end
+    flow create 0 ingress pattern eth type is 0x8863 / end actions drop / mark / end
 
 2. send matched packet,
    check the packets are dropped,
@@ -3008,7 +3007,7 @@ Subcase 4: MAC_IPV4_ESP drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / esp spi is 7 / end actions drop / end
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / esp spi is 7 / end actions drop / mark / end
 
 2. send matched packets, check the packets are dropped
    send mismatched packets, check the packets are not dropped.
@@ -3208,7 +3207,7 @@ Subcase 4: MAC_IPV4_NAT-T-ESP drop
 
 1. create filter rules::
 
-    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / esp spi is 7 / end actions drop / end
+    flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 / udp / esp spi is 7 / end actions drop / mark / end
 
 2. send matched packets, check the packets are dropped
    send mismatched packets, check the packets are not dropped.
@@ -3414,7 +3413,6 @@ Subcase 3: Invalid parameters of input set
 
 1. Invalid value of teid and qfi::
 
-    flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x100 / end actions queue index 1 / end
     flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / gtp_psc qfi is 0x5 / end actions queue index 2 / end
     flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x100000000 / end actions queue index 1 / end
 
@@ -3438,7 +3436,7 @@ Subcase 5: Duplicated rules
 
 1. Create a FDIR rule::
 
-    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / mark / end
 
    the rule is created successfully.
 
@@ -3453,15 +3451,15 @@ Subcase 6: conflicted rules
 
 1. Create a FDIR rule::
 
-    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / mark / end
     flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions queue index 1 / mark / end
 
    the rule is created successfully.
 
 2. Create a rule with same input set but different action or with different input set::
 
-    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 2 / end
-    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions drop / end
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 2 / mark / end
+    flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions drop / mark / end
     flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 3 / mark / end
     flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / udp src is 22 dst is 23 / end actions queue index 3 / mark / end
     flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is 2001::2 / end actions queue index 2 / mark / end
@@ -3583,14 +3581,14 @@ set "--log-level=ice,7", then check::
 
 1. set MAC_IPV4_PAY rule firstly::
 
-    flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions queue index 1 / end
+    flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions queue index 1 / mark id 1 / end
 
    the first flow rule is set to fdir filter, send matched packet::
 
     sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/Raw('x' * 80)],iface="enp175s0f0", count=10)
     sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21") /UDP(sport=22, dport=23)/ Raw('x' * 80)],iface="enp175s0f0", count=10)
 
-   the two packets are both redirected to queue 1.
+   the two packets are both redirected to queue 1 with mark ID 1.
    then create MAC_IPV4_UDP flow, it is set to switch filter::
 
     flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 2 / end
@@ -3601,13 +3599,13 @@ set "--log-level=ice,7", then check::
 
 3. set MAC_IPV4_UDP rule firstly::
 
-    flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 2 / end
+    flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions queue index 2 / mark id 1 / end
 
    the first rule is set to fdir filter, send matched packet::
 
     sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21") /UDP(sport=22, dport=23)/ Raw('x' * 80)],iface="enp175s0f0", count=10)
 
-   the packet is redirected to queue 2.
+   the packet is redirected to queue 2 with mark ID 1.
    then create MAC_IPV4_PAY rule, it is set to switch filter::
 
     flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / end actions queue index 1 / end
-- 
2.18.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-19  9:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-19 17:55 [dts] [PATCH V1 1/2] tests/cvl_fdir: modify the priority of switch and fdir and length of qfi Zou Ping
2021-10-19 17:55 ` [dts] [PATCH V1 2/2] test_plans/cvl_fdir: modify " Zou Ping

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).