test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V3] tests:add IPV4 and IPV6 non pipline switch filter srcript for CVL
@ 2020-01-19  8:05 zhiwei.he
  2020-01-19  8:31 ` Tu, Lijuan
  0 siblings, 1 reply; 2+ messages in thread
From: zhiwei.he @ 2020-01-19  8:05 UTC (permalink / raw)
  To: dts; +Cc: zhiwei.he

From: "zhiwei.he" <zhiwei.he@intel.com>

Signed-off-by: zhiwei.he <zhiwei.he@intel.com>
---
 tests/TestSuite_cvl_switch_filter.py | 247 +++++++++++++++++++++++++++++++++++
 1 file changed, 247 insertions(+)

diff --git a/tests/TestSuite_cvl_switch_filter.py b/tests/TestSuite_cvl_switch_filter.py
index 6d6e696..ffd9af4 100644
--- a/tests/TestSuite_cvl_switch_filter.py
+++ b/tests/TestSuite_cvl_switch_filter.py
@@ -2265,6 +2265,224 @@ tvs_mac_ipv6_tcp_pipeline_mode = [
     tv_mac_ipv6_tcp_pipeline_mode_drop_03
     ]
 
+tv_mac_ipv4_in_queue_01 = {
+    "name":"tv_mac_ipv4_in_queue_01",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 2 / end actions queue index 4 / end",
+    "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_in_queue,
+                             "param":{"expect_port":0, "expect_queues":4}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.9",dst="192.168.6.12",tos=4,ttl=2)/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
+                                "param":{"expect_port":0, "expect_queues":4}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv4_drop_queue_02 = {
+    "name":"tv_mac_ipv4_drop_queue_02",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.3 tos is 4 ttl is 2 / end actions drop / end",
+    "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3",tos=4,ttl=2)/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_drop,
+                             "param":{"expect_port":0, "expect_queues":"null"}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.5.6",dst="192.168.5.15",tos=2,ttl=5)/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
+                                "param":{"expect_port":0, "expect_queues":"null"}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv4_udp_in_queue_01 = {
+    "name":"tv_mac_ipv4_udp_in_queue_01",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions queue index 2 / end",
+    "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_in_queue,
+                             "param":{"expect_port":0, "expect_queues":2}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.6.56",dst="192.168.5.83",tos=2,ttl=1)/UDP(sport=20,dport=33)/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
+                                "param":{"expect_port":0, "expect_queues":2}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv4_udp_drop_queue_02 = {
+    "name":"tv_mac_ipv4_udp_drop_queue_02",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.3 tos is 4 / udp src is 25 dst is 23 / end actions drop / end",
+    "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3",tos=4)/UDP(sport=25,dport=23)/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_drop,
+                             "param":{"expect_port":0, "expect_queues":"null"}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:98")/IP(src="192.168.6.3",dst="192.168.8.5",tos=4)/UDP(sport=85,dport=62)/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
+                                "param":{"expect_port":0, "expect_queues":"null"}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv4_tcp_in_queue_01 = {
+    "name":"tv_mac_ipv4_tcp_in_queue_01",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.32 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 6 / end",
+    "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.32",tos=4)/TCP(sport=25,dport=23)/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_in_queue,
+                             "param":{"expect_port":0, "expect_queues":6}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.8.3",dst="192.168.15.26",tos=3)/UDP(sport=62,dport=88)/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
+                                "param":{"expect_port":0, "expect_queues":6}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv4_tcp_drop_queue_02 = {
+    "name":"tv_mac_ipv4_tcp_drop_queue_02",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.3 tos is 4 / tcp src is 25 dst is 23 / end actions drop / end",
+    "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_drop,
+                             "param":{"expect_port":0, "expect_queues":"null"}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.5.6",dst="192.168.5.5",tos=8)/UDP(sport=55,dport=36)/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
+                                "param":{"expect_port":0, "expect_queues":"null"}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv6_in_queue_01 = {
+    "name":"tv_mac_ipv6_in_queue_01",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 7 / end",
+    "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_in_queue,
+                             "param":{"expect_port":0, "expect_queues":7}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1111:3900:8220", dst="ABAB:910A:2222:5498:8475:1111:3900:1520")/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
+                                "param":{"expect_port":0, "expect_queues":7}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv6_drop_queue_02 = {
+    "name":"tv_mac_ipv6_drop_queue_02",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions drop / end",
+    "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_drop,
+                             "param":{"expect_port":0, "expect_queues":"null"}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1111:3900:8220", dst="ABAB:910A:2222:5498:8475:1111:3900:1520")/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
+                                "param":{"expect_port":0, "expect_queues":"null"}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+
+tv_mac_ipv6_frag_in_queue_01 = {
+    "name":"tv_mac_ipv6_frag_in_queue_01",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 7 / end",
+    "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_in_queue,
+                             "param":{"expect_port":0, "expect_queues":7}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1111:3900:8220", dst="ABAB:910A:2222:5498:8475:1111:3900:1520")/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
+                                "param":{"expect_port":0, "expect_queues":7}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv6_frag_drop_queue_02 = {
+    "name":"tv_mac_ipv6_frag_drop_queue_02",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions drop / end",
+    "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_drop,
+                             "param":{"expect_port":0, "expect_queues":"null"}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1111:3900:8220", dst="ABAB:910A:2222:5498:8475:1111:3900:1520")/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
+                                "param":{"expect_port":0, "expect_queues":"null"}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv6_udp_in_queue_01 = {
+    "name":"tv_mac_ipv6_udp_in_queue_01",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1518 / udp src is 25 dst is 23 / end actions queue index 7 / end",
+    "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518")/UDP(sport=25,dport=23)/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_in_queue,
+                             "param":{"expect_port":0, "expect_queues":7}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether()/IPv6(src="ABAB:910A:2222:5498:8475:1111:3900:1520")/UDP(sport=22,dport=12)/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
+                                "param":{"expect_port":0, "expect_queues":7}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv6_udp_drop_queue_02 = {
+    "name":"tv_mac_ipv6_udp_drop_queue_02",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1518 / udp src is 25 dst is 23 / end actions drop / end",
+    "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518")/UDP(sport=25,dport=23)/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_drop,
+                             "param":{"expect_port":0, "expect_queues":"null"}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1111:3900:8220")/UDP(sport=62,dport=11)/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
+                                "param":{"expect_port":0, "expect_queues":"null"}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv6_tcp_in_queue_01 = {
+    "name":"tv_mac_ipv6_tcp_in_queue_01",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1518 / tcp src is 25 dst is 23 / end actions queue index 7 / end",
+    "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518")/TCP(sport=25,dport=23)/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_in_queue,
+                             "param":{"expect_port":0, "expect_queues":7}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether()/IPv6(src="ABAB:910A:2222:5498:8475:1111:3900:1520")/UDP(sport=22,dport=12)/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
+                                "param":{"expect_port":0, "expect_queues":7}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tv_mac_ipv6_tcp_drop_queue_02 = {
+    "name":"tv_mac_ipv6_tcp_drop_queue_02",
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1518 / tcp src is 25 dst is 23 / end actions drop / end",
+    "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518")/TCP(sport=25,dport=23)/("X"*480)'],
+               "check_func":{"func":rfc.check_output_log_drop,
+                             "param":{"expect_port":0, "expect_queues":"null"}},
+               "expect_results":{"expect_pkts":1}},
+    "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1111:3900:8220")/TCP(sport=62,dport=11)/("X"*480)'],
+                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
+                                "param":{"expect_port":0, "expect_queues":"null"}},
+                  "expect_results":{"expect_pkts":1}}
+}
+
+tvs_mac_ipv4_non_pipeline_mode = [
+    tv_mac_ipv4_in_queue_01,
+    tv_mac_ipv4_drop_queue_02
+    ]
+
+tvs_mac_ipv4_udp_non_pipeline_mode = [
+    tv_mac_ipv4_udp_in_queue_01, 
+    tv_mac_ipv4_udp_drop_queue_02 
+    ]
+
+tvs_mac_ipv4_tcp_non_pipeline_mode = [
+    tv_mac_ipv4_tcp_in_queue_01,
+    tv_mac_ipv4_tcp_drop_queue_02
+    ]
+
+tvs_mac_ipv6_non_pipeline_mode = [
+    tv_mac_ipv6_in_queue_01,
+    tv_mac_ipv6_drop_queue_02
+    ]
+
+tvs_mac_ipv6_frag_non_pipeline_mode = [
+    tv_mac_ipv6_frag_in_queue_01, 
+    tv_mac_ipv6_frag_drop_queue_02
+    ]
+
+tvs_mac_ipv6_udp_non_pipeline_mode = [
+    tv_mac_ipv6_udp_in_queue_01,
+    tv_mac_ipv6_udp_drop_queue_02
+    ]
+
+tvs_mac_ipv6_tcp_non_pipeline_mode = [
+    tv_mac_ipv6_tcp_in_queue_01,
+    tv_mac_ipv6_tcp_drop_queue_02
+    ]
+
 test_results = OrderedDict()
 
 class SwitchFilterTest(TestCase):
@@ -2647,3 +2865,32 @@ class SwitchFilterTest(TestCase):
     def test_mac_ipv6_tcp_pipeline_mode(self):
         command = self.create_testpmd_command_pipeline_mode()
         self._rte_flow_validate_pattern(tvs_mac_ipv6_tcp_pipeline_mode, command, is_vxlan = False)
+
+    def test_mac_ipv4_non_pipeline_mode(self):
+        command = self.create_testpmd_command()
+        self._rte_flow_validate_pattern(tvs_mac_ipv4_non_pipeline_mode, command, is_vxlan = False)
+
+    def test_mac_ipv4_udp_non_pipeline_mode(self):
+        command = self.create_testpmd_command()
+        self._rte_flow_validate_pattern(tvs_mac_ipv4_udp_non_pipeline_mode, command, is_vxlan = False)
+
+    def test_mac_ipv4_tcp_non_pipeline_mode(self):
+        command = self.create_testpmd_command()
+        self._rte_flow_validate_pattern(tvs_mac_ipv4_tcp_non_pipeline_mode, command, is_vxlan = False)
+
+    def test_mac_ipv6_non_pipeline_mode(self):
+        command = self.create_testpmd_command()
+        self._rte_flow_validate_pattern(tvs_mac_ipv6_non_pipeline_mode, command, is_vxlan = False)
+
+    def test_mac_ipv6_frag_non_pipeline_mode(self):
+        command = self.create_testpmd_command()
+        self._rte_flow_validate_pattern(tvs_mac_ipv6_frag_non_pipeline_mode, command, is_vxlan = False)
+
+    def test_mac_ipv6_udp_non_pipeline_mode(self):
+        command = self.create_testpmd_command()
+        self._rte_flow_validate_pattern(tvs_mac_ipv6_udp_non_pipeline_mode, command, is_vxlan = False)
+
+    def test_mac_ipv6_tcp_non_pipeline_mode(self):
+        command = self.create_testpmd_command()
+        self._rte_flow_validate_pattern(tvs_mac_ipv6_tcp_non_pipeline_mode, command, is_vxlan = False)
+
-- 
1.8.3.1


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

* Re: [dts] [PATCH V3] tests:add IPV4 and IPV6 non pipline switch filter srcript for CVL
  2020-01-19  8:05 [dts] [PATCH V3] tests:add IPV4 and IPV6 non pipline switch filter srcript for CVL zhiwei.he
@ 2020-01-19  8:31 ` Tu, Lijuan
  0 siblings, 0 replies; 2+ messages in thread
