From patchwork Thu Feb 4 00:54:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng, Yuan" X-Patchwork-Id: 87723 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C0FB0A0A0E; Thu, 4 Feb 2021 08:55:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8AB3B24057C; Thu, 4 Feb 2021 08:55:37 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 70050240576 for ; Thu, 4 Feb 2021 08:55:34 +0100 (CET) IronPort-SDR: nvdAqbpSJo1HfBaO0T1jzIUBvKKvGbkdIi8W6AnNwkEXrj5zeiB/M/p1FaLh+SSsKJDQRqU7E5 NBI/Y3+nalnQ== X-IronPort-AV: E=McAfee;i="6000,8403,9884"; a="180417220" X-IronPort-AV: E=Sophos;i="5.79,400,1602572400"; d="scan'208";a="180417220" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2021 23:55:31 -0800 IronPort-SDR: FJMZlrPmpW+IG12LViP7l2m/JwwisvkiZ86K6v5gu7Y8MtzyQSPBFBp416ynL9n/xQnGUKaZdF AmBKuiK19I7w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.79,400,1602572400"; d="scan'208";a="372854815" Received: from pengyuan-dpdk.sh.intel.com ([10.67.117.236]) by orsmga002.jf.intel.com with ESMTP; 03 Feb 2021 23:55:29 -0800 From: Peng Yuan To: dts@dpdk.org Cc: Peng Yuan Date: Thu, 4 Feb 2021 00:54:50 +0000 Message-Id: <20210204005450.19222-1-yuan.peng@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH v1]tests: add gtpogre packets check to TestSuite_cvl_advanced_rss_gtpu.py X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" GTPoGRE is imported in DPDK-21.02. The Ptype is parsed same as GTP packet, so they match gtp RSS rule. Add GTPoGRE packets check to TestSuite_cvl_advanced_rss_gtpu.py Signed-off-by: Peng Yuan diff --git a/tests/TestSuite_cvl_advanced_rss_gtpu.py b/tests/TestSuite_cvl_advanced_rss_gtpu.py index b41a5d4a..4b1670a6 100755 --- a/tests/TestSuite_cvl_advanced_rss_gtpu.py +++ b/tests/TestSuite_cvl_advanced_rss_gtpu.py @@ -43,6 +43,7 @@ mac_ipv4_gtpu_ipv4_basic = { 'ipv4-frag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)', 'ipv4-icmp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)', 'ipv4-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)', + 'gtpogre-ipv4-nonfrag': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', } mac_ipv4_gtpu_ipv4_l3src_changed_pkt = eval(str(mac_ipv4_gtpu_ipv4_basic).replace('192.168.0.2', '192.168.1.2')) @@ -105,6 +106,18 @@ mac_ipv4_gtpu_ipv4_l3dst_only = { 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-udp'], 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_ipv4_unmatched_pkt, 'action': 'check_no_hash', @@ -117,6 +130,7 @@ mac_ipv4_gtpu_ipv4_l3dst_only = { mac_ipv4_gtpu_ipv4_basic['ipv4-frag'], mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'], mac_ipv4_gtpu_ipv4_basic['ipv4-udp'], + mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], ], 'action': 'check_no_hash', }, @@ -198,6 +212,22 @@ mac_ipv4_gtpu_ipv4_all = { 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'].replace('192.168.0.', '192.168.1.'), 'action': 'check_hash_different', }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'), + 'action': 'check_hash_different', + }, { 'send_packet': mac_ipv4_gtpu_ipv4_unmatched_pkt, 'action': 'check_no_hash', @@ -210,6 +240,7 @@ mac_ipv4_gtpu_ipv4_all = { mac_ipv4_gtpu_ipv4_basic['ipv4-frag'], mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'], mac_ipv4_gtpu_ipv4_basic['ipv4-udp'], + mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], ], 'action': 'check_no_hash', }, @@ -269,6 +300,18 @@ mac_ipv4_gtpu_ipv4_gtpu = { 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'].replace('192.168.0.', '192.168.1.'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_ipv4_unmatched_pkt, 'action': 'check_no_hash', @@ -281,6 +324,7 @@ mac_ipv4_gtpu_ipv4_gtpu = { mac_ipv4_gtpu_ipv4_basic['ipv4-frag'], mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'], mac_ipv4_gtpu_ipv4_basic['ipv4-udp'], + mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], ], 'action': 'check_no_hash', }, @@ -319,6 +363,14 @@ mac_ipv4_gtpu_ipv4_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)', + 'action': 'check_hash_different', + }, ], 'test': [ { @@ -345,6 +397,14 @@ mac_ipv4_gtpu_ipv4_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', + 'action': {'save_hash': 'gtpogre-ipv4-nonfrag'}, + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)', + 'action': 'check_hash_same', + }, { # unmatch MAC_IPV4_GTPU_IPV6 nonfrag 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)', 'action': 'save_hash', @@ -371,6 +431,14 @@ mac_ipv4_gtpu_ipv4_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)', 'action': {'check_no_hash_or_different': 'nonfrag'}, }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', + 'action': {'check_no_hash_or_different': 'gtpogre-ipv4-nonfrag'}, + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)', + 'action': {'check_no_hash_or_different': 'gtpogre-ipv4-nonfrag'}, + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)', 'action': {'check_no_hash_or_different': 'frag'}, @@ -420,6 +488,22 @@ mac_ipv4_gtpu_ipv4_udp_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)', + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_different', + }, ], 'test': [ { @@ -438,6 +522,22 @@ mac_ipv4_gtpu_ipv4_udp_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_same', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)', + 'action': 'check_hash_same', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_same', + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', 'action': 'save_hash', @@ -466,7 +566,7 @@ mac_ipv4_gtpu_ipv4_udp_symmetric = { 'post-test': [ { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', - 'action': {'check_hash_different': 'basic_with_rule'}, + 'action': {'save_hash': 'basic_with_rule'}, }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)', @@ -541,6 +641,14 @@ mac_ipv4_gtpu_eh_dl_ipv4_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)', + 'action': 'check_hash_different', + }, ], 'test': [ { @@ -575,6 +683,14 @@ mac_ipv4_gtpu_eh_dl_ipv4_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)', + 'action': 'check_hash_same', + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', 'action': 'save_hash', @@ -607,6 +723,14 @@ mac_ipv4_gtpu_eh_dl_ipv4_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)', + 'action': 'check_hash_different', + }, ], 'post-test': [ { @@ -641,6 +765,14 @@ mac_ipv4_gtpu_eh_dl_ipv4_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)', 'action': 'check_no_hash_or_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', + 'action': 'save_or_no_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)', + 'action': 'check_no_hash_or_different', + }, ], } mac_ipv4_gtpu_eh_ul_ipv4_symmetric = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_symmetric) @@ -674,6 +806,22 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)', + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_different', + }, ], 'test': [ { @@ -692,6 +840,22 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_same', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)', + 'action': 'check_hash_same', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_same', + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', 'action': 'save_hash', @@ -701,11 +865,11 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric = { 'action': 'check_hash_different', }, { - 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)', + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)', 'action': 'save_hash', }, { - 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)', + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)', 'action': 'check_hash_different', }, { @@ -741,7 +905,9 @@ mac_ipv4_gtpu_eh_ul_ipv4_udp_symmetric = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_udp_s .replace('(type=0', '(type=1') .replace('(type=2', '(type=0') .replace('gtp_psc pdu_t is 0', 'gtp_psc pdu_t is 1') - .replace('eh_dl', 'eh_ul')) + .replace('eh_dl', 'eh_ul') + ) + mac_ipv4_gtpu_eh_ipv4_udp_symmetric = [mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric, mac_ipv4_gtpu_eh_ul_ipv4_udp_symmetric] mac_ipv4_gtpu_eh_ipv4_tcp_symmetric = [eval(str(element).replace('TCP', 'TCP1').replace('udp', 'tcp') @@ -778,7 +944,11 @@ mac_ipv4_gtpu_eh_ipv6_tcp_symmetric = eval(str(mac_ipv4_gtpu_eh_ipv4_tcp_symmetr .replace('ipv4_tcp_symmetric', 'ipv6_tcp_symmetric') ) -mac_ipv4_gtpu_ipv4_udp_basic = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)' +mac_ipv4_gtpu_ipv4_udp_basic = { + 'ipv4-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)', + 'gtpogre-ipv4-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)', +} + mac_ipv4_gtpu_ipv4_udp_unmatch = [ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)', @@ -790,15 +960,27 @@ mac_ipv4_gtpu_ipv4_udp_l3dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_same', }, { @@ -808,7 +990,11 @@ mac_ipv4_gtpu_ipv4_udp_l3dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -827,19 +1013,35 @@ mac_ipv4_gtpu_ipv4_udp_l3src_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33').replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33').replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33').replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_same', }, { @@ -849,7 +1051,7 @@ mac_ipv4_gtpu_ipv4_udp_l3src_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -861,19 +1063,35 @@ mac_ipv4_gtpu_ipv4_udp_l3src_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32').replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=32').replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32').replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_same', }, { @@ -883,7 +1101,7 @@ mac_ipv4_gtpu_ipv4_udp_l3src_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -895,19 +1113,35 @@ mac_ipv4_gtpu_ipv4_udp_l3dst_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33').replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33').replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33').replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_same', }, { @@ -917,7 +1151,7 @@ mac_ipv4_gtpu_ipv4_udp_l3dst_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -929,19 +1163,35 @@ mac_ipv4_gtpu_ipv4_udp_l3dst_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32').replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=32').replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32').replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_same', }, { @@ -951,7 +1201,7 @@ mac_ipv4_gtpu_ipv4_udp_l3dst_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -962,15 +1212,28 @@ mac_ipv4_gtpu_ipv4_udp_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=32') + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32') + .replace('192.168.0', '192.168.1'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32') .replace('192.168.0', '192.168.1'), 'action': 'check_hash_same', }, @@ -981,7 +1244,11 @@ mac_ipv4_gtpu_ipv4_udp_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -992,15 +1259,28 @@ mac_ipv4_gtpu_ipv4_udp_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=32') + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=32') + .replace('192.168.0', '192.168.1'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=32') .replace('192.168.0', '192.168.1'), 'action': 'check_hash_same', }, @@ -1011,7 +1291,7 @@ mac_ipv4_gtpu_ipv4_udp_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -1023,27 +1303,51 @@ mac_ipv4_gtpu_ipv4_udp_all = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'), 'action': 'check_hash_same', }, { @@ -1053,7 +1357,11 @@ mac_ipv4_gtpu_ipv4_udp_all = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -1065,17 +1373,31 @@ mac_ipv4_gtpu_ipv4_udp_gtpu = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types gtpu end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0', '192.168.1') + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('192.168.0', '192.168.1') .replace('sport=22', 'sport=32') .replace('dport=23', 'dport=33'), 'action': 'check_hash_same', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0', '192.168.1') + .replace('sport=22', 'sport=32') + .replace('dport=23', 'dport=33'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'), 'action': 'check_hash_different', }, { @@ -1085,7 +1407,7 @@ mac_ipv4_gtpu_ipv4_udp_gtpu = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -1108,6 +1430,7 @@ mac_ipv4_gtpu_ipv6_basic = { 'ipv6-frag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)', 'ipv6-icmp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)', 'ipv6-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP()/("X"*480)', + 'gtpogre-ipv6-nonfrag': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)', } mac_ipv4_gtpu_ipv6_l3src_changed_pkt = eval(str(mac_ipv4_gtpu_ipv6_basic).replace('ABAB', '1212')) @@ -1169,6 +1492,18 @@ mac_ipv4_gtpu_ipv6_l3dst_only = { 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-udp'], 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['gtpogre-ipv6-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['gtpogre-ipv6-nonfrag'], + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_ipv6_unmatched_pkt, 'action': 'check_no_hash', @@ -1181,6 +1516,7 @@ mac_ipv4_gtpu_ipv6_l3dst_only = { mac_ipv4_gtpu_ipv6_basic['ipv6-frag'], mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'], mac_ipv4_gtpu_ipv6_basic['ipv6-udp'], + mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], ], 'action': 'check_no_hash', }, @@ -1246,6 +1582,22 @@ mac_ipv4_gtpu_ipv6_all = { 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'].replace('ABAB', '1212').replace('CDCD', '3434'), 'action': 'check_hash_different', }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['gtpogre-ipv6-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['gtpogre-ipv6-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, { 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'], 'action': 'save_hash', @@ -1274,6 +1626,7 @@ mac_ipv4_gtpu_ipv6_all = { mac_ipv4_gtpu_ipv6_basic['ipv6-frag'], mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'], mac_ipv4_gtpu_ipv6_basic['ipv6-udp'], + mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], ], 'action': 'check_no_hash', }, @@ -1333,6 +1686,18 @@ mac_ipv4_gtpu_ipv6_gtpu = { 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'].replace('ABAB', '1212').replace('CDCD', '3434'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_ipv6_unmatched_pkt, 'action': 'check_no_hash', @@ -1345,6 +1710,7 @@ mac_ipv4_gtpu_ipv6_gtpu = { mac_ipv4_gtpu_ipv6_basic['ipv6-frag'], mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'], mac_ipv4_gtpu_ipv6_basic['ipv6-udp'], + mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], ], 'action': 'check_no_hash', }, @@ -1354,7 +1720,10 @@ mac_ipv4_gtpu_ipv6_gtpu = { mac_ipv4_gtpu_ipv6_toeplitz = [mac_ipv4_gtpu_ipv6_l3dst_only, mac_ipv4_gtpu_ipv6_l3src_only, mac_ipv4_gtpu_ipv6_all, mac_ipv4_gtpu_ipv6_gtpu] -mac_ipv4_gtpu_ipv6_udp_basic = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)' +mac_ipv4_gtpu_ipv6_udp_basic = { + 'ipv6-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)', + 'gtpogre-ipv6-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)', +} mac_ipv4_gtpu_ipv6_udp_unmatch = [ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22, dport=23)/("X"*480)', 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)', @@ -1366,15 +1735,27 @@ mac_ipv4_gtpu_ipv6_udp_l3dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('ABAB', '1212'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), 'action': 'check_hash_same', }, { @@ -1384,7 +1765,11 @@ mac_ipv4_gtpu_ipv6_udp_l3dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -1403,19 +1788,35 @@ mac_ipv4_gtpu_ipv6_udp_l3src_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('ABAB', '1212'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33').replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33').replace('CDCD', '3434'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33').replace('CDCD', '3434'), 'action': 'check_hash_same', }, { @@ -1425,7 +1826,11 @@ mac_ipv4_gtpu_ipv6_udp_l3src_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -1437,19 +1842,35 @@ mac_ipv4_gtpu_ipv6_udp_l3src_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('ABAB', '1212'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=32').replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=32').replace('CDCD', '3434'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32').replace('CDCD', '3434'), 'action': 'check_hash_same', }, { @@ -1459,7 +1880,11 @@ mac_ipv4_gtpu_ipv6_udp_l3src_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -1471,19 +1896,35 @@ mac_ipv4_gtpu_ipv6_udp_l3dst_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33').replace('ABAB', '1212'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33').replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33').replace('ABAB', '1212'), 'action': 'check_hash_same', }, { @@ -1493,7 +1934,11 @@ mac_ipv4_gtpu_ipv6_udp_l3dst_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -1505,19 +1950,35 @@ mac_ipv4_gtpu_ipv6_udp_l3dst_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('CDCD', '3434'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=32').replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=32').replace('ABAB', '1212'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32').replace('ABAB', '1212'), 'action': 'check_hash_same', }, { @@ -1527,7 +1988,11 @@ mac_ipv4_gtpu_ipv6_udp_l3dst_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -1538,15 +2003,28 @@ mac_ipv4_gtpu_ipv6_udp_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types ipv6-udp l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=32') + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=32') + .replace('ABAB', '1212').replace('CDCD', '3434'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32') .replace('ABAB', '1212').replace('CDCD', '3434'), 'action': 'check_hash_same', }, @@ -1557,7 +2035,11 @@ mac_ipv4_gtpu_ipv6_udp_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -1568,15 +2050,28 @@ mac_ipv4_gtpu_ipv6_udp_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=32') + .replace('ABAB', '1212').replace('CDCD', '3434'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=32') + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=32') .replace('ABAB', '1212').replace('CDCD', '3434'), 'action': 'check_hash_same', }, @@ -1587,7 +2082,11 @@ mac_ipv4_gtpu_ipv6_udp_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -1599,27 +2098,51 @@ mac_ipv4_gtpu_ipv6_udp_all = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types ipv6-udp end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('ABAB', '1212'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'), 'action': 'check_hash_same', }, { @@ -1629,7 +2152,11 @@ mac_ipv4_gtpu_ipv6_udp_all = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -1641,17 +2168,31 @@ mac_ipv4_gtpu_ipv6_udp_gtpu = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types gtpu end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('ABAB', '1212').replace('CDCD', '3434') + .replace('sport=22', 'sport=32') + .replace('dport=23', 'dport=33'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB', '1212').replace('CDCD', '3434') + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212').replace('CDCD', '3434') .replace('sport=22', 'sport=32') .replace('dport=23', 'dport=33'), 'action': 'check_hash_same', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'), 'action': 'check_hash_different', }, { @@ -1661,7 +2202,11 @@ mac_ipv4_gtpu_ipv6_udp_gtpu = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['ipv6-udp'], + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -1684,7 +2229,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_basic = { 'ipv4-icmp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)', 'ipv4-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)', 'ipv4-tcp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP()/("X"*480)', - + 'gtpogre-ipv4-nonfrag': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', } mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_basic).replace('192.168.0.2', '192.168.1.2')) @@ -1711,6 +2256,18 @@ mac_ipv4_gtpu_eh_dl_ipv4_l3dst_only = { 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-nonfrag'], 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'], 'action': 'save_hash', @@ -1772,6 +2329,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_l3dst_only = { mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'], mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'], mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'], + mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], ], 'action': 'check_no_hash', }, @@ -1779,7 +2337,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_l3dst_only = { } mac_ipv4_gtpu_eh_dl_ipv4_l3src_only = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_l3dst_only) - .replace('eh_dl_ipv4_l3dst', 'eh_ul_ipv4_l3src') + .replace('eh_dl_ipv4_l3dst', 'eh_dl_ipv4_l3src') .replace('l3-dst-only', 'l3-src-only') .replace('check_hash_same', 'hash_check_different') .replace('check_hash_different', 'check_hash_same') @@ -1809,6 +2367,26 @@ mac_ipv4_gtpu_eh_dl_ipv4_all = { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'].replace('0x123456', '0x12345'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('0x123456', '0x12345'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'], 'action': 'save_hash', @@ -1902,6 +2480,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_all = { mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'], mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'], mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'], + mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], ], 'action': 'check_no_hash', }, @@ -1925,6 +2504,18 @@ mac_ipv4_gtpu_eh_dl_ipv4_gtpu = { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'], 'action': 'save_hash', @@ -1986,6 +2577,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_gtpu = { mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'], mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'], mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'], + mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], ], 'action': 'check_no_hash', }, @@ -2009,7 +2601,7 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic = { 'ipv4-frag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)', 'ipv4-icmp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)', 'ipv4-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)', - + 'gtpogre-ipv4-nonfrag': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', } mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt = eval(str(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic).replace('192.168.0.2', '192.168.1.2')) @@ -2037,6 +2629,18 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_only = { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-nonfrag'].replace('0x123456', '0x12345'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'].replace('0x123456', '0x12345'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'], 'action': 'save_hash', @@ -2098,6 +2702,7 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_only = { mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'], mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'], mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'], + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], ], 'action': 'check_no_hash', }, @@ -2136,6 +2741,26 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_all = { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'].replace('0x123456', '0x12345'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('0x123456', '0x12345'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'], 'action': 'save_hash', @@ -2229,6 +2854,7 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_all = { mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'], mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'], mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'], + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], ], 'action': 'check_no_hash', }, @@ -2252,6 +2878,18 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_gtpu = { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('0x123456', '0x12345'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'], 'action': 'save_hash', @@ -2313,6 +2951,7 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_gtpu = { mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'], mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'], mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'], + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], ], 'action': 'check_no_hash', }, @@ -2327,6 +2966,8 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_toeplitz = [mac_ipv4_gtpu_eh_without_ul_dl_i mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic = { 'dl': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', 'ul': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', + 'gtpogre-dl': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', + 'gtpogre-ul': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', } mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt = [ @@ -2357,6 +2998,24 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_only = { .replace('0x123456', '0x12345'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'], + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('192.168.0.2', '192.168.1.2') + .replace('sport=22, dport=23', 'sport=32, dport=33') + .replace('0x123456', '0x12345'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt, 'action': 'check_no_hash', @@ -2408,6 +3067,30 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3src_l4src = { .replace('0x123456', '0x12345'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('192.168.0.1', '192.168.1.1') + .replace('dport=23', 'dport=33') + .replace('0x123456', '0x12345'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'].replace('192.168.0.1', '192.168.1.1') + .replace('dport=23', 'dport=33') + .replace('0x123456', '0x12345'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt, 'action': 'check_no_hash', @@ -2468,6 +3151,26 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l4src_only = { .replace('0x123456', '0x12345'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('192.168.0', '192.168.1') + .replace('dport=23', 'dport=33') + .replace('0x123456', '0x12345'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'].replace('192.168.0', '192.168.1') + .replace('dport=23', 'dport=33') + .replace('0x123456', '0x12345'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt, 'action': 'check_no_hash', @@ -2519,6 +3222,30 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp = { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('0x123456', '0x12345'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('0x123456', '0x12345'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt, 'action': 'check_no_hash', @@ -2559,6 +3286,26 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_gtpu = { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('0x123456', '0x12345'), 'action': 'check_hash_different', }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'] + .replace('192.168.0.', '192.168.1.') + .replace('sport=22, dport=23', 'sport=32, dport=33'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'] + .replace('192.168.0.', '192.168.1.') + .replace('sport=22, dport=23', 'sport=32, dport=33'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('0x123456', '0x12345'), + 'action': 'check_hash_different', + }, { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt, 'action': 'check_no_hash', @@ -2622,7 +3369,10 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv6_tcp_toeplitz = [eval(str(element).replace('g .replace('IP(dst="192.168.1.1",src="192.168.1.2"', 'IPv6(dst="1212:910B:6666:3457:8295:3333:1800:2929",src="3434:910A:2222:5498:8475:1111:3900:2020"')) for element in mac_ipv4_gtpu_eh_without_ul_dl_ipv4_tcp_toeplitz] -mac_ipv4_gtpu_eh_dl_ipv4_udp_basic = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)' +mac_ipv4_gtpu_eh_dl_ipv4_udp_basic = { + 'ipv4-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)', + 'gtpogre-ipv4-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)' +} mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch = [ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)', @@ -2633,15 +3383,27 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_same', }, { @@ -2651,7 +3413,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -2670,19 +3432,35 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33').replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33').replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33').replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_same', }, { @@ -2692,7 +3470,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -2704,19 +3482,35 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp l3-src-only l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32').replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32').replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32').replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_same', }, { @@ -2726,7 +3520,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -2738,19 +3532,35 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33').replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33').replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33').replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_same', }, { @@ -2760,7 +3570,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -2772,20 +3582,37 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32') + .replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32') - .replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32') + .replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_same', }, { @@ -2795,7 +3622,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -2806,16 +3633,29 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32') + .replace('192.168.0', '192.168.1'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32') - .replace('192.168.0', '192.168.1'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32') + .replace('192.168.0', '192.168.1'), 'action': 'check_hash_same', }, { @@ -2825,7 +3665,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -2836,16 +3676,29 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=32') + .replace('192.168.0', '192.168.1'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=32') - .replace('192.168.0', '192.168.1'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=32') + .replace('192.168.0', '192.168.1'), 'action': 'check_hash_same', }, { @@ -2855,7 +3708,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -2867,27 +3720,51 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_all = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=32'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'), 'action': 'check_hash_same', }, { @@ -2897,7 +3774,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_all = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -2909,17 +3786,31 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_gtpu = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types gtpu end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('192.168.0', '192.168.1') + .replace('sport=22', 'sport=32') + .replace('dport=23', 'dport=33'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0', '192.168.1') - .replace('sport=22', 'sport=32') - .replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0', '192.168.1') + .replace('sport=22', 'sport=32') + .replace('dport=23', 'dport=33'), 'action': 'check_hash_same', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'), 'action': 'check_hash_different', }, { @@ -2929,7 +3820,7 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_gtpu = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'], 'action': 'check_no_hash', }, ] @@ -2960,6 +3851,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_basic = { 'ipv6-icmp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)', 'ipv6-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP()/("X"*480)', 'ipv6-tcp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP()/("X"*480)', + 'gtpogre-ipv6-nonfrag': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)', } mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt = eval(str(mac_ipv4_gtpu_eh_dl_ipv6_basic).replace('ABAB', '1212')) @@ -2985,6 +3877,18 @@ mac_ipv4_gtpu_eh_dl_ipv6_l3dst_only = { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-nonfrag'], 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['gtpogre-ipv6-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['gtpogre-ipv6-nonfrag'], + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'], 'action': 'save_hash', @@ -3046,6 +3950,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_l3dst_only = { mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'], mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'], mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'], + mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'], ], 'action': 'check_no_hash', }, @@ -3083,6 +3988,26 @@ mac_ipv4_gtpu_eh_dl_ipv6_all = { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'].replace('0x123456', '0x12345'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['gtpogre-ipv6-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['gtpogre-ipv6-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'].replace('0x123456', '0x12345'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'], 'action': 'save_hash', @@ -3176,6 +4101,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_all = { mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'], mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'], mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'], + mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'], ], 'action': 'check_no_hash', }, @@ -3199,6 +4125,18 @@ mac_ipv4_gtpu_eh_dl_ipv6_gtpu = { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'), 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'), + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'], 'action': 'save_hash', @@ -3260,6 +4198,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_gtpu = { mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'], mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'], mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'], + mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'], ], 'action': 'check_no_hash', }, @@ -3277,7 +4216,10 @@ mac_ipv4_gtpu_eh_ul_ipv6_toeplitz = [eval(str(element).replace('(type=1', '(type mac_ipv4_gtpu_eh_ipv6_toeplitz = mac_ipv4_gtpu_eh_dl_ipv6_toeplitz + mac_ipv4_gtpu_eh_ul_ipv6_toeplitz -mac_ipv4_gtpu_eh_dl_ipv6_udp_basic = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)' +mac_ipv4_gtpu_eh_dl_ipv6_udp_basic = { + 'ipv6-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)', + 'gtpogre-ipv6-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)' +} mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch = [ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22, dport=23)/("X"*480)', 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22, dport=23)/("X"*480)', @@ -3288,15 +4230,27 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('ABAB', '1212'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), 'action': 'check_hash_same', }, { @@ -3306,7 +4260,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -3325,19 +4279,35 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('ABAB', '1212'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33').replace('CDCD', '3434'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33').replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33').replace('CDCD', '3434'), 'action': 'check_hash_same', }, { @@ -3347,7 +4317,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -3359,19 +4329,35 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp l3-src-only l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('ABAB', '1212'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=32').replace('CDCD', '3434'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32').replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32').replace('CDCD', '3434'), 'action': 'check_hash_same', }, { @@ -3381,7 +4367,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -3393,19 +4379,35 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33').replace('ABAB', '1212'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33').replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33').replace('ABAB', '1212'), 'action': 'check_hash_same', }, { @@ -3415,7 +4417,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -3427,19 +4429,35 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=32').replace('ABAB', '1212'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32').replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32').replace('ABAB', '1212'), 'action': 'check_hash_same', }, { @@ -3449,7 +4467,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -3460,15 +4478,28 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l4dst = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp l4-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=32') + .replace('ABAB', '1212').replace('CDCD', '3434'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32') + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32') .replace('ABAB', '1212').replace('CDCD', '3434'), 'action': 'check_hash_same', }, @@ -3479,7 +4510,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l4dst = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -3490,15 +4521,28 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l4src = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=32'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=32') + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=32') + .replace('ABAB', '1212').replace('CDCD', '3434'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=32') .replace('ABAB', '1212').replace('CDCD', '3434'), 'action': 'check_hash_same', }, @@ -3509,7 +4553,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_l4src = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -3521,27 +4565,51 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_all = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('ABAB', '1212'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'), 'action': 'check_hash_same', }, { @@ -3551,7 +4619,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_all = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -3563,17 +4631,31 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_gtpu = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types gtpu end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('ABAB', '1212').replace('CDCD', '3434') + .replace('sport=22', 'sport=32') + .replace('dport=23', 'dport=33'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB', '1212').replace('CDCD', '3434') + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212').replace('CDCD', '3434') .replace('sport=22', 'sport=32') .replace('dport=23', 'dport=33'), 'action': 'check_hash_same', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'), 'action': 'check_hash_different', }, { @@ -3583,7 +4665,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_udp_gtpu = { ], 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic, + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['ipv6-udp'], 'action': 'check_no_hash', }, ] @@ -3814,6 +4896,14 @@ inner_l4_mac_ipv4_gtpu_ipv4_udp_tcp = { 'send_packet': 'Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:ca:a3:28:94")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:ca:a3:28:94")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)', + 'action': 'check_hash_different', + }, ], 'post-test': [ { @@ -3831,7 +4921,8 @@ inner_l4_mac_ipv6_gtpu_ipv4_udp_tcp = eval(str(inner_l4_mac_ipv4_gtpu_ipv4_udp_t .replace('gtpu / ipv4', 'gtpu / gtp_psc / ipv4') .replace('IP()', 'IPv6()') .replace('teid=0x123456)', 'teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) ') - .replace('mac_ipv4', 'mac_ipv6')) + .replace('mac_ipv4', 'mac_ipv6') + .replace('IP(proto=0x2F)/GRE(proto=0x0800', 'IPv6(nh=0x2F)/GRE(proto=0x86DD')) inner_l4_mac_ipv4_gtpu_eh_ipv6_udp_tcp = { 'sub_casename': 'mac_ipv4_gtpu_eh_ipv6_udp_tcp', 'port_id': 0, @@ -3848,6 +4939,14 @@ inner_l4_mac_ipv4_gtpu_eh_ipv6_udp_tcp = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)', + 'action': 'check_hash_different', + }, ], 'post-test': [ { @@ -3865,7 +4964,9 @@ inner_l4_mac_ipv6_gtpu_eh_ipv6_udp_tcp = eval(str(inner_l4_mac_ipv4_gtpu_eh_ipv6 .replace('pdu_t is 0', 'pdu_t is 1') .replace('(type=0', '(type=1') .replace('IP()', 'IPv6()') - .replace('mac_ipv4', 'mac_ipv6')) + .replace('mac_ipv4', 'mac_ipv6') + .replace('IP(proto=0x2F)/GRE(proto=0x0800', 'IPv6(nh=0x2F)/GRE(proto=0x86DD') + .replace('GTP_PDUSession_ExtensionHeader(pdu_type=0', 'GTP_PDUSession_ExtensionHeader(pdu_type=1')) inner_l4_protocal_hash = [inner_l4_mac_ipv4_gtpu_ipv4_udp_tcp, inner_l4_mac_ipv6_gtpu_ipv4_udp_tcp, inner_l4_mac_ipv4_gtpu_eh_ipv6_udp_tcp, inner_l4_mac_ipv6_gtpu_eh_ipv6_udp_tcp] @@ -3898,6 +4999,14 @@ mac_ipv4_gtpu_eh_ipv4_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)', + 'action': 'check_hash_different', + }, ], 'test': [ { @@ -3924,6 +5033,14 @@ mac_ipv4_gtpu_eh_ipv4_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', + 'action': {'save_hash': 'gtpogre-ipv4-nonfrag'}, + }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)', + 'action': 'check_hash_same', + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)', 'action': 'save_hash', @@ -3954,6 +5071,10 @@ mac_ipv4_gtpu_eh_ipv4_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)', 'action': {'check_no_hash_or_different': 'ipv4-icmp'}, }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)', + 'action': {'check_no_hash_or_different': 'gtpogre-ipv4-nonfrag'}, + }, ], } @@ -3989,6 +5110,10 @@ mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_different', + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', 'action': {'save_hash', 'udp-ul'}, @@ -4005,6 +5130,10 @@ mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_different', + }, ], 'test': [ { @@ -4023,6 +5152,10 @@ mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_same', + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', 'action': 'save_hash', @@ -4039,6 +5172,10 @@ mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_same', + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)', 'action': 'save_hash', @@ -4066,11 +5203,11 @@ mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric = { ], 'post-test': [ { - 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)', 'action': {'check_hash_different', 'udp-dl'}, }, { - 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)', 'action': {'check_hash_different', 'udp-ul'}, }, ], @@ -4106,6 +5243,10 @@ mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_different', + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)', 'action': {'save_hash', 'udp-ul'}, @@ -4122,6 +5263,10 @@ mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)', + 'action': 'check_hash_different', + }, ], 'test': [ { @@ -4140,6 +5285,10 @@ mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)', + 'action': 'check_hash_same', + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)', 'action': 'save_hash', @@ -4156,6 +5305,10 @@ mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric = { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)', + 'action': 'check_hash_same', + }, { 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)', 'action': 'save_hash', @@ -4183,11 +5336,11 @@ mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric = { ], 'post-test': [ { - 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)', + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)', 'action': {'check_hash_different', 'udp-dl'}, }, { - 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)', + 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=1, P=1, QFI=0x34) /IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)', 'action': {'check_hash_different', 'udp-ul'}, }, ],