From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dts-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id E4F6C41DA4;
	Wed,  1 Mar 2023 04:21:32 +0100 (CET)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id C494C40A8A;
	Wed,  1 Mar 2023 04:21:32 +0100 (CET)
Received: from mga07.intel.com (mga07.intel.com [134.134.136.100])
 by mails.dpdk.org (Postfix) with ESMTP id 264894067B
 for <dts@dpdk.org>; Wed,  1 Mar 2023 04:21:30 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple;
 d=intel.com; i=@intel.com; q=dns/txt; s=Intel;
 t=1677640891; x=1709176891;
 h=from:to:cc:subject:date:message-id;
 bh=TCM4cJWvn2QAv5LJR2bpbU+K+gDLoGSvFnhaOeaWLM0=;
 b=ghTS6ObHugvK++hoHTN+Cah4LC0isOMneOPpHA2WxYB7pIxEXPacdmxc
 m5959oGaXaamNQkss5od8VoZon6p2rHExc+qHWXCoz1yrd/XVpfssfldp
 poE9+z0LIevO53pmrZ8f4ylAuE72y+4yvNilj/YTiTsjjgJP9rJuEQ7I+
 uPHzjAKO2nfhjYjA/CpRSxcyd0JsrSuzSzvap5OfXyOfnrJyaKffAh3W2
 sJHgJywIbBgbLjy1rZVF9crmKY2b2Zmg8+l/VEiK2TxDleUU2paviozlx
 2zo3hbAIbcG+5XDj6cXWi0a7KYV+eWrTWjBKgluJcDud7/gJp8WbEdf4J Q==;
X-IronPort-AV: E=McAfee;i="6500,9779,10635"; a="399092872"
X-IronPort-AV: E=Sophos;i="5.98,223,1673942400"; d="scan'208";a="399092872"
Received: from fmsmga006.fm.intel.com ([10.253.24.20])
 by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 28 Feb 2023 19:21:30 -0800
X-IronPort-AV: E=McAfee;i="6500,9779,10635"; a="920057066"
X-IronPort-AV: E=Sophos;i="5.98,223,1673942400"; d="scan'208";a="920057066"
Received: from unknown (HELO cvl_100g_103.icx.intel.com) ([10.239.252.93])
 by fmsmga006-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;
 28 Feb 2023 19:21:28 -0800
From: Hongbo Li <hongbox.li@intel.com>
To: dts@dpdk.org
Cc: Hongbo Li <hongbox.li@intel.com>
Subject: [dts][PATCH V2] tests/ice_dcf_switch_filter:implement VXLAN related
 cases
Date: Wed,  1 Mar 2023 19:38:25 +0800
Message-Id: <20230301113825.19042-1-hongbox.li@intel.com>
X-Mailer: git-send-email 2.17.1
X-BeenThere: dts@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: test suite reviews and discussions <dts.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dts>,
 <mailto:dts-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dts/>
List-Post: <mailto:dts@dpdk.org>
List-Help: <mailto:dts-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dts>,
 <mailto:dts-request@dpdk.org?subject=subscribe>
Errors-To: dts-bounces@dpdk.org

There are vxlan related cases not implemented in the test plan.
This patch implements 8 vxlan cases.

Signed-off-by: Hongbo Li <hongbox.li@intel.com>
---
v2:adapt dpdk changes and modify the logic to determine whether the vxlan configuration needs to be added

 tests/TestSuite_ice_dcf_switch_filter.py | 292 ++++++++++++++++++++++-
 1 file changed, 289 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_ice_dcf_switch_filter.py b/tests/TestSuite_ice_dcf_switch_filter.py
index 3560d065..c5c3ae0b 100644
--- a/tests/TestSuite_ice_dcf_switch_filter.py
+++ b/tests/TestSuite_ice_dcf_switch_filter.py
@@ -2034,6 +2034,255 @@ sv_mac_test_drop_action = [
     tv_mac_ipv4_nvgre_eth_ipv4_tcp_l4_mask_drop,
 ]
 