From: Tu, Lijuan @ 2020-01-19  8:31 UTC (permalink / raw)
  To: He, Zhiwei, dts; +Cc: He, Zhiwei

applied

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of zhiwei.he
> Sent: Sunday, January 19, 2020 4:06 PM
> To: dts@dpdk.org
> Cc: He, Zhiwei <zhiwei.he@intel.com>
> Subject: [dts] [PATCH V3] tests:add IPV4 and IPV6 non pipline switch filter
> srcript for CVL
> 
> From: "zhiwei.he" <zhiwei.he@intel.com>
> 
> Signed-off-by: zhiwei.he <zhiwei.he@intel.com>
> ---
>  tests/TestSuite_cvl_switch_filter.py | 247
> +++++++++++++++++++++++++++++++++++
>  1 file changed, 247 insertions(+)
> 
> diff --git a/tests/TestSuite_cvl_switch_filter.py
> b/tests/TestSuite_cvl_switch_filter.py
> index 6d6e696..ffd9af4 100644
> --- a/tests/TestSuite_cvl_switch_filter.py
> +++ b/tests/TestSuite_cvl_switch_filter.py
> @@ -2265,6 +2265,224 @@ tvs_mac_ipv6_tcp_pipeline_mode = [
>      tv_mac_ipv6_tcp_pipeline_mode_drop_03
>      ]
> 
> +tv_mac_ipv4_in_queue_01 = {
> +    "name":"tv_mac_ipv4_in_queue_01",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is
> 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 2 /
> end actions queue index 4 / end",
> +
> "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1
> ",dst="192.168.0.2",tos=4,ttl=2)/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_in_queue,
> +                             "param":{"expect_port":0, "expect_queues":4}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.
> 9",dst="192.168.6.12",tos=4,ttl=2)/("X"*480)'],
> +
> "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":4}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv4_drop_queue_02 = {
> +    "name":"tv_mac_ipv4_drop_queue_02",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is
> 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.3 tos is 4 ttl is 2 /
> end actions drop / end",
> +
> "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1
> ",dst="192.168.0.3",tos=4,ttl=2)/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_drop,
> +                             "param":{"expect_port":0, "expect_queues":"null"}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.
> 5.6",dst="192.168.5.15",tos=2,ttl=5)/("X"*480)'],
> +                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":"null"}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv4_udp_in_queue_01 = {
> +    "name":"tv_mac_ipv4_udp_in_queue_01",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is
> 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 /
> udp src is 25 dst is 23 / end actions queue index 2 / end",
> +
> "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1
> ",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_in_queue,
> +                             "param":{"expect_port":0, "expect_queues":2}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.
> 6.56",dst="192.168.5.83",tos=2,ttl=1)/UDP(sport=20,dport=33)/("X"*480)'],
> +
> "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":2}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv4_udp_drop_queue_02 = {
> +    "name":"tv_mac_ipv4_udp_drop_queue_02",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is
> 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.3 tos is 4 / udp src
> is 25 dst is 23 / end actions drop / end",
> +
> "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1
> ",dst="192.168.0.3",tos=4)/UDP(sport=25,dport=23)/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_drop,
> +                             "param":{"expect_port":0, "expect_queues":"null"}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:98")/IP(src="192.168.
> 6.3",dst="192.168.8.5",tos=4)/UDP(sport=85,dport=62)/("X"*480)'],
> +                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":"null"}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv4_tcp_in_queue_01 = {
> +    "name":"tv_mac_ipv4_tcp_in_queue_01",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is
> 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.32 tos is 4 / tcp src
> is 25 dst is 23 / end actions queue index 6 / end",
> +
> "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1
> ",dst="192.168.0.32",tos=4)/TCP(sport=25,dport=23)/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_in_queue,
> +                             "param":{"expect_port":0, "expect_queues":6}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.
> 8.3",dst="192.168.15.26",tos=3)/UDP(sport=62,dport=88)/("X"*480)'],
> +
> "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":6}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv4_tcp_drop_queue_02 = {
> +    "name":"tv_mac_ipv4_tcp_drop_queue_02",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is
> 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.3 tos is 4 / tcp src
> is 25 dst is 23 / end actions drop / end",
> +
> "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1
> ",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_drop,
> +                             "param":{"expect_port":0, "expect_queues":"null"}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.
> 5.6",dst="192.168.5.5",tos=8)/UDP(sport=55,dport=36)/("X"*480)'],
> +                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":"null"}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv6_in_queue_01 = {
> +    "name":"tv_mac_ipv6_in_queue_01",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is
> CDCD:910A:2222:5498:8475:1111:3900:1536 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 7 /
> end",
> +
> "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111
> :3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_in_queue,
> +                             "param":{"expect_port":0, "expect_queues":7}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1
> 111:3900:8220",
> dst="ABAB:910A:2222:5498:8475:1111:3900:1520")/("X"*480)'],
> +
> "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":7}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv6_drop_queue_02 = {
> +    "name":"tv_mac_ipv6_drop_queue_02",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is
> CDCD:910A:2222:5498:8475:1111:3900:1536 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions drop / end",
> +
> "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111
> :3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_drop,
> +                             "param":{"expect_port":0, "expect_queues":"null"}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1
> 111:3900:8220",
> dst="ABAB:910A:2222:5498:8475:1111:3900:1520")/("X"*480)'],
> +                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":"null"}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +
> +tv_mac_ipv6_frag_in_queue_01 = {
> +    "name":"tv_mac_ipv6_frag_in_queue_01",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is
> CDCD:910A:2222:5498:8475:1111:3900:1536 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 7 /
> end",
> +
> "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111
> :3900:1536",
> dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("
> X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_in_queue,
> +                             "param":{"expect_port":0, "expect_queues":7}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1
> 111:3900:8220",
> dst="ABAB:910A:2222:5498:8475:1111:3900:1520")/("X"*480)'],
> +
> "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":7}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv6_frag_drop_queue_02 = {
> +    "name":"tv_mac_ipv6_frag_drop_queue_02",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is
> CDCD:910A:2222:5498:8475:1111:3900:1536 dst is
> CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions drop / end",
> +
> "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111
> :3900:1536",
> dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("
> X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_drop,
> +                             "param":{"expect_port":0, "expect_queues":"null"}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1
> 111:3900:8220",
> dst="ABAB:910A:2222:5498:8475:1111:3900:1520")/("X"*480)'],
> +                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":"null"}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv6_udp_in_queue_01 = {
> +    "name":"tv_mac_ipv6_udp_in_queue_01",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is
> CDCD:910A:2222:5498:8475:1111:3900:1518 / udp src is 25 dst is 23 / end
> actions queue index 7 / end",
> +
> "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111
> :3900:1518")/UDP(sport=25,dport=23)/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_in_queue,
> +                             "param":{"expect_port":0, "expect_queues":7}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether()/IPv6(src="ABAB:910A:2222:5498:8475:1
> 111:3900:1520")/UDP(sport=22,dport=12)/("X"*480)'],
> +
> "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":7}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv6_udp_drop_queue_02 = {
> +    "name":"tv_mac_ipv6_udp_drop_queue_02",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is
> CDCD:910A:2222:5498:8475:1111:3900:1518 / udp src is 25 dst is 23 / end
> actions drop / end",
> +
> "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111
> :3900:1518")/UDP(sport=25,dport=23)/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_drop,
> +                             "param":{"expect_port":0, "expect_queues":"null"}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1
> 111:3900:8220")/UDP(sport=62,dport=11)/("X"*480)'],
> +                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":"null"}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv6_tcp_in_queue_01 = {
> +    "name":"tv_mac_ipv6_tcp_in_queue_01",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is
> CDCD:910A:2222:5498:8475:1111:3900:1518 / tcp src is 25 dst is 23 / end
> actions queue index 7 / end",
> +
> "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111
> :3900:1518")/TCP(sport=25,dport=23)/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_in_queue,
> +                             "param":{"expect_port":0, "expect_queues":7}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether()/IPv6(src="ABAB:910A:2222:5498:8475:1
> 111:3900:1520")/UDP(sport=22,dport=12)/("X"*480)'],
> +
> "check_func":{"func":rfc.check_output_log_in_queue_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":7}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tv_mac_ipv6_tcp_drop_queue_02 = {
> +    "name":"tv_mac_ipv6_tcp_drop_queue_02",
> +    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is
> CDCD:910A:2222:5498:8475:1111:3900:1518 / tcp src is 25 dst is 23 / end
> actions drop / end",
> +
> "matched":{"scapy_str":['Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111
> :3900:1518")/TCP(sport=25,dport=23)/("X"*480)'],
> +               "check_func":{"func":rfc.check_output_log_drop,
> +                             "param":{"expect_port":0, "expect_queues":"null"}},
> +               "expect_results":{"expect_pkts":1}},
> +
> "mismatched":{"scapy_str":['Ether()/IPv6(src="BCBC:910A:2222:5498:8475:1
> 111:3900:8220")/TCP(sport=62,dport=11)/("X"*480)'],
> +                  "check_func":{"func":rfc.check_output_log_drop_mismatched,
> +                                "param":{"expect_port":0, "expect_queues":"null"}},
> +                  "expect_results":{"expect_pkts":1}}
> +}
> +
> +tvs_mac_ipv4_non_pipeline_mode = [
> +    tv_mac_ipv4_in_queue_01,
> +    tv_mac_ipv4_drop_queue_02
> +    ]
> +
> +tvs_mac_ipv4_udp_non_pipeline_mode = [
> +    tv_mac_ipv4_udp_in_queue_01,
> +    tv_mac_ipv4_udp_drop_queue_02
> +    ]
> +
> +tvs_mac_ipv4_tcp_non_pipeline_mode = [
> +    tv_mac_ipv4_tcp_in_queue_01,
> +    tv_mac_ipv4_tcp_drop_queue_02
> +    ]
> +
> +tvs_mac_ipv6_non_pipeline_mode = [
> +    tv_mac_ipv6_in_queue_01,
> +    tv_mac_ipv6_drop_queue_02
> +    ]
> +
> +tvs_mac_ipv6_frag_non_pipeline_mode = [
> +    tv_mac_ipv6_frag_in_queue_01,
> +    tv_mac_ipv6_frag_drop_queue_02
> +    ]
> +
> +tvs_mac_ipv6_udp_non_pipeline_mode = [
> +    tv_mac_ipv6_udp_in_queue_01,
> +    tv_mac_ipv6_udp_drop_queue_02
> +    ]
> +
> +tvs_mac_ipv6_tcp_non_pipeline_mode = [
> +    tv_mac_ipv6_tcp_in_queue_01,
> +    tv_mac_ipv6_tcp_drop_queue_02
> +    ]
> +
>  test_results = OrderedDict()
> 
>  class SwitchFilterTest(TestCase):
> @@ -2647,3 +2865,32 @@ class SwitchFilterTest(TestCase):
>      def test_mac_ipv6_tcp_pipeline_mode(self):
>          command = self.create_testpmd_command_pipeline_mode()
>          self._rte_flow_validate_pattern(tvs_mac_ipv6_tcp_pipeline_mode,
> command, is_vxlan = False)
> +
> +    def test_mac_ipv4_non_pipeline_mode(self):
> +        command = self.create_testpmd_command()
> +        self._rte_flow_validate_pattern(tvs_mac_ipv4_non_pipeline_mode,
> command, is_vxlan = False)
> +
> +    def test_mac_ipv4_udp_non_pipeline_mode(self):
> +        command = self.create_testpmd_command()
> +
> self._rte_flow_validate_pattern(tvs_mac_ipv4_udp_non_pipeline_mode,
> command, is_vxlan = False)
> +
> +    def test_mac_ipv4_tcp_non_pipeline_mode(self):
> +        command = self.create_testpmd_command()
> +        self._rte_flow_validate_pattern(tvs_mac_ipv4_tcp_non_pipeline_mode,
> command, is_vxlan = False)
> +
> +    def test_mac_ipv6_non_pipeline_mode(self):
> +        command = self.create_testpmd_command()
> +        self._rte_flow_validate_pattern(tvs_mac_ipv6_non_pipeline_mode,
> command, is_vxlan = False)
> +
> +    def test_mac_ipv6_frag_non_pipeline_mode(self):
> +        command = self.create_testpmd_command()
> +
> self._rte_flow_validate_pattern(tvs_mac_ipv6_frag_non_pipeline_mode,
> command, is_vxlan = False)
> +
> +    def test_mac_ipv6_udp_non_pipeline_mode(self):
> +        command = self.create_testpmd_command()
> +
> self._rte_flow_validate_pattern(tvs_mac_ipv6_udp_non_pipeline_mode,
> command, is_vxlan = False)
> +
> +    def test_mac_ipv6_tcp_non_pipeline_mode(self):
> +        command = self.create_testpmd_command()
> +        self._rte_flow_validate_pattern(tvs_mac_ipv6_tcp_non_pipeline_mode,
> command, is_vxlan = False)
> +
> --
> 1.8.3.1


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

end of thread, other threads:[~2020-01-19  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-19  8:05 [dts] [PATCH V3] tests:add IPV4 and IPV6 non pipline switch filter srcript for CVL zhiwei.he
2020-01-19  8:31 ` Tu, Lijuan

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