From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CA2FFA0561; Wed, 3 Mar 2021 11:44:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B4D7F406B4; Wed, 3 Mar 2021 11:44:54 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 74BED40696 for ; Wed, 3 Mar 2021 11:44:51 +0100 (CET) IronPort-SDR: 3J8rzdchiEATvhb67J1BUCz3NhXof7WTnA5ksGtb9u+rxm5oWxie1fyx9mXdMKsk1NiYxObIoa K1Groq9GvTRg== X-IronPort-AV: E=McAfee;i="6000,8403,9911"; a="186516122" X-IronPort-AV: E=Sophos;i="5.81,219,1610438400"; d="scan'208";a="186516122" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Mar 2021 02:44:50 -0800 IronPort-SDR: 5s8YxQqyq/otCqGy6BT6fyEL3Gi24AbgT+LKw4l4I/WaLRh1iqIyCmBY1jjtdD7wybn7gg7gma Age7P5iQi04A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,219,1610438400"; d="scan'208";a="399661727" Received: from pengyuan-dpdk.sh.intel.com ([10.67.117.236]) by fmsmga008.fm.intel.com with ESMTP; 03 Mar 2021 02:44:48 -0800 From: Peng Yuan To: dts@dpdk.org Cc: Peng Yuan Date: Wed, 3 Mar 2021 03:44:09 +0000 Message-Id: <20210303034409.67760-1-yuan.peng@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH v2]tests: add gtpogre packet check to TestSuite_cvl_advanced_iavf_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_iavf_rss_gtpu.py Signed-off-by: Peng Yuan diff --git a/tests/TestSuite_cvl_advanced_iavf_rss_gtpu.py b/tests/TestSuite_cvl_advanced_iavf_rss_gtpu.py index 310057ec..93e1309b 100755 --- a/tests/TestSuite_cvl_advanced_iavf_rss_gtpu.py +++ b/tests/TestSuite_cvl_advanced_iavf_rss_gtpu.py @@ -44,6 +44,7 @@ mac_ipv4_gtpu_ipv4_basic = { 'ipv4-icmp': 'Ether(dst="00:11:22:33:44:55")/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-tcp': 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/TCP()/("X"*480)', 'ipv4-udp': 'Ether(dst="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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')) @@ -66,6 +67,18 @@ mac_ipv4_gtpu_ipv4_l3dst_only = { 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-nonfrag'], '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_basic['ipv4-frag'], 'action': 'save_hash', @@ -145,6 +158,22 @@ mac_ipv4_gtpu_ipv4_all = { 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'].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_basic['ipv4-frag'], 'action': 'save_hash', @@ -230,6 +259,18 @@ mac_ipv4_gtpu_ipv4_gtpu = { 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'].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_basic['ipv4-frag'], 'action': 'save_hash', @@ -294,6 +335,14 @@ mac_ipv4_gtpu_ipv4_symmetric = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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", frag=6)/("X"*480)', + 'action': {'save_hash': 'ipv4-frag'}, + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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", frag=6)/("X"*480)', + 'action': 'check_hash_same', + }, { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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)', 'action': {'save_hash': 'ipv4-icmp'}, @@ -320,6 +369,10 @@ mac_ipv4_gtpu_ipv4_symmetric = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)', 'action': {'check_no_hash_or_different': 'ipv4-frag'}, }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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",frag=6)/("X"*480)', + 'action': {'check_no_hash_or_different': 'ipv4-frag'}, + }, { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_no_hash_or_different': 'ipv4-icmp'}, @@ -361,6 +414,10 @@ mac_ipv4_gtpu_ipv4_udp_symmetric = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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', + }, ], 'post-test': [ { @@ -375,6 +432,10 @@ mac_ipv4_gtpu_ipv4_udp_symmetric = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_no_hash_or_different', }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_no_hash_or_different', + }, ], } @@ -436,6 +497,14 @@ mac_ipv4_gtpu_eh_dl_ipv4_symmetric = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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()/("X"*480)', + 'action': {'save_hash': 'ipv4-udp'}, + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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()/("X"*480)', + 'action': 'check_hash_same', + }, ], 'post-test': [ { @@ -447,13 +516,17 @@ mac_ipv4_gtpu_eh_dl_ipv4_symmetric = { 'action': {'check_no_hash_or_different': 'ipv4-frag'}, }, { - 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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)', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_no_hash_or_different': 'ipv4-icmp'}, }, { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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': 'ipv4-udp'}, }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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()/("X"*480)', + 'action': {'check_no_hash_or_different': 'ipv4-udp'}, + }, ], } mac_ipv4_gtpu_eh_ul_ipv4_symmetric = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_symmetric) @@ -487,6 +560,10 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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', + }, ], 'post-test': [ { @@ -501,6 +578,10 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_no_hash_or_different', }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_no_hash_or_different', + }, ], } mac_ipv4_gtpu_eh_ul_ipv4_udp_symmetric = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric) @@ -545,7 +626,10 @@ 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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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_l3dst = { 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3dst', @@ -553,15 +637,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['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_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('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_same', }, ], @@ -581,19 +677,36 @@ 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['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('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.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('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.1', + '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', }, @@ -607,19 +720,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', }, ], @@ -632,19 +761,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.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('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.2', '192.168.1.2'), + '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['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('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.2', '192.168.1.2'), 'action': 'check_hash_same', }, ], @@ -657,19 +802,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', }, ], @@ -681,15 +842,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['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', '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.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') + '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', }, @@ -702,15 +876,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['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=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.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=32') + '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', }, @@ -724,27 +911,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', }, ], @@ -757,19 +968,35 @@ mac_ipv4_gtpu_ipv4_udp_l3 = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4 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('192.168.0.2', '192.168.1.2'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['ipv4-udp'].replace('sport=22,dport=23', 'sport=12,dport=13'), + '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('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('sport=22,dport=23', 'sport=12,dport=13'), + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22,dport=23', 'sport=12,dport=13'), 'action': 'check_hash_same', }, ], @@ -793,6 +1020,7 @@ mac_ipv4_gtpu_ipv6_basic = { 'ipv6-icmp': 'Ether(dst="00:11:22:33:44:55")/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-tcp': 'Ether(dst="00:11:22:33:44:55")/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()/("X"*480)', 'ipv6-udp': 'Ether(dst="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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')) @@ -815,6 +1043,18 @@ mac_ipv4_gtpu_ipv6_l3dst_only = { 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-nonfrag'], 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'action': {'save_hash', 'ipv6-nonfrag'}, + }, + { + '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_basic['ipv6-frag'], 'action': {'save_hash', 'ipv6-frag'}, @@ -884,6 +1124,18 @@ mac_ipv4_gtpu_ipv6_l3src_only = { 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-nonfrag'], 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'action': {'save_hash', 'ipv6-nonfrag'}, + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['gtpogre-ipv6-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['gtpogre-ipv6-nonfrag'], + 'action': 'check_hash_same', + }, { 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'], 'action': {'save_hash', 'ipv6-frag'}, @@ -963,6 +1215,22 @@ mac_ipv4_gtpu_ipv6_all = { 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'), 'action': 'check_hash_different', }, + { + 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'action': {'save_hash', 'ipv6-nonfrag'}, + }, + { + '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-frag'], 'action': {'save_hash', 'ipv6-frag'}, @@ -1048,6 +1316,18 @@ mac_ipv4_gtpu_ipv6_gtpu = { 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'].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_basic['ipv6-frag'], 'action': 'save_hash', @@ -1091,23 +1371,37 @@ 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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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_l3dst = { 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l3dst', 'port_id': 0, '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', }, ], @@ -1127,19 +1421,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['ipv6-udp'].replace('ABAB', '1212'), + '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('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('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('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('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33').replace('CDCD', '3434'), 'action': 'check_hash_same', }, ], @@ -1152,19 +1462,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['ipv6-udp'].replace('ABAB', '1212'), + '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('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.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('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('sport=22', 'sport=32').replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32').replace('CDCD', '3434'), 'action': 'check_hash_same', }, ], @@ -1177,19 +1503,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', }, ], @@ -1202,19 +1544,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', }, ], @@ -1226,15 +1584,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', }, @@ -1247,15 +1618,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.replace('sport=22', 'sport=32'), + '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.replace('dport=23', 'dport=32') + '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['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32'), + 'action': 'check_hash_different', + }, + { + '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', }, @@ -1269,27 +1653,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', }, ], @@ -1503,7 +1911,7 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic = { 'ipv4-frag': 'Ether(dst="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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')) @@ -1526,6 +1934,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', @@ -1602,6 +2022,18 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_all = { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-nonfrag'], 'action': 'check_hash_different', }, + { + '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['ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'), 'action': 'check_hash_different', @@ -1711,6 +2143,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', @@ -1770,6 +2214,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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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_l3dst_only = { @@ -1805,6 +2251,34 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_only = { 'sport=32, dport=33'), '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-ul'].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'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'].replace('192.168.0.2', '192.168.1.2') + .replace('sport=22, dport=23', + 'sport=32, dport=33'), + 'action': 'check_hash_same', + }, ], 'post-test': [] } @@ -1844,6 +2318,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', + }, ], 'post-test': [] } @@ -1892,6 +2390,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', + }, ], 'post-test': [] } @@ -1931,6 +2449,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', + }, ], 'post-test': [] } @@ -1972,6 +2514,38 @@ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3 = { 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'].replace('sport=22, dport=23', 'sport=12, dport=13'), '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'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'].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-ul'].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('sport=22, dport=23', 'sport=12, dport=13'), + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'].replace('sport=22, dport=23', 'sport=12, dport=13'), + 'action': 'check_hash_same', + }, ], 'post-test': [] } @@ -2027,22 +2601,37 @@ 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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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_l3dst = { 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst', 'port_id': 0, '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', }, ], @@ -2063,19 +2652,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', }, ], @@ -2088,19 +2693,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', }, ], @@ -2113,19 +2734,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.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('sport=22', 'sport=33'), + '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.replace('dport=23', 'dport=33').replace('192.168.0.2', '192.168.1.2'), + '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['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('sport=22', 'sport=33'), + 'action': 'check_hash_different', + }, + { + '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', }, ], @@ -2138,19 +2775,36 @@ 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.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('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('sport=22', 'sport=32') + '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['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('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + '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', }, @@ -2163,15 +2817,28 @@ 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.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('sport=22', 'sport=32') + '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['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('sport=22', 'sport=32') .replace('192.168.0', '192.168.1'), 'action': 'check_hash_same', }, @@ -2184,15 +2851,28 @@ 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') + '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', }, @@ -2206,23 +2886,43 @@ 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['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', }, ], @@ -2235,19 +2935,35 @@ mac_ipv4_gtpu_eh_dl_ipv4_udp_l3 = { 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4 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_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['ipv4-udp'].replace('sport=22', 'sport=12').replace('dport=23', 'dport=13'), + '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_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=12').replace('dport=23', 'dport=13'), + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=12').replace('dport=23', 'dport=13'), 'action': 'check_hash_same', }, ], @@ -2281,6 +2997,7 @@ mac_ipv4_gtpu_eh_dl_ipv6_basic = { 'ipv6-icmp': 'Ether(dst="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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')) @@ -2303,6 +3020,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', @@ -2382,6 +3111,22 @@ mac_ipv4_gtpu_eh_dl_ipv6_all = { 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'), 'action': 'check_hash_different', }, + { + '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['ipv6-frag'], 'action': 'save_hash', @@ -2461,22 +3206,37 @@ 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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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_l3dst = { 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst', 'port_id': 0, '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.replace('CDCD', '3434'), + '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.replace('ABAB', '1212'), + '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['gtpogre-ipv6-udp'].replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), 'action': 'check_hash_same', }, ], @@ -2496,19 +3256,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', }, ], @@ -2521,19 +3297,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.replace('ABAB', '1212'), + '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.replace('dport=23', 'dport=33'), + '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.replace('sport=22', 'sport=32').replace('CDCD', '3434'), + '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['gtpogre-ipv6-udp'].replace('ABAB', '1212'), + 'action': 'check_hash_different', + }, + { + '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['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32').replace('CDCD', '3434'), 'action': 'check_hash_same', }, ], @@ -2546,19 +3338,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.replace('CDCD', '3434'), + '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.replace('sport=22', 'sport=33'), + '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.replace('dport=23', 'dport=33').replace('ABAB', '1212'), + '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['gtpogre-ipv6-udp'].replace('CDCD', '3434'), + 'action': 'check_hash_different', + }, + { + '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['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33').replace('ABAB', '1212'), 'action': 'check_hash_same', }, ], @@ -2571,19 +3379,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', }, ], @@ -2595,15 +3419,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.replace('dport=23', 'dport=33'), + '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.replace('sport=22', 'sport=32') + '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['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), + 'action': 'check_hash_different', + }, + { + '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', }, @@ -2616,15 +3453,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['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=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('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=32') + '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', }, @@ -2638,23 +3488,43 @@ 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['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', }, ], @@ -2696,6 +3566,14 @@ inner_l4_mac_ipv4_gtpu_ipv4_udp_tcp = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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': [ { @@ -2706,6 +3584,14 @@ inner_l4_mac_ipv4_gtpu_ipv4_udp_tcp = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_same_or_no_hash', }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_or_no_hash', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_same_or_no_hash', + }, ] } inner_l4_mac_ipv6_gtpu_ipv4_udp_tcp = eval(str(inner_l4_mac_ipv4_gtpu_ipv4_udp_tcp) @@ -2713,7 +3599,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': 'inner_l4_mac_ipv4_gtpu_eh_ipv6_udp_tcp', 'port_id': 0, @@ -2730,6 +3617,14 @@ inner_l4_mac_ipv4_gtpu_eh_ipv6_udp_tcp = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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="00:11:22:33:44:55")/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': [ { @@ -2740,6 +3635,14 @@ inner_l4_mac_ipv4_gtpu_eh_ipv6_udp_tcp = { 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_same_or_no_hash', }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_or_no_hash', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/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_same_or_no_hash', + }, ] } inner_l4_mac_ipv6_gtpu_eh_ipv6_udp_tcp = eval(str(inner_l4_mac_ipv4_gtpu_eh_ipv6_udp_tcp) @@ -2747,7 +3650,8 @@ 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)')) 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] -- 2.17.1