+tv_mac_ipv4_vxlan_ipv4_frag = {
+    "name": "tv_mac_ipv4_vxlan_ipv4_frag",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions represented_port ethdev_port_id 1 / end",
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions port_representor port_id 0 / end",
+    ],
+    "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)',
+            '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)/Raw("x"*80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [2, 2]},
+    },
+    "mismatched": {
+        "scapy_str": [
+            'Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",frag=5)/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.5",frag=5)/Raw("x"*80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [0, 0]},
+    },
+}
+
+tv_mac_ipv4_vxlan_ipv4_pay = {
+    "name": "tv_mac_ipv4_vxlan_ipv4_pay",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions represented_port ethdev_port_id 1 / end",
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions port_representor port_id 0 / end",
+    ],
+    "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")/TCP()/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/Raw("x"*80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [2, 2]},
+    },
+    "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)',
+            'Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.4", dst="192.168.0.3")/TCP()/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.5")/TCP()/Raw("x"*80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [0, 0]},
+    },
+}
+
+tv_mac_ipv4_vxlan_ipv4_udp_pay = {
+    "name": "tv_mac_ipv4_vxlan_ipv4_udp_pay",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src is 50 dst is 23 / end actions represented_port ethdev_port_id 1 / end",
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src is 50 dst is 23 / end actions port_representor port_id 0 / end",
+    ],
+    "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")/UDP(sport=50,dport=23) /Raw("x"*80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [1, 1]},
+    },
+    "mismatched": {
+        "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")/UDP(sport=20,dport=23) /Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=19) /Raw("x"*80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [0, 0]},
+    },
+}
+
+tv_mac_ipv4_vxlan_ipv4_tcp = {
+    "name": "tv_mac_ipv4_vxlan_ipv4_tcp",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / tcp src is 50 dst is 23 / end actions represented_port ethdev_port_id 1 / end",
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / tcp src is 50 dst is 23 / end actions port_representor port_id 0 / end",
+    ],
+    "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")/TCP(sport=50,dport=23)/Raw("x"*80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [1, 1]},
+    },
+    "mismatched": {
+        "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")/TCP(sport=29,dport=23)/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=50,dport=100)/Raw("x"*80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [0, 0]},
+    },
+}
+
+tv_mac_ipv4_vxlan_mac_ipv4_frag = {
+    "name": "tv_mac_ipv4_vxlan_mac_ipv4_frag",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions represented_port ethdev_port_id 1 / end",
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions port_representor port_id 0 / end",
+    ],
+    "matched": {
+        "scapy_str": [
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3" ,frag=5)/TCP()/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3" ,frag=5)/Raw("x"*80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [2, 2]},
+    },
+    "mismatched": {
+        "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")/TCP(sport=29,dport=23)/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=50,dport=100)/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3" ,frag=5)/TCP()/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3" ,frag=5)/TCP()/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.0.2", dst="192.168.0.3" ,frag=5)/TCP()/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.4", dst="192.168.0.3" ,frag=5)/TCP()/Raw("x"*80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.5" ,frag=5)/TCP()/Raw("x"*80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [0, 0]},
+    },
+}
+
+tv_mac_ipv4_vxlan_mac_ipv4_pay = {
+    "name": "tv_mac_ipv4_vxlan_mac_ipv4_pay",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8  / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions represented_port ethdev_port_id 1 / end",
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8  / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions port_representor port_id 0 / end",
+    ],
+    "matched": {
+        "scapy_str": [
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3") /TCP()/Raw("x" * 80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/Raw("x" * 80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [2, 2]},
+    },
+    "mismatched": {
+        "scapy_str": [
+            'Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3") /TCP()/Raw("x" * 80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3") /TCP()/Raw("x" * 80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.0.2", dst="192.168.0.3") /TCP()/Raw("x" * 80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.4", dst="192.168.0.3") /TCP()/Raw("x" * 80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.5") /TCP()/Raw("x" * 80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [0, 0]},
+    },
+}
+
+tv_mac_ipv4_vxlan_mac_ipv4_udp_pay = {
+    "name": "tv_mac_ipv4_vxlan_mac_ipv4_udp_pay",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8  / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src is 50 dst is 23 / end actions represented_port ethdev_port_id 1 / end",
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8  / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src is 50 dst is 23 / end actions port_representor port_id 0 / end",
+    ],
+    "matched": {
+        "scapy_str": [
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x" * 80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [1, 1]},
+    },
+    "mismatched": {
+        "scapy_str": [
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=20,dport=23)/Raw("x" * 80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=29)/Raw("x" * 80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [0, 0]},
+    },
+}
+
+tv_mac_ipv4_vxlan_mac_ipv4_tcp = {
+    "name": "tv_mac_ipv4_vxlan_mac_ipv4_tcp",
+    "rte_flow_pattern": [
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8  / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end",
+        "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8  / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / tcp src is 25 dst is 23 / end actions port_representor port_id 0 / end",
+    ],
+    "matched": {
+        "scapy_str": [
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=25,dport=23)/Raw("x" * 80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [1, 1]},
+    },
+    "mismatched": {
+        "scapy_str": [
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=20,dport=23)/Raw("x" * 80)',
+            'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=25,dport=19)/Raw("x" * 80)',
+        ],
+        "check_func": {
+            "func": rfc.check_vf_rx_packets_number,
+            "param": {"expect_port": [0, 3], "expect_queues": "null"},
+        },
+        "expect_results": {"expect_pkts": [0, 0]},
+    },
+}
+
 
 class ICEDCFSwitchFilterTest(TestCase):
     supported_nic = [
@@ -2156,7 +2405,7 @@ class ICEDCFSwitchFilterTest(TestCase):
         command = self.path + all_eal_param + " -- -i"
         return command
 
-    def launch_testpmd(self):
+    def launch_testpmd(self, is_vxlan=False):
         """
         launch testpmd with the command
         """
@@ -2167,6 +2416,8 @@ class ICEDCFSwitchFilterTest(TestCase):
         self.dut.send_expect("set promisc 0 off", "testpmd> ", 15)
         self.dut.send_expect("set fwd rxonly", "testpmd> ", 15)
         self.dut.send_expect("set verbose 1", "testpmd> ", 15)
+        if is_vxlan:
+            self.dut.send_expect("rx_vxlan_port add 4789 0", "testpmd> ", 15)
 
     def send_packets(self, dic, session_name="", tx_iface=""):
         """
@@ -2380,11 +2631,12 @@ class ICEDCFSwitchFilterTest(TestCase):
             out_vfs.append(out)
         return out_vfs
 
-    def _rte_flow_validate_pattern(self, test_vector, launch_testpmd=True):
+    def _rte_flow_validate_pattern(self, test_vector, launch_testpmd=True, **kwargs):
 
+        vxlan = kwargs.get("is_vxlan")
         if launch_testpmd:
             # launch testpmd
-            self.launch_testpmd()
+            self.launch_testpmd(is_vxlan=vxlan)
         # validate a rule
         self.validate_switch_filter_rule(test_vector["rte_flow_pattern"])
         # create a rule
@@ -3222,6 +3474,40 @@ class ICEDCFSwitchFilterTest(TestCase):
         if False in test_result:
             self.verify(False, "some subcases failed, result %s" % test_result)
 
+    def test_mac_ipv4_vxlan_ipv4_frag(self):
+        self.setup_2pf_vfs_env()
+        self._rte_flow_validate_pattern(tv_mac_ipv4_vxlan_ipv4_frag, is_vxlan=True)
+
+    def test_mac_ipv4_vxlan_ipv4_pay(self):
+        self.setup_2pf_vfs_env()
+        self._rte_flow_validate_pattern(tv_mac_ipv4_vxlan_ipv4_pay, is_vxlan=True)
+
+    def test_mac_ipv4_vxlan_ipv4_udp_pay(self):
+        self.setup_2pf_vfs_env()
+        self._rte_flow_validate_pattern(tv_mac_ipv4_vxlan_ipv4_udp_pay, is_vxlan=True)
+
+    def test_mac_ipv4_vxlan_ipv4_tcp(self):
+        self.setup_2pf_vfs_env()
+        self._rte_flow_validate_pattern(tv_mac_ipv4_vxlan_ipv4_tcp, is_vxlan=True)
+
+    def test_mac_ipv4_vxlan_mac_ipv4_frag(self):
+        self.setup_2pf_vfs_env()
+        self._rte_flow_validate_pattern(tv_mac_ipv4_vxlan_mac_ipv4_frag, is_vxlan=True)
+
+    def test_mac_ipv4_vxlan_mac_ipv4_pay(self):
+        self.setup_2pf_vfs_env()
+        self._rte_flow_validate_pattern(tv_mac_ipv4_vxlan_mac_ipv4_pay, is_vxlan=True)
+
+    def test_mac_ipv4_vxlan_mac_ipv4_udp_pay(self):
+        self.setup_2pf_vfs_env()
+        self._rte_flow_validate_pattern(
+            tv_mac_ipv4_vxlan_mac_ipv4_udp_pay, is_vxlan=True
+        )
+
+    def test_mac_ipv4_vxlan_mac_ipv4_tcp(self):
+        self.setup_2pf_vfs_env()
+        self._rte_flow_validate_pattern(tv_mac_ipv4_vxlan_mac_ipv4_tcp, is_vxlan=True)
+
     def tear_down(self):
         """
         Run after each test case.
-- 
2.17.1