test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH V1]tests/: add test suite for cvl dcf rte flow priority
@ 2021-06-01 17:02 qifu
  0 siblings, 0 replies; only message in thread
From: qifu @ 2021-06-01 17:02 UTC (permalink / raw)
  To: dts; +Cc: qifu

add dpdk-21.05 new feature test suite: TestSuite_cvl_dcf_flow_priority.py
this feature support add priority 0/1 for dcf switch filter rules.

Signed-off-by: qifu <qi.fu@intel.com>
---
 tests/TestSuite_cvl_dcf_flow_priority.py | 1771 ++++++++++++++++++++++
 1 file changed, 1771 insertions(+)
 create mode 100644 tests/TestSuite_cvl_dcf_flow_priority.py

diff --git a/tests/TestSuite_cvl_dcf_flow_priority.py b/tests/TestSuite_cvl_dcf_flow_priority.py
new file mode 100644
index 00000000..bbc0d416
--- /dev/null
+++ b/tests/TestSuite_cvl_dcf_flow_priority.py
@@ -0,0 +1,1771 @@
+# BSD LICENSE\r
+#\r
+# Copyright(c) 2021 Intel Corporation. All rights reserved.\r
+# All rights reserved.\r
+#\r
+# Redistribution and use in source and binary forms, with or without\r
+# modification, are permitted provided that the following conditions\r
+# are met:\r
+#\r
+#   * Redistributions of source code must retain the above copyright\r
+#     notice, this list of conditions and the following disclaimer.\r
+#   * Redistributions in binary form must reproduce the above copyright\r
+#     notice, this list of conditions and the following disclaimer in\r
+#     the documentation and/or other materials provided with the\r
+#     distribution.\r
+#   * Neither the name of Intel Corporation nor the names of its\r
+#     contributors may be used to endorse or promote products derived\r
+#     from this software without specific prior written permission.\r
+#\r
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR\r
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT\r
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\r
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT\r
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,\r
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY\r
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\r
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\r
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\r
+\r
+import json\r
+import time\r
+import re\r
+import copy\r
+\r
+from test_case import TestCase, skip_unsupported_pkg, check_supported_nic\r
+from pmd_output import PmdOutput\r
+from packet import Packet\r
+from utils import BLUE, RED, GREEN\r
+import rte_flow_common as rfc\r
+\r
+import os\r
+\r
+tv_mac_pay = {\r
+    "name":"tv_mac_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth src is 00:00:00:00:00:01 dst is 00:11:22:33:44:55 type is 0x0800 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="00:00:00:00:00:01",dst="00:11:22:33:44:55")/IP()/Raw("x" *80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="00:00:00:00:00:02",dst="00:11:22:33:44:55")/IP()/Raw("x" *80)',\r
+                               'Ether(src="00:00:00:00:00:01",dst="00:11:22:33:44:54")/IP()/Raw("x" *80)',\r
+                               'Ether(src="00:00:00:00:00:01",dst="00:11:22:33:44:55")/IPv6()/Raw("x" *80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_frag = {\r
+    "name":"tv_mac_ipv4_frag",\r
+    "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 vf id 1 / end",\r
+    "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,frag=5)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2,frag=5)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.4",dst="192.168.0.2",tos=4,ttl=2,frag=5)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.5",tos=4,ttl=2,frag=5)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=5,ttl=2,frag=5)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3,frag=5)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_pay = {\r
+    "name":"tv_mac_ipv4_pay",\r
+    "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 proto is 6 tos is 4 ttl is 2 / end actions vf id 1 / end",\r
+    "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)/TCP()/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.4",dst="192.168.0.2",tos=4,ttl=2)/TCP()/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.5",tos=4,ttl=2)/TCP()/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=5,ttl=2)/TCP()/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP()/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/UDP()/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_udp_pay = {\r
+    "name":"tv_mac_ipv4_udp_pay",\r
+    "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 vf id 1 / end",\r
+    "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)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.5",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.7",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=5,ttl=3)/UDP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=9)/UDP(sport=25,dport=23)/("X"*480)',\r
+                               '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=30,dport=23)/("X"*480)',\r
+                               '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=19)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_tcp_pay = {\r
+    "name":"tv_mac_ipv4_tcp_pay",\r
+    "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 / tcp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "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)/TCP(sport=25,dport=23)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.5",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.7",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=5,ttl=3)/TCP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=9)/TCP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=30,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=19)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_igmp = {\r
+    "name":"tv_mac_ipv4_igmp",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 proto is 0x02 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IP()/IGMP()/Raw("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IP()/TCP()/Raw("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:55")/IP()/UDP()/Raw("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv6_srcip_dstip = {\r
+    "name":"tv_mac_ipv6_srcip_dstip",\r
+    "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 vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',\r
+                            'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":2}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv6_dstip_tc = {\r
+    "name":"tv_mac_ipv6_dstip_tc",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/("X"*480)',\r
+                            'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":2}},\r
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv6_udp_pay = {\r
+    "name":"tv_mac_ipv6_udp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/UDP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=7)/UDP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=30,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=19)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv6_tcp = {\r
+    "name":"tv_mac_ipv6_tcp",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/TCP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=7)/TCP(sport=25,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=30,dport=23)/("X"*480)',\r
+                               'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=19)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_nvgre_ipv4_pay = {\r
+    "name":"tv_mac_ipv4_nvgre_ipv4_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)',\r
+                            'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":2}},\r
+    "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.4", dst="192.168.1.3")/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.5")/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.4", dst="192.168.1.3" ,frag=5)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.5" ,frag=5)/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_nvgre_ipv4_udp_pay = {\r
+    "name":"tv_mac_ipv4_nvgre_ipv4_udp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 0x8 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src is 50 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.5", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.7")/UDP(sport=50,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=20,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=19)/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_nvgre_ipv4_tcp = {\r
+    "name":"tv_mac_ipv4_nvgre_ipv4_tcp",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / tcp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.5", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=20,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=39)/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_nvgre_mac_ipv4_pay = {\r
+    "name":"tv_mac_ipv4_nvgre_mac_ipv4_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)',\r
+                            'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":2}},\r
+    "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.4", dst="192.168.1.3")/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.5")/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.4", dst="192.168.1.3" ,frag=5)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.5" ,frag=5)/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_nvgre_mac_ipv4_udp_pay = {\r
+    "name":"tv_mac_ipv4_nvgre_mac_ipv4_udp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 0x8 /  eth dst is 68:05:ca:8d:ed:a8  / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / udp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a2")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.5", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=2,dport=23)/Raw("x"*80)]',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=20)/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_nvgre_mac_ipv4_tcp = {\r
+    "name":"tv_mac_ipv4_nvgre_mac_ipv4_tcp",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth dst is 68:05:ca:8d:ed:a8  / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / tcp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a2")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.5", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=1,dport=23)/Raw("x"*80)',\r
+                               'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=20)/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_ip_multicast = {\r
+    "name":"tv_ip_multicast",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 dst spec 224.0.0.0 dst mask 240.0.0.0 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether()/IP(dst="239.0.0.0")/TCP()/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether()/IP(dst="128.0.0.0")/TCP()/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_l2_multicast = {\r
+    "name":"tv_l2_multicast",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst spec 01:00:5e:00:00:00 dst mask ff:ff:ff:80:00:00 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="01:00:5e:7f:00:00")/IP()/TCP()/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="01:00:5e:ff:00:00")/IP()/TCP()/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_ethertype_filter_pppod = {\r
+    "name":"tv_ethertype_filter_pppod",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth type is 0x8863 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw("x" *80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw("x" *80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_ethertype_filter_pppoe = {\r
+    "name":"tv_ethertype_filter_pppoe",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth type is 0x8864 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_ethertype_filter_ipv6 = {\r
+    "name":"tv_ethertype_filter_ipv6",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth type is 0x86dd / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", tc=3)/TCP(dport=23)/("X"*480)',\r
+                            'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", tc=3)/TCP(dport=23)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":2}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IP()/TCP(dport=23)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_udp_port_filter_dhcp_discovery = {\r
+    "name":"tv_udp_port_filter_dhcp_discovery",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp src is 68 dst is 67 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=68,dport=67)/BOOTP(chaddr="3c:fd:fe:b2:43:90")/DHCP(options=[("message-type","discover"),"end"])/Raw("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=63,dport=67)/BOOTP(chaddr="3c:fd:fe:b2:43:90")/DHCP(options=[("message-type","discover"),"end"])/Raw("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=68,dport=69)/BOOTP(chaddr="3c:fd:fe:b2:43:90")/DHCP(options=[("message-type","discover"),"end"])/Raw("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_udp_port_filter_dhcp_offer = {\r
+    "name":"tv_udp_port_filter_dhcp_offer",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp src is 67 dst is 68 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=67,dport=68)/BOOTP(chaddr="3c:fd:fe:b2:43:90",yiaddr="192.168.1.0")/DHCP(options=[("message-type","offer"),"end"])/Raw("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=63,dport=68)/BOOTP(chaddr="3c:fd:fe:b2:43:90",yiaddr="192.168.1.0")/DHCP(options=[("message-type","offer"),"end"])/Raw("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=67,dport=63)/BOOTP(chaddr="3c:fd:fe:b2:43:90",yiaddr="192.168.1.0")/DHCP(options=[("message-type","offer"),"end"])/Raw("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_udp_port_filter_vxlan = {\r
+    "name":"tv_udp_port_filter_vxlan",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp dst is 4789 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/TCP()/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP()/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_filter = {\r
+    "name":"tv_mac_vlan_filter",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_vlan_filter = {\r
+    "name":"tv_vlan_filter",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_l2tpv3 = {\r
+    "name":"tv_mac_ipv4_l2tpv3",\r
+    "rte_flow_pattern":"flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / l2tpv3oip session_id is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":["Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)"],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":["Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP(b'\\x00\\x00\\x00\\x02')/('X'*480)",\r
+                               "Ether(dst='00:11:22:33:44:12')/IP(src='192.168.1.2', proto=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)",\r
+                               "Ether(dst='00:11:22:33:44:12')/IP(dst='192.168.0.2', proto=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)"],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv6_l2tpv3 = {\r
+    "name":"tv_mac_ipv6_l2tpv3",\r
+    "rte_flow_pattern":"flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / l2tpv3oip session_id is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":["Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)"],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":["Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP(b'\\x00\\x00\\x00\\x02')/('X'*480)",\r
+                               "Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:9999', nh=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)",\r
+                               "Ether(dst='00:11:22:33:44:13')/IPv6(src='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP(b'\\x00\\x00\\x00\\x01')/('X'*480)"],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_esp = {\r
+    "name":"tv_mac_ipv4_esp",\r
+    "rte_flow_pattern":"flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / esp spi is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=50)/ESP(spi=1)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:22")/IP(src="192.168.0.2", proto=50)/ESP(spi=2)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:22")/IP(src="192.168.1.2", proto=50)/ESP(spi=1)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2", proto=50)/ESP(spi=1)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv6_esp = {\r
+    "name":"tv_mac_ipv6_esp",\r
+    "rte_flow_pattern":"flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / esp spi is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=1)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=2)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999", nh=50)/ESP(spi=1)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=1)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_ah = {\r
+    "name":"tv_mac_ipv4_ah",\r
+    "rte_flow_pattern":"flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=51)/AH(spi=1)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=51)/AH(spi=2)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IP(src="192.168.10.2", proto=51)/AH(spi=1)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2", proto=51)/AH(spi=1)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv6_ah = {\r
+    "name":"tv_mac_ipv6_ah",\r
+    "rte_flow_pattern":"flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / ah spi is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=1)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=2)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999", nh=51)/AH(spi=1)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=1)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_nat_t_esp = {\r
+    "name":"tv_mac_ipv4_nat_t_esp",\r
+    "rte_flow_pattern":"flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / udp / esp spi is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2")/UDP(dport=4500)/ESP(spi=2)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IP(src="192.168.1.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv6_nat_t_esp = {\r
+    "name":"tv_mac_ipv6_nat_t_esp",\r
+    "rte_flow_pattern":"flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / udp / esp spi is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=1)/("X"*480)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=2)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999")/UDP(dport=4500)/ESP(spi=1)/("X"*480)',\r
+                               'Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=1)/("X"*480)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_pfcp_node = {\r
+    "name":"tv_mac_ipv4_pfcp_node",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=0)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=1)',\r
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=0)',\r
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=1)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv4_pfcp_session = {\r
+    "name":"tv_mac_ipv4_pfcp_session",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=1)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=0)',\r
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=0)',\r
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=1)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv6_pfcp_node = {\r
+    "name":"tv_mac_ipv6_pfcp_node",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 0 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=0)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=0)',\r
+                               'Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=1)',\r
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=1)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_ipv6_pfcp_session = {\r
+    "name":"tv_mac_ipv6_pfcp_session",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 1 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=1)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=0)',\r
+                               'Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(S=1)',\r
+                               'Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(S=0)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id = {\r
+    "name":"tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id = {\r
+    "name":"tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv4_pay_session_id_proto_id = {\r
+    "name":"tv_mac_pppoe_ipv4_pay_session_id_proto_id",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv6_pay_session_id_proto_id = {\r
+    "name":"tv_mac_pppoe_ipv6_pay_session_id_proto_id",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv4_pay_ip_address = {\r
+    "name":"tv_mac_pppoe_ipv4_pay_ip_address",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv4_udp_pay = {\r
+    "name":"tv_mac_pppoe_ipv4_udp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port = {\r
+    "name":"tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv4_tcp_pay = {\r
+    "name":"tv_mac_pppoe_ipv4_tcp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port = {\r
+    "name":"tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv6_pay_ip_address = {\r
+    "name":"tv_mac_pppoe_ipv6_pay_ip_address",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv6_udp_pay = {\r
+    "name":"tv_mac_pppoe_ipv6_udp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port = {\r
+    "name":"tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv6_tcp_pay = {\r
+    "name":"tv_mac_pppoe_ipv6_tcp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port = {\r
+    "name":"tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv4_pay_ip_address = {\r
+    "name":"tv_mac_vlan_pppoe_ipv4_pay_ip_address",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv4_udp_pay = {\r
+    "name":"tv_mac_vlan_pppoe_ipv4_udp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port = {\r
+    "name":"tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv4_tcp_pay = {\r
+    "name":"tv_mac_vlan_pppoe_ipv4_tcp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port = {\r
+    "name":"tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv6_pay_ip_address = {\r
+    "name":"tv_mac_vlan_pppoe_ipv6_pay_ip_address",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)',\r
+                               'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv6_udp_pay = {\r
+    "name":"tv_mac_vlan_pppoe_ipv6_udp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port = {\r
+    "name":"tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv6_tcp_pay = {\r
+    "name":"tv_mac_vlan_pppoe_ipv6_tcp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port = {\r
+    "name":"tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_lcp_pay = {\r
+    "name":"tv_mac_pppoe_lcp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_pppoe_ipcp_pay = {\r
+    "name":"tv_mac_pppoe_ipcp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_lcp_pay = {\r
+    "name":"tv_mac_vlan_pppoe_lcp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+tv_mac_vlan_pppoe_ipcp_pay = {\r
+    "name":"tv_mac_vlan_pppoe_ipcp_pay",\r
+    "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end",\r
+    "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)'],\r
+               "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                             "param":{"expect_port":1, "expect_queues":"null"}},\r
+               "expect_results":{"expect_pkts":1}},\r
+    "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)',\r
+                               'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'],\r
+                  "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                "param":{"expect_port":1, "expect_queues":"null"}},\r
+                  "expect_results":{"expect_pkts":0}}\r
+}\r
+\r
+\r
+class CVLDCFFlowPriorityTest(TestCase):\r
+    supported_nic = ['columbiaville_100g', 'columbiaville_25g', 'columbiaville_25gx2']\r
+\r
+    def bind_nics_driver(self, ports, driver=""):\r
+        # modprobe vfio driver\r
+        if driver == "vfio-pci":\r
+            for port in ports:\r
+                netdev = self.dut.ports_info[port]['port']\r
+                driver = netdev.get_nic_driver()\r
+                if driver != 'vfio-pci':\r
+                    netdev.bind_driver(driver='vfio-pci')\r
+\r
+        elif driver == "igb_uio":\r
+            # igb_uio should insmod as default, no need to check\r
+            for port in ports:\r
+                netdev = self.dut.ports_info[port]['port']\r
+                driver = netdev.get_nic_driver()\r
+                if driver != 'igb_uio':\r
+                    netdev.bind_driver(driver='igb_uio')\r
+        else:\r
+            for port in ports:\r
+                netdev = self.dut.ports_info[port]['port']\r
+                driver_now = netdev.get_nic_driver()\r
+                if driver == "":\r
+                    driver = netdev.default_driver\r
+                if driver != driver_now:\r
+                    netdev.bind_driver(driver=driver)\r
+\r
+    @check_supported_nic(supported_nic)\r
+    def set_up_all(self):\r
+        """\r
+        Run at the start of each test suite.\r
+        """\r
+        self.dut_ports = self.dut.get_ports(self.nic)\r
+        # Verify that enough ports are available\r
+        self.verify(len(self.dut_ports) >= 1, "Insufficient ports")\r
+        localPort = self.tester.get_local_port(self.dut_ports[0])\r
+        self.__tx_iface = self.tester.get_interface(localPort)\r
+        self.pkt = Packet()\r
+        self.testpmd_status = "close"\r
+        #bind pf to kernel\r
+        self.bind_nics_driver(self.dut_ports, driver="ice")\r
+\r
+        #set vf driver\r
+        self.vf_driver = 'vfio-pci'\r
+        self.dut.send_expect('modprobe vfio-pci', '#')\r
+        self.path = self.dut.apps_name['test-pmd']\r
+\r
+    def setup_1pf_vfs_env(self, pf_port=0, driver='default'):\r
+\r
+        self.used_dut_port_0 = self.dut_ports[pf_port]\r
+        #get PF interface name\r
+        self.pf0_intf = self.dut.ports_info[self.used_dut_port_0]['intf']\r
+        self.dut.send_expect('ethtool --set-priv-flags %s vf-vlan-prune-disable on' % self.pf0_intf, '#')\r
+        #generate 4 VFs on PF\r
+        self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, 4, driver=driver)\r
+        self.sriov_vfs_port_0 = self.dut.ports_info[self.used_dut_port_0]['vfs_port']\r
+        #set VF0 as trust\r
+        self.dut.send_expect('ip link set %s vf 0 trust on' % self.pf0_intf, '#')\r
+        #bind VFs to dpdk driver\r
+        for port in self.sriov_vfs_port_0:\r
+            port.bind_driver(self.vf_driver)\r
+        time.sleep(5)\r
+\r
+    def set_up(self):\r
+        """\r
+        Run before each test case.\r
+        """\r
+        self.suite_config = rfc.get_suite_config(self)\r
+        ice_driver_file_location = self.suite_config["ice_driver_file_location"]\r
+        self.dut.send_expect("rmmod ice","#",30)\r
+        self.dut.send_expect("insmod %s" % ice_driver_file_location, "# ", 60)\r
+        time.sleep(10)\r
+  \r
+    def create_testpmd_command(self):\r
+        """\r
+        Create testpmd command\r
+        """\r
+        #Prepare testpmd EAL and parameters\r
+        vf0_pci = self.sriov_vfs_port_0[0].pci\r
+        vf1_pci = self.sriov_vfs_port_0[1].pci\r
+        vf2_pci = self.sriov_vfs_port_0[2].pci\r
+        vf3_pci = self.sriov_vfs_port_0[3].pci\r
+        all_eal_param = self.dut.create_eal_parameters(cores='1S/4C/1T',ports=[vf0_pci, vf1_pci, vf2_pci, vf3_pci], port_options={vf0_pci:"cap=dcf"})\r
+        command = self.path + all_eal_param + " -- -i"\r
+        return command\r
+\r
+    def launch_testpmd(self):\r
+        """\r
+        launch testpmd with the command\r
+        """\r
+        command = self.create_testpmd_command()\r
+        out = self.dut.send_expect(command, "testpmd> ", 15)\r
+        self.testpmd_status = "running"\r
+        #self.dut.send_expect("set portlist 1", "testpmd> ", 15)\r
+        self.dut.send_expect("set fwd rxonly", "testpmd> ", 15)\r
+        self.dut.send_expect("set verbose 1", "testpmd> ", 15)\r
+\r
+    def send_and_check_packets(self, dic, session_name="", tx_iface=""):\r
+        """\r
+        general packets processing workflow.\r
+        """\r
+        if session_name == "":\r
+            session_name = self.dut\r
+        if tx_iface == "":\r
+            tx_iface = self.__tx_iface\r
+        session_name.send_expect("start", "testpmd> ", 15)\r
+        time.sleep(2)\r
+        #send packets\r
+        self.pkt.update_pkt(dic["scapy_str"])\r
+        self.pkt.send_pkt(self.tester, tx_port=tx_iface, count=1, timeout=370)\r
+        time.sleep(3)\r
+        out = session_name.send_expect("stop", "testpmd> ", 15)\r
+        dic["check_func"]["func"](out, dic["check_func"]["param"], dic["expect_results"])\r
+\r
+    def validate_switch_filter_rule(self, rte_flow_pattern, session_name="", check_stats=True):\r
+        """\r
+        validate switch filter rules\r
+        """\r
+        if session_name == "":\r
+            session_name = self.dut\r
+        p = "Flow rule validated"\r
+        rule_list = []\r
+        if isinstance(rte_flow_pattern, list):\r
+            for rule in rte_flow_pattern:\r
+                length = len(rule)\r
+                rule_rep = rule[0:5] + "validate" + rule[11:length]\r
+                out = session_name.send_expect(rule_rep, "testpmd> ")  #validate a rule\r
+                if (p in out) and ("Failed" not in out):\r
+                    rule_list.append(True)\r
+                else:\r
+                    rule_list.append(False)\r
+        elif isinstance(rte_flow_pattern, str):\r
+            length = len(rte_flow_pattern)\r
+            rule_rep = rte_flow_pattern[0:5] + "validate" + rte_flow_pattern[11:length]\r
+            out = session_name.send_expect(rule_rep, "testpmd> ")  #validate a rule\r
+            if (p in out) and ("Failed" not in out):\r
+                rule_list.append(True)\r
+            else:\r
+                rule_list.append(False)\r
+        else:\r
+            raise Exception("unsupported rule type, only accept list or str")\r
+        if check_stats:\r
+            self.verify(all(rule_list), "some rules not validated successfully, result %s, rule %s" % (rule_list, rte_flow_pattern))\r
+        else:\r
+            self.verify(not any(rule_list), "all rules should not validate successfully, result %s, rule %s" % (rule_list, rte_flow_pattern))\r
+\r
+    def create_switch_filter_rule(self, rte_flow_pattern, session_name="", check_stats=True):\r
+        """\r
+        create switch filter rules\r
+        """\r
+        if session_name == "":\r
+            session_name = self.dut\r
+        p = re.compile(r"Flow rule #(\d+) created")\r
+        rule_list = []\r
+        if isinstance(rte_flow_pattern, list):\r
+            for rule in rte_flow_pattern:\r
+                out = session_name.send_expect(rule, "testpmd> ")  #create a rule\r
+                m = p.search(out)\r
+                if m:\r
+                    rule_list.append(m.group(1))\r
+                else:\r
+                    rule_list.append(False)\r
+        else:\r
+            out = session_name.send_expect(rte_flow_pattern, "testpmd> ")  #create a rule\r
+            m = p.search(out)\r
+            if m:\r
+                rule_list.append(m.group(1))\r
+            else:\r
+                rule_list.append(False)\r
+        if check_stats:\r
+            self.verify(all(rule_list), "some rules not created successfully, result %s, rule %s" % (rule_list, rte_flow_pattern))\r
+        else:\r
+            self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list)\r
+        return rule_list\r
+\r
+    def check_switch_filter_rule_list(self, port_id, rule_list, session_name="", need_verify=True):\r
+        """\r
+        check the rules in list identical to ones in rule_list\r
+        """\r
+        if session_name == "":\r
+            session_name = self.dut\r
+        out = session_name.send_expect("flow list %d" % port_id, "testpmd> ", 15)\r
+        p = re.compile(r"ID\s+Group\s+Prio\s+Attr\s+Rule")\r
+        m = p.search(out)\r
+        if not m:\r
+            result = []\r
+        else:\r
+            p_spec = re.compile("^(\d+)\s")\r
+            out_lines = out.splitlines()\r
+            res = filter(bool, map(p_spec.match, out_lines))\r
+            result = [i.group(1) for i in res]\r
+        if need_verify:\r
+            self.verify(result == rule_list,\r
+                    "the rule list is not the same. expect %s, result %s" % (rule_list, result))\r
+        else:\r
+            return result\r
+\r
+    def destroy_switch_filter_rule(self, port_id, rule_list, session_name="", need_verify=True):\r
+        if session_name == "":\r
+            session_name = self.dut\r
+        p = re.compile(r"Flow rule #(\d+) destroyed")\r
+        destroy_list = []\r
+        if isinstance(rule_list, list):\r
+            for i in rule_list:\r
+                out = session_name.send_expect("flow destroy %s rule %s" % (port_id, i), "testpmd> ", 15)\r
+                m = p.search(out)\r
+                if m:\r
+                    destroy_list.append(m.group(1))\r
+                else:\r
+                    destroy_list.append(False)\r
+        else:\r
+            out = session_name.send_expect("flow destroy %s rule %s" % (port_id, rule_list), "testpmd> ", 15)\r
+            m = p.search(out)\r
+            if m:\r
+                destroy_list.append(m.group(1))\r
+            else:\r
+                destroy_list.append(False)\r
+            rule_list = [rule_list]\r
+        if need_verify:\r
+            self.verify(destroy_list == rule_list, "flow rule destroy failed, expect %s result %s" % (rule_list, destroy_list))\r
+        else:\r
+            return destroy_list\r
+\r
+    def _rte_flow_validate_pattern(self, test_vector, launch_testpmd=True):\r
+        \r
+        #launch testpmd\r
+        if launch_testpmd:\r
+            self.launch_testpmd()\r
+        #add priority for rules\r
+        rte_flow_pattern=test_vector["rte_flow_pattern"]\r
+        length= len(rte_flow_pattern)\r
+        rule1=rte_flow_pattern[0:14] + "priority 0" + rte_flow_pattern[13:length]\r
+        rule2=rte_flow_pattern[0:14] + "priority 1" + rte_flow_pattern[13:length-7]+ "2" + rte_flow_pattern[length-6:length]\r
+        rte_flow=[rule1, rule2]\r
+        #validate 2 rule\r
+        self.validate_switch_filter_rule(rte_flow)\r
+        #create 2 rule\r
+        rule_list = self.create_switch_filter_rule(rte_flow)\r
+        self.check_switch_filter_rule_list(0, rule_list)\r
+        #send matched packets and check\r
+        matched_dic = test_vector["matched"]\r
+        matched_dic["check_func"]["param"]["expect_port"]=2\r
+        self.send_and_check_packets(matched_dic)\r
+        #send mismatched packets and check\r
+        mismatched_dic = test_vector["mismatched"]\r
+        mismatched_dic["check_func"]["param"]["expect_port"]=[1,2]\r
+        mismatched_dic["expect_results"]["expect_pkts"]=[0,0]\r
+        self.send_and_check_packets(mismatched_dic)\r
+        #destroy rule with priority 1\r
+        self.destroy_switch_filter_rule(0, rule_list[1])\r
+        self.check_switch_filter_rule_list(0, ['0'])\r
+        #send matched packets and check\r
+        destroy_dict1 = copy.deepcopy(matched_dic)\r
+        destroy_dict1["check_func"]["param"]["expect_port"]=1\r
+        self.send_and_check_packets(destroy_dict1)\r
+        #recreate rule with priority 1\r
+        self.create_switch_filter_rule(rte_flow[1])\r
+        self.check_switch_filter_rule_list(0, rule_list)\r
+        #destroy rule with priority 0\r
+        self.destroy_switch_filter_rule(0, rule_list[0])\r
+        self.check_switch_filter_rule_list(0, ['1'])\r
+        #send matched packets and check\r
+        destroy_dict2 = copy.deepcopy(matched_dic)\r
+        self.send_and_check_packets(destroy_dict2)\r
+        #destroy rule with priority 1 and check\r
+        self.destroy_switch_filter_rule(0, rule_list[1])\r
+        self.check_switch_filter_rule_list(0, [])\r
+        destroy_dict3 = copy.deepcopy(matched_dic)\r
+        if isinstance(destroy_dict3["expect_results"]["expect_pkts"], list):\r
+            destroy_dict3["expect_results"]["expect_pkts"] = [0]*len(destroy_dict3["expect_results"]["expect_pkts"])\r
+        else:\r
+            destroy_dict3["expect_results"]["expect_pkts"] = 0\r
+        self.send_and_check_packets(destroy_dict3)\r
+\r
+    \r
+    def test_mac_ipv4_frag(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_frag)\r
+\r
+    def test_mac_ipv4_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_pay)\r
+\r
+    def test_mac_ipv4_udp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_udp_pay)\r
+\r
+    def test_mac_ipv4_tcp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_tcp_pay)\r
+\r
+    def test_mac_ipv4_igmp(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_igmp)\r
+\r
+    def test_mac_ipv6_srcip_dstip(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv6_srcip_dstip)\r
+\r
+    def test_mac_ipv6_dstip_tc(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv6_dstip_tc)\r
+\r
+    def test_mac_ipv6_udp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv6_udp_pay)\r
+\r
+    def test_mac_ipv6_tcp(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv6_tcp)\r
+\r
+    def test_mac_ipv4_nvgre_ipv4_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_ipv4_pay)\r
+\r
+    def test_mac_ipv4_nvgre_ipv4_udp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_ipv4_udp_pay)\r
+\r
+    def test_mac_ipv4_nvgre_ipv4_tcp(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_ipv4_tcp)\r
+\r
+    def test_mac_ipv4_nvgre_mac_ipv4_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_mac_ipv4_pay)\r
+\r
+    def test_mac_ipv4_nvgre_mac_ipv4_udp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_mac_ipv4_udp_pay)\r
+\r
+    def test_mac_ipv4_nvgre_mac_ipv4_tcp(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_mac_ipv4_tcp)\r
+\r
+    def test_ip_multicast(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_ip_multicast)\r
+\r
+    def test_l2_multicast(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_l2_multicast)\r
+\r
+    def test_ethertype_filter_pppod(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_ethertype_filter_pppod)\r
+\r
+    def test_ethertype_filter_pppoe(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_ethertype_filter_pppoe)\r
+\r
+    def test_ethertype_filter_ipv6(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_ethertype_filter_ipv6)\r
+\r
+    def test_udp_port_filter_dhcp_discovery(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_udp_port_filter_dhcp_discovery)\r
+\r
+    def test_udp_port_filter_dhcp_offer(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_udp_port_filter_dhcp_offer)\r
+\r
+    def test_udp_port_filter_vxlan(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_udp_port_filter_vxlan)\r
+\r
+    def test_mac_vlan_filter(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_filter)\r
+\r
+    def test_vlan_filter(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_vlan_filter)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_ipv4_l2tpv3(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_l2tpv3)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_ipv6_l2tpv3(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv6_l2tpv3)\r
+\r
+    @skip_unsupported_pkg('os default')\r
+    def test_mac_ipv4_esp(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_esp)\r
+\r
+    @skip_unsupported_pkg('os default')\r
+    def test_mac_ipv6_esp(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv6_esp)\r
+\r
+    @skip_unsupported_pkg('os default')\r
+    def test_mac_ipv4_ah(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_ah)\r
+\r
+    @skip_unsupported_pkg('os default')\r
+    def test_mac_ipv6_ah(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv6_ah)\r
+\r
+    @skip_unsupported_pkg('os default')\r
+    def test_mac_ipv4_nat_t_esp(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_nat_t_esp)\r
+\r
+    @skip_unsupported_pkg('os default')\r
+    def test_mac_ipv6_nat_t_esp(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv6_nat_t_esp)\r
+    \r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_ipv4_pfcp_node(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_pfcp_node)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_ipv4_pfcp_session(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv4_pfcp_session)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_ipv6_pfcp_node(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv6_pfcp_node)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_ipv6_pfcp_session(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_ipv6_pfcp_session)\r
+    \r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv4_pay_session_id_proto_id(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id)\r
+    \r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv6_pay_session_id_proto_id(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id)\r
+    \r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv4_pay_session_id_proto_id(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_pay_session_id_proto_id)\r
+    \r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv6_pay_session_id_proto_id(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_pay_session_id_proto_id)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv4_pay_ip_address(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_pay_ip_address)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv4_udp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_udp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv4_udp_pay_non_src_dst_port(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv4_tcp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_tcp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv4_tcp_pay_non_src_dst_port(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port)\r
+    \r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv6_pay_ip_address(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_pay_ip_address)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv6_udp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_udp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv6_udp_pay_non_src_dst_port(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv6_tcp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_tcp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipv6_tcp_pay_non_src_dst_port(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv4_pay_ip_address(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_pay_ip_address)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv4_udp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_udp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv4_tcp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_tcp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv6_pay_ip_address(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_pay_ip_address)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv6_udp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_udp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv6_tcp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_tcp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_lcp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_lcp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_pppoe_ipcp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_pppoe_ipcp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_lcp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_lcp_pay)\r
+\r
+    @skip_unsupported_pkg(['os default', 'wireless'])\r
+    def test_mac_vlan_pppoe_ipcp_pay(self):\r
+        self.setup_1pf_vfs_env()\r
+        self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipcp_pay)\r
+\r
+    def test_negative_case(self):\r
+        self.setup_1pf_vfs_env()\r
+        #launch testpmd\r
+        self.launch_testpmd()\r
+        negative_rule=["flow create 0 priority 2 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / end actions vf id 1 / end",\r
+                       "flow create 0 priority a ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / end actions vf id 1 / end",\r
+                       "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / end actions vf id 4 / end"]\r
+        self.create_switch_filter_rule(negative_rule, check_stats=False)\r
+\r
+    def test_exclusive_case(self):\r
+        self.setup_1pf_vfs_env()\r
+\r
+        #subcase 1: same pattern/input set/action different priority\r
+        self.launch_testpmd()\r
+        rule=["flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / end actions vf id 2 / end",\r
+                   "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / end actions vf id 2 / end"]\r
+        rule_list=self.create_switch_filter_rule(rule)\r
+        #self.check_switch_filter_rule_list(0, rule_list)\r
+        matched_dic = {"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)/TCP()/("X"*480)'],\r
+                       "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                     "param":{"expect_port":2, "expect_queue":"null"}},\r
+                       "expect_results":{"expect_pkts":1}}\r
+        self.send_and_check_packets(matched_dic)\r
+        self.dut.send_expect("flow flush 0", "testpmd> ", 15)\r
+        self.dut.send_expect("clear port stats all", "testpmd> ", 15)\r
+        self.dut.send_expect("quit", "#", 15)\r
+\r
+        #subcase 2: same pattern/input set/priority different action\r
+        self.launch_testpmd()\r
+        rule=["flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / end actions vf id 1 / end",\r
+                   "flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.1 dst is 192.168.0.2 / end actions vf id 2 / end"]\r
+        rule_list=self.create_switch_filter_rule(rule)\r
+        self.check_switch_filter_rule_list(0, rule_list)\r
+        matched_dic = {"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)/TCP()/("X"*480)'],\r
+                       "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                     "param":{"expect_port":[1,2], "expect_queue":"null"}},\r
+                       "expect_results":{"expect_pkts":[1,1]}}\r
+        self.send_and_check_packets(matched_dic)\r
+        self.dut.send_expect("flow flush 0", "testpmd> ", 15)\r
+        self.dut.send_expect("clear port stats all", "testpmd> ", 15)\r
+        self.dut.send_expect("quit", "#", 15)\r
+\r
+        #subcase 3: some rules overlap\r
+        self.launch_testpmd()\r
+        rule=["flow create 0 priority 0 ingress pattern eth / vlan / vlan / pppoes / pppoe_proto_id is 0x21 / end actions vf id 1 / end",\r
+                   "flow create 0 priority 0 ingress pattern eth / vlan / vlan tci is 2 / end actions vf id 1 / end",\r
+                   "flow create 0 priority 1 ingress pattern eth / vlan / vlan / pppoes seid is 1 / ipv4 / end actions vf id 2 / end",\r
+                   "flow create 0 priority 1 ingress pattern eth dst is 00:00:00:01:03:03 / vlan / vlan / end actions vf id 2 / end",\r
+                   "flow create 0 priority 1 ingress pattern eth dst is 00:00:00:01:03:03 / end actions vf id 3 / end",\r
+                   "flow create 0 priority 1 ingress pattern eth / vlan tci is 1 / vlan tci is 2 / end actions vf id 3 / end"]\r
+        rule_list=self.create_switch_filter_rule(rule)\r
+        self.check_switch_filter_rule_list(0, rule_list)\r
+        matched_dic = {"scapy_str":['Ether(dst="00:00:00:01:03:03")/Dot1Q(vlan=1)/Dot1Q(vlan=2)/Raw("x"*480)'],\r
+                       "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                     "param":{"expect_port":[2,3], "expect_queue":"null"}},\r
+                       "expect_results":{"expect_pkts":[1,1]}}\r
+        self.send_and_check_packets(matched_dic)\r
+        self.dut.send_expect("flow destroy 0 rule 5", "testpmd> ", 15)\r
+        self.send_and_check_packets(matched_dic)\r
+        self.dut.send_expect("flow destroy 0 rule 4", "testpmd> ", 15)\r
+        matched_dic["check_func"]["param"]["expect_port"]=2\r
+        matched_dic["expect_results"]["expect_pkts"]=1\r
+        self.send_and_check_packets(matched_dic)\r
+        self.dut.send_expect("flow destroy 0 rule 3", "testpmd> ", 15)\r
+        matched_dic["check_func"]["param"]["expect_port"]=1\r
+        matched_dic["expect_results"]["expect_pkts"]=1\r
+        self.send_and_check_packets(matched_dic)\r
+        self.dut.send_expect("flow destroy 0 rule 1", "testpmd> ", 15)\r
+        matched_dic["expect_results"]["expect_pkts"]=0\r
+        self.send_and_check_packets(matched_dic)\r
+        matched_dic = {"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8100)/Dot1Q(vlan=0x2,type=0x8864)/PPPoE(sessionid=0x1)/PPP(proto=0x21)/IP()/UDP(dport=23)/("X"*480)'],\r
+                       "check_func":{"func":rfc.check_vf_rx_packets_number,\r
+                                     "param":{"expect_port":2, "expect_queue":"null"}},\r
+                       "expect_results":{"expect_pkts":1}}\r
+        self.send_and_check_packets(matched_dic)\r
+        self.dut.send_expect("flow destroy 0 rule 2", "testpmd> ", 15)\r
+        matched_dic["check_func"]["param"]["expect_port"]=1\r
+        self.send_and_check_packets(matched_dic)\r
+        self.dut.send_expect("flow destroy 0 rule 0", "testpmd> ", 15)\r
+        matched_dic["expect_results"]["expect_pkts"]=0\r
+        self.send_and_check_packets(matched_dic)\r
+\r
+    def tear_down(self):\r
+        """\r
+        Run after each test case.\r
+        """\r
+        if self.testpmd_status != "close":\r
+            # destroy all flow rules on DCF\r
+            self.dut.send_expect("flow flush 0", "testpmd> ", 15)\r
+            self.dut.send_expect("clear port stats all", "testpmd> ", 15)\r
+            self.dut.send_expect("quit", "#", 15)\r
+            #kill all DPDK application\r
+            self.dut.kill_all()\r
+            # destroy vfs\r
+            for port_id in self.dut_ports:\r
+                self.dut.destroy_sriov_vfs_by_port(port_id)\r
+        self.testpmd_status = "close"\r
+        if getattr(self, 'session_secondary', None):\r
+            self.dut.close_session(self.session_secondary)\r
+\r
+    def tear_down_all(self):\r
+        """\r
+        Run after each test suite.\r
+        """\r
+        self.dut.kill_all()\r
+\r
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-06-01  8:21 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 17:02 [dts] [PATCH V1]tests/: add test suite for cvl dcf rte flow priority qifu

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ https://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git