From patchwork Thu Aug 26 06:57:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: hailinx X-Patchwork-Id: 97350 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 0F84CA0547; Thu, 26 Aug 2021 08:58:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EA70440140; Thu, 26 Aug 2021 08:58:03 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 022474013F for ; Thu, 26 Aug 2021 08:58:00 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10087"; a="197919623" X-IronPort-AV: E=Sophos;i="5.84,352,1620716400"; d="scan'208";a="197919623" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2021 23:57:59 -0700 X-IronPort-AV: E=Sophos;i="5.84,352,1620716400"; d="scan'208";a="537220182" Received: from unknown (HELO localhost.localdomain) ([10.240.183.55]) by fmsmga002-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2021 23:57:56 -0700 From: Hailin Xu To: dts@dpdk.org Cc: qi.fu@intel.com, Hailin Xu Date: Thu, 26 Aug 2021 14:57:25 +0800 Message-Id: <20210826065725.6256-1-hailinx.xu@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH v1] tests: add test cases for iavf rss support gtpogre 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" The ice_gtp-o-gre pkg support GTPoGRE parsing, Based on this ddp pkg, dpdk enable rte_flow for GTPoGRE in CVL IAVF. Add this test plan for GTPoGRE RSS tests. Signed-off-by: Hailin Xu Tested-by: Xu Hailin Acked-by: Fu, Qi --- ...TestSuite_cvl_advanced_iavf_rss_gtpogre.py | 5658 ++++++++++++----- 1 file changed, 4105 insertions(+), 1553 deletions(-) diff --git a/tests/TestSuite_cvl_advanced_iavf_rss_gtpogre.py b/tests/TestSuite_cvl_advanced_iavf_rss_gtpogre.py index 5d5d7eea..8ed9974a 100755 --- a/tests/TestSuite_cvl_advanced_iavf_rss_gtpogre.py +++ b/tests/TestSuite_cvl_advanced_iavf_rss_gtpogre.py @@ -1,6 +1,6 @@ # BSD LICENSE # -# Copyright(c)2021 Intel Corporation. All rights reserved. +# Copyright(c) 2021 Intel Corporation. All rights reserved. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -31,2100 +31,4547 @@ import re -import random import time from packet import Packet from pmd_output import PmdOutput from test_case import TestCase from rte_flow_common import RssProcessing -mac_ipv4_gtpu_ipv4_basic = { - '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)', +# ipv4+ipv4+ipv4 +mac_ipv4_gre_ipv4_gtpu_ipv4_basic = { + 'gtpogre-ipv4-nonfrag': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/IP(src="1.1.2.6", dst="1.1.2.7")', } -mac_ipv4_gtpu_ipv4_l3src_changed_pkt = eval(str(mac_ipv4_gtpu_ipv4_basic).replace('192.168.0.2', '192.168.1.2')) -mac_ipv4_gtpu_ipv4_l3dst_changed_pkt = eval(str(mac_ipv4_gtpu_ipv4_basic).replace('192.168.0.1', '192.168.1.1')) +mac_ipv4_gre_ipv4_gtpu_ipv4_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv4_basic).replace('1.1.2.6', '1.1.2.16')) +mac_ipv4_gre_ipv4_gtpu_ipv4_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv4_basic).replace('1.1.2.7', '1.1.2.17')) +mac_ipv4_gre_ipv4_gtpu_ipv4_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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_ipv4_l3dst_only = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_l3dst', +mac_ipv4_gre_ipv4_gtpu_ipv4_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_l3dst', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_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'], + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.16", dst="1.1.2.7")', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_ipv4_l3src_only = eval(str(mac_ipv4_gtpu_ipv4_l3dst_only) - .replace('mac_ipv4_gtpu_ipv4_l3dst', 'mac_ipv4_gtpu_ipv4_l3src') - .replace('l3-dst-only', 'l3-src-only') - .replace('check_hash_same', 'hash_check_different') - .replace('check_hash_different', 'check_hash_same') - .replace('hash_check_different', 'check_hash_different')) -mac_ipv4_gtpu_ipv4_all = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_all', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end', - 'test': [ - { - '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_gre_ipv4_gtpu_ipv4_unmatched_pkt, + 'action': 'check_no_hash', }, + ], + 'post-test': [ { - '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_gre_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', }, - ], - 'post-test': [] + ] } -mac_ipv4_gtpu_ipv4_gtpu = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_gtpu', +mac_ipv4_gre_ipv4_gtpu_ipv4_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_l3src', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / end actions rss types gtpu end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_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'), + 'send_packet': mac_ipv4_gre_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.'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.6", dst="1.1.2.17")', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_ipv4_toeplitz = [mac_ipv4_gtpu_ipv4_l3dst_only, mac_ipv4_gtpu_ipv4_l3src_only, - mac_ipv4_gtpu_ipv4_all, mac_ipv4_gtpu_ipv4_gtpu] - -mac_ipv4_gtpu_ipv4_symmetric = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_symmetric', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end', - 'test': [ - { - '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': 'gtpogre-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': mac_ipv4_gre_ipv4_gtpu_ipv4_unmatched_pkt, + 'action': 'check_no_hash', }, ], 'post-test': [ { - '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': 'gtpogre-ipv4-frag'}, + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', }, - ], + ] } -mac_ipv4_gtpu_ipv6_symmetric = eval(str(mac_ipv4_gtpu_ipv4_symmetric).replace('IPv6', 'IPv61') - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.2",src="192.168.0.1"', 'IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020",src="ABAB:910B:6666:3457:8295:3333:1800:2929"') - .replace(', frag=6)', ')/IPv6ExtHdrFragment()') - .replace('IPv61(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(dst="192.168.0.1",src="192.168.0.2")') - .replace('IPv61(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(src="192.168.0.1",dst="192.168.0.2")') - .replace('gtpu / ipv4', 'gtpu / ipv6').replace('types ipv4', 'types ipv6') - ) - -mac_ipv4_gtpu_ipv4_udp_symmetric = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_symmetric', +mac_ipv4_gre_ipv4_gtpu_ipv4_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_all', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end', 'test': [ { - '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': {'save_hash': 'basic_with_rule'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], + '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=23, dport=22)/("X"*480)', - 'action': 'check_hash_same', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + '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.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)', - 'action': 'check_hash_same', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + '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.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', - 'action': 'check_hash_same', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'].replace('1.1.2.7', '1.1.2.17'), + '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")/UDP(sport=23, dport=22)/("X"*480)', - 'action': 'check_hash_same', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_unmatched_pkt, + 'action': 'check_no_hash', }, ], 'post-test': [ { - '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', - }, - { - '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")/UDP(sport=22, dport=23)/("X"*480)', - 'action': 'check_no_hash_or_different', + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_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.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', - }, - ], + ] } -mac_ipv4_gtpu_ipv6_udp_symmetric = eval(str(mac_ipv4_gtpu_ipv4_udp_symmetric).replace('IPv6', 'IPv61') - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.2",src="192.168.0.1"', 'IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020",src="ABAB:910B:6666:3457:8295:3333:1800:2929"') - .replace('IPv61(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(dst="192.168.0.1",src="192.168.0.2")') - .replace('IPv61(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(src="192.168.0.1",dst="192.168.0.2")') - .replace('gtpu / ipv4', 'gtpu / ipv6').replace('types ipv4-udp', 'types ipv6-udp') - ) +mac_ipv4_gre_ipv4_gtpu_ipv4_toeplitz = [mac_ipv4_gre_ipv4_gtpu_ipv4_l3dst_only, mac_ipv4_gre_ipv4_gtpu_ipv4_l3src_only, + mac_ipv4_gre_ipv4_gtpu_ipv4_all] + +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic = { + 'gtpogre-ipv4-nonfrag': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/IP(src="1.1.2.6", dst="1.1.2.7")/UDP(dport=2, sport=4)', +} -mac_ipv4_gtpu_ipv4_tcp_symmetric = eval(str(mac_ipv4_gtpu_ipv4_udp_symmetric).replace('TCP(', 'TCP1(') - .replace('UDP(sport', 'TCP(sport').replace('TCP1', 'UDP') - .replace('udp / end', 'tcp / end ').replace('ipv4-udp', 'ipv4-tcp') - .replace('udp_symmetric', 'tcp_symmetric')) +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic).replace('1.1.2.6', '1.1.2.16')) +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic).replace('1.1.2.7', '1.1.2.17')) +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic).replace('sport=4', 'sport=14')) +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic).replace('dport=2', 'dport=12')) -mac_ipv4_gtpu_ipv6_tcp_symmetric = eval(str(mac_ipv4_gtpu_ipv4_tcp_symmetric).replace('IPv6', 'IPv61') - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.2",src="192.168.0.1"', 'IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020",src="ABAB:910B:6666:3457:8295:3333:1800:2929"') - .replace('IPv61(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(dst="192.168.0.1",src="192.168.0.2")') - .replace('IPv61(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(src="192.168.0.1",dst="192.168.0.2")') - .replace('gtpu / ipv4', 'gtpu / ipv6').replace('types ipv4-tcp', 'types ipv6-tcp') - ) +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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=4, dport=2)/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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(dport=2, sport=4)/("X"*480)', +] -mac_ipv4_gtpu_eh_dl_ipv4_symmetric = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_symmetric', +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dst', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end', 'test': [ { - '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': 'gtpogre-ipv4-udp'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + '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)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=12, sport=14)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], 'post-test': [ { - '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': 'gtpogre-ipv4-udp'}, + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', }, - ], + ] } -mac_ipv4_gtpu_eh_ul_ipv4_symmetric = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_symmetric) - .replace('(type=1', '(type=2') - .replace('(type=0', '(type=1') - .replace('(type=2', '(type=0') - .replace('eh_dl', 'eh_ul') - .replace('gtp_psc pdu_t is 0', 'gtp_psc pdu_t is 1') - ) - -mac_ipv4_gtpu_eh_ipv4_symmetric = [mac_ipv4_gtpu_eh_dl_ipv4_symmetric, mac_ipv4_gtpu_eh_ul_ipv4_symmetric] -mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric', +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3src', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end', 'test': [ { - '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(sport=22, dport=23)/("X"*480)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], '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)/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="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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + '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)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=12, sport=14)', '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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, ], 'post-test': [ { - '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(sport=23, dport=22)/("X"*480)', - 'action': 'check_no_hash_or_different', + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_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)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("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=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) - .replace('(type=1', '(type=2') - .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')) -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') - .replace('UDP(sport', 'TCP(sport').replace('TCP1', 'UDP') - .replace('ipv4 / tcp / gtpu', 'ipv4 / udp / gtpu')) - for element in mac_ipv4_gtpu_eh_ipv4_udp_symmetric] - -mac_ipv4_gtpu_eh_ipv6_symmetric = eval(str(mac_ipv4_gtpu_eh_ipv4_symmetric).replace('IPv6', 'IPv61') - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.2",src="192.168.0.1"', 'IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020",src="ABAB:910B:6666:3457:8295:3333:1800:2929"') - .replace(', frag=6)', ')/IPv6ExtHdrFragment()') - .replace('IPv61(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(dst="192.168.0.1",src="192.168.0.2")') - .replace('IPv61(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(src="192.168.0.1",dst="192.168.0.2")') - .replace('ipv4 / end', 'ipv6 / end').replace('types ipv4', 'types ipv6') - .replace('ipv4_symmetric', 'ipv6_symmetric') - ) - -mac_ipv4_gtpu_eh_ipv6_udp_symmetric = eval(str(mac_ipv4_gtpu_eh_ipv4_udp_symmetric).replace('IPv6', 'IPv61') - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.2",src="192.168.0.1"', 'IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020",src="ABAB:910B:6666:3457:8295:3333:1800:2929"') - .replace('IPv61(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(dst="192.168.0.1",src="192.168.0.2")') - .replace('IPv61(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(src="192.168.0.1",dst="192.168.0.2")') - .replace('ipv4 / udp / end', 'ipv6 / udp / end').replace('types ipv4-udp', 'types ipv6-udp') - .replace('ipv4_udp_symmetric', 'ipv6_udp_symmetric') - ) - - -mac_ipv4_gtpu_eh_ipv6_tcp_symmetric = eval(str(mac_ipv4_gtpu_eh_ipv4_tcp_symmetric).replace('IPv6', 'IPv61') - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.2",src="192.168.0.1"', 'IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020",src="ABAB:910B:6666:3457:8295:3333:1800:2929"') - .replace('IPv61(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(dst="192.168.0.1",src="192.168.0.2")') - .replace('IPv61(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', 'IP(src="192.168.0.1",dst="192.168.0.2")') - .replace('ipv4 / tcp / end', 'ipv6 / tcp / end').replace('types ipv4-tcp', 'types ipv6-tcp') - .replace('ipv4_tcp_symmetric', 'ipv6_tcp_symmetric') - ) - -mac_ipv4_gtpu_ipv4_udp_basic = { - '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)', - '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', +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4src', 'port_id': 0, - '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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.16", dst="1.1.2.17")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_ipv4_udp_l3src = eval(str(mac_ipv4_gtpu_ipv4_udp_l3dst) - .replace('mac_ipv4_gtpu_ipv4_udp_l3dst', 'mac_ipv4_gtpu_ipv4_udp_l3src') - .replace('l3-dst-only', 'l3-src-only') - .replace('check_hash_same', 'hash_check_different') - .replace('check_hash_different', 'check_hash_same') - .replace('hash_check_different', 'check_hash_different')) - -mac_ipv4_gtpu_ipv4_udp_l3src_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3src_l4src', +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4dst', 'port_id': 0, - '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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.16", dst="1.1.2.17")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', }, { - '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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_ipv4_udp_l3src_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3src_l4dst', +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3srcl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3srcl4src', 'port_id': 0, - '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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_ipv4_udp_l3dst_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3dst_l4src', +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3srcl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3srcl4dst', 'port_id': 0, - '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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=2, sport=14)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_ipv4_udp_l3dst_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3dst_l4dst', +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dstl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dstl4src', 'port_id': 0, - '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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_ipv4_udp_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l4dst', + +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dstl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dstl4dst', 'port_id': 0, - '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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], '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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', }, - ], - 'post-test': [] -} -mac_ipv4_gtpu_ipv4_udp_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l4src', - 'port_id': 0, - '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['gtpogre-ipv4-udp'], - 'action': 'save_hash', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32'), - 'action': 'check_hash_different', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, + ], + 'post-test': [ { - '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', + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', }, - ], - 'post-test': [] + ] } -mac_ipv4_gtpu_ipv4_udp_all = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_all', +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_udp_all', 'port_id': 0, - '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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IP(src="1.1.2.6", dst="1.1.2.7")/UDP(dport=2, sport=4)', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_ipv4_udp_l3 = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3', - 'port_id': 0, - '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['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_different', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, + ], + 'post-test': [ { - 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22,dport=23', 'sport=12,dport=13'), - 'action': 'check_hash_same', + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', }, - ], - 'post-test': [] + ] } -mac_ipv4_gtpu_ipv4_udp_toeplitz = [mac_ipv4_gtpu_ipv4_udp_l3dst, mac_ipv4_gtpu_ipv4_udp_l3src, - mac_ipv4_gtpu_ipv4_udp_l3dst_l4src, mac_ipv4_gtpu_ipv4_udp_l3dst_l4dst, - mac_ipv4_gtpu_ipv4_udp_l3src_l4src, mac_ipv4_gtpu_ipv4_udp_l3src_l4dst, - mac_ipv4_gtpu_ipv4_udp_l4src, mac_ipv4_gtpu_ipv4_udp_l4dst, - mac_ipv4_gtpu_ipv4_udp_all, mac_ipv4_gtpu_ipv4_udp_l3] +mac_ipv4_gre_ipv4_gtpu_ipv4_udp_toeplitz = [mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dst_only, mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3src_only, + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4dst_only, mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l4src_only, + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dstl4dst, mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3srcl4dst, + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3dstl4src, mac_ipv4_gre_ipv4_gtpu_ipv4_udp_l3srcl4src, + mac_ipv4_gre_ipv4_gtpu_ipv4_udp_all] + -mac_ipv4_gtpu_ipv4_tcp_toeplitz = [eval(str(element).replace('TCP', 'TCP1').replace('udp', 'tcp') - .replace('UDP(sport', 'TCP(sport').replace('TCP1', 'UDP') - .replace('ipv4 / tcp / gtpu', 'ipv4 / udp / gtpu')) - for element in mac_ipv4_gtpu_ipv4_udp_toeplitz] +mac_ipv4_gre_ipv4_gtpu_ipv4_tcp_toeplitz = [eval(str(element).replace('_udp', '_tcp') + .replace('TCP(sport', 'UDP(sport') + .replace('UDP(dport', 'TCP(dport') + .replace('gtpu / ipv4 / udp', 'gtpu / ipv4 / tcp') + .replace('ipv4-udp', 'ipv4-tcp')) + for element in mac_ipv4_gre_ipv4_gtpu_ipv4_udp_toeplitz] -mac_ipv4_gtpu_ipv6_basic = { - '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_gre_ipv4_gtpu_eh_ipv4_basic = { + 'gtpogre-ipv4-nonfrag': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.7")', + 'gtpogre-ipv4-ul': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.7")', + 'gtpogre-ipv4-dl': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.7")', } +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic).replace('1.1.2.6', '1.1.2.16')) +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic).replace('1.1.2.7', '1.1.2.17')) -mac_ipv4_gtpu_ipv6_l3src_changed_pkt = eval(str(mac_ipv4_gtpu_ipv6_basic).replace('ABAB', '1212')) -mac_ipv4_gtpu_ipv6_l3dst_changed_pkt = eval(str(mac_ipv4_gtpu_ipv6_basic).replace('CDCD', '3434')) +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer()/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_l3dst_only = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_l3dst', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3dst', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], - 'action': {'save_hash', 'gtpogre-ipv6-nonfrag'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['gtpogre-ipv6-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['gtpogre-ipv6-nonfrag'], + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.16", dst="1.1.2.7")', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_ipv6_l3src_only = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_l3src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], - 'action': {'save_hash', 'ipv6-nonfrag'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['gtpogre-ipv6-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['gtpogre-ipv6-nonfrag'], + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_ipv6_l3src_only = eval(str(mac_ipv4_gtpu_ipv6_l3dst_only) - .replace('mac_ipv4_gtpu_ipv6_l3dst', 'mac_ipv4_gtpu_ipv6_l3src') - .replace('l3-dst-only', 'l3-src-only') - .replace('check_hash_same', 'hash_check_different') - .replace('check_hash_different', 'check_hash_same') - .replace('hash_check_different', 'check_hash_different')) -mac_ipv4_gtpu_ipv6_all = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_all', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], - 'action': {'save_hash', 'ipv6-nonfrag'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_unmatched_pkt, + 'action': 'check_no_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['gtpogre-ipv6-nonfrag'], - 'action': 'check_hash_different', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['gtpogre-ipv6-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['gtpogre-ipv4-dl'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_unmatched_pkt, + 'action': 'check_no_hash', }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_ipv6_gtpu = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_gtpu', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3src', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / end actions rss types gtpu end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'].replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_basic['gtpogre-ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.17")', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -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 = { - '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)', - '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['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_ipv6_udp_l3src = eval(str(mac_ipv4_gtpu_ipv6_udp_l3dst) - .replace('mac_ipv4_gtpu_ipv6_udp_l3dst', 'mac_ipv4_gtpu_ipv6_udp_l3src') - .replace('l3-dst-only', 'l3-src-only') - .replace('check_hash_same', 'hash_check_different') - .replace('check_hash_different', 'check_hash_same') - .replace('hash_check_different', 'check_hash_different')) - -mac_ipv4_gtpu_ipv6_udp_l3src_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l3src_l4src', - 'port_id': 0, - '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['gtpogre-ipv6-udp'], - 'action': 'save_hash', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_unmatched_pkt, + 'action': 'check_no_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), - 'action': 'check_hash_different', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['gtpogre-ipv4-dl'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33').replace('CDCD', '3434'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_ipv6_udp_l3src_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l3src_l4dst', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_all', 'port_id': 0, - '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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32').replace('CDCD', '3434'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.7")', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_toeplitz = [mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3dst_only, mac_ipv4_gre_ipv4_gtpu_eh_ipv4_l3src_only, + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_all] + +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic = { + 'gtpogre-ipv4-nonfrag': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.7")/UDP(dport=2, sport=4)', + 'gtpogre-ipv4-ul': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.7")/UDP(dport=2, sport=4)', + 'gtpogre-ipv4-dl': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.7")/UDP(dport=2, sport=4)', } +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic).replace('1.1.2.6', '1.1.2.16')) +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic).replace('1.1.2.7', '1.1.2.17')) +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic).replace('sport=4', 'sport=14')) +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic).replace('dport=2', 'dport=12')) + +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(dport=2, sport=4)/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=4)/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.7")/TCP(sport=4, dport=2)' +] -mac_ipv4_gtpu_ipv6_udp_l3dst_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l3dst_l4src', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_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 l4-src-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33').replace('ABAB', '1212'), - 'action': 'check_hash_same', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_ipv6_udp_l3dst_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l3dst_l4dst', - 'port_id': 0, - '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['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32').replace('ABAB', '1212'), - 'action': 'check_hash_same', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, - ], - 'post-test': [] -} -mac_ipv4_gtpu_ipv6_udp_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l4dst', - 'port_id': 0, - '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['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-dl'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=12, sport=14)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_ipv6_udp_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l4src', + +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src', 'port_id': 0, - '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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=12, sport=14)', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_ipv6_udp_all = { - 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_all', - 'port_id': 0, - '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['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), - 'action': 'check_hash_different', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-dl'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=12, sport=14)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] -} - -mac_ipv4_gtpu_ipv6_udp_toeplitz = [mac_ipv4_gtpu_ipv6_udp_l3dst, mac_ipv4_gtpu_ipv6_udp_l3src, - mac_ipv4_gtpu_ipv6_udp_l3dst_l4src, mac_ipv4_gtpu_ipv6_udp_l3dst_l4dst, - mac_ipv4_gtpu_ipv6_udp_l3src_l4src, mac_ipv4_gtpu_ipv6_udp_l3src_l4dst, - mac_ipv4_gtpu_ipv6_udp_l4src, mac_ipv4_gtpu_ipv6_udp_l4dst, - mac_ipv4_gtpu_ipv6_udp_all] - -mac_ipv4_gtpu_ipv6_tcp_toeplitz = [eval(str(element).replace('TCP', 'TCP1').replace('udp', 'tcp') - .replace('UDP(sport', 'TCP(sport').replace('TCP1', 'UDP') - .replace('ipv4 / tcp / gtpu', 'ipv4 / udp / gtpu')) - for element in mac_ipv4_gtpu_ipv6_udp_toeplitz] - -mac_ipv4_gtpu_eh_dl_ipv4_basic = { - '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)', + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] } -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')) -mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt = eval( - str(mac_ipv4_gtpu_eh_dl_ipv4_basic).replace('192.168.0.1', '192.168.1.1')) - -mac_ipv4_gtpu_eh_dl_ipv4_l3dst_only = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_l3dst', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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_basic['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.16", dst="1.1.2.17")/UDP(dport=2, sport=14)', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -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('l3-dst-only', 'l3-src-only') - .replace('check_hash_same', 'hash_check_different') - .replace('check_hash_different', 'check_hash_same') - .replace('hash_check_different', 'check_hash_different')) -mac_ipv4_gtpu_eh_dl_ipv4_all = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_all', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], - 'action': 'check_hash_different', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.17")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, - ], - 'post-test': [] -} - - -mac_ipv4_gtpu_eh_dl_ipv4 = [mac_ipv4_gtpu_eh_dl_ipv4_l3dst_only, mac_ipv4_gtpu_eh_dl_ipv4_l3src_only, - mac_ipv4_gtpu_eh_dl_ipv4_all] - -mac_ipv4_gtpu_eh_ul_ipv4 = [eval(str(element).replace('(type=1', '(type=2') - .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')) - for element in mac_ipv4_gtpu_eh_dl_ipv4] - -mac_ipv4_gtpu_eh_ipv4_toeplitz = mac_ipv4_gtpu_eh_dl_ipv4 + mac_ipv4_gtpu_eh_ul_ipv4 - -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic = { - '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)', - 'gtpogre-ipv4-nonfrag_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")/("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')) -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt = eval(str(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic).replace('192.168.0.1', '192.168.1.1')) - -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_only = { - 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-dl'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['gtpogre-ipv4-nonfrag'].replace('0x123456', '0x12345'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.17")/UDP(dport=2, sport=14)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_only = eval(str(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_only) - .replace('ul_dl_ipv4_l3dst', 'ul_dl_ipv4_l3src') - .replace('l3-dst-only', 'l3-src-only') - .replace('dst="192.168.0.1",src="192.168.1.2"', 'dst="192.168.0.1",src="192.168.1.3"') - .replace('dst="192.168.1.1",src="192.168.0.2"', 'dst="192.168.0.1",src="192.168.1.2"') - .replace('dst="192.168.0.1",src="192.168.1.3"', 'dst="192.168.1.1",src="192.168.0.2"') - ) -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_all = { - 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_all', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.16", dst="1.1.2.17")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_gtpu = { - 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_gtpu', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types gtpu end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag'].replace('0x123456', '0x12345'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], '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.'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.17")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag_ul'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag_ul'].replace('0x123456', '0x12345'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-dl'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['gtpogre-ipv4-nonfrag_ul'].replace('192.168.0.', '192.168.1.'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.17")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] -} - -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_toeplitz = [mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_only, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_only, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_all] - -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic = { - '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)', + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_only = { - 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3srcl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3srcl4src', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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_without_ul_dl_ipv4_udp_basic['gtpogre-dl'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=12, sport=4)', '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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, - ], - 'post-test': [] -} -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3src_only = eval(str(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_only) - .replace('ul_dl_ipv4_udp_l3dst', 'ul_dl_ipv4_udp_l3src') - .replace('l3-dst-only', 'l3-src-only') - .replace('dst="192.168.0.1",src="192.168.1.2"', 'dst="192.168.0.1",src="192.168.1.3"') - .replace('dst="192.168.1.1",src="192.168.0.2"', 'dst="192.168.0.1",src="192.168.1.2"') - .replace('dst="192.168.0.1",src="192.168.1.3"', 'dst="192.168.1.1",src="192.168.0.2"') - ) -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3src_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3src_l4src', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / 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_without_ul_dl_ipv4_udp_basic['gtpogre-dl'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'].replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=12, sport=4)', '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_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, - ], - 'post-test': [] -} -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3src_l4dst = eval(str(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3src_l4src) - .replace('udp_l3src_l4src', 'udp_l3src_l4dst') - .replace('l4-src-only', 'l4-dst-only') - .replace('sport=32, dport=23', 'sport=22, dport=34') - .replace('sport=22, dport=33', 'sport=32, dport=23') - ) -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_l4src = eval(str(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3src_l4src) - .replace('udp_l3src_l4src', 'udp_l3dst_l4src') - .replace('l3-src-only', 'l3-dst-only') - .replace('dst="192.168.0.1",src="192.168.1.2"', 'dst="192.168.0.1",src="192.168.1.3"') - .replace('dst="192.168.1.1",src="192.168.0.2"', 'dst="192.168.0.1",src="192.168.1.2"') - .replace('dst="192.168.0.1",src="192.168.1.3"', 'dst="192.168.1.1",src="192.168.0.2"') - ) -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_l4dst = eval(str(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_l4src) - .replace('udp_l3dst_l4src', 'udp_l3dst_l4dst') - .replace('l3-src-only', 'l3-dst-only') - .replace('l4-src-only', 'l4-dst-only') - .replace('sport=32, dport=23', 'sport=22, dport=34') - .replace('sport=22, dport=33', 'sport=32, dport=23') - ) -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l4src_only = { - 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l4src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / 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_without_ul_dl_ipv4_udp_basic['gtpogre-dl'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'].replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-dl'], '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_gre_ipv4_gtpu_eh_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', }, { - '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l4dst_only = eval(str(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l4src_only) - .replace('udp_l4src_only', 'udp_l4dst_only') - .replace('l4-src-only', 'l4-dst-only') - .replace('sport=32, dport=23', 'sport=22, dport=34') - .replace('sport=22, dport=33', 'sport=32, dport=23') - ) -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp = { - 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3srcl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3srcl4dst', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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_without_ul_dl_ipv4_udp_basic['gtpogre-dl'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', }, { - '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_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, { - '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_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3 = { - 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / udp / end actions rss types ipv4 end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-dl'], - 'action': 'save_hash', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'], + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=2, sport=14)', '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_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, { - '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_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['gtpogre-ul'].replace('192.168.0.1', '192.168.1.1'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-dl'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-dl'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=2, sport=14)', '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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_toeplitz = [ - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3src_only, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_only, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3src_l4dst, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_l4src, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3src_l4src, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_l4dst, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l4src_only, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l4dst_only, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp, - mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3, -] - -mac_ipv4_gtpu_eh_without_ul_dl_ipv4_tcp_toeplitz = [eval(str(element).replace('TCP', 'TCP1').replace('udp', 'tcp') - .replace('UDP(sport', 'TCP(sport').replace('TCP1', 'UDP') - .replace('ipv4 / tcp / gtpu', 'ipv4 / udp / gtpu')) - for element in mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_toeplitz] - -mac_ipv4_gtpu_eh_without_ul_dl_ipv6_toeplitz = [eval(str(element).replace('gtp_psc / ipv4', 'gtp_psc / ipv6') - .replace('types ipv4', 'types ipv6') - .replace('ul_dl_ipv4', 'ul_dl_ipv6') - .replace(', frag=6)', ')/IPv6ExtHdrFragment()') - .replace('IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020"','IP(dst="192.168.0.3", src="192.168.0.3"',) - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.1.1",src="192.168.0.2"', 'IPv6(dst="1212:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.1",src="192.168.1.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="3434:910A:2222:5498:8475:1111:3900:2020"') - .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"') - .replace('IP(dst="192.168.0.3",src="192.168.0.3"', 'IP(dst="192.168.0.1",src="192.168.0.2"')) - for element in mac_ipv4_gtpu_eh_without_ul_dl_ipv4_toeplitz] - -mac_ipv4_gtpu_eh_without_ul_dl_ipv6_udp_toeplitz = [eval(str(element).replace('gtp_psc / ipv4', 'gtp_psc / ipv6') - .replace('ipv4-udp', 'ipv6-udp') - .replace('types ipv4', 'types ipv6') - .replace('ul_dl_ipv4_udp', 'ul_dl_ipv6_udp') - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.1.1",src="192.168.0.2"', 'IPv6(dst="1212:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.1",src="192.168.1.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="3434:910A:2222:5498:8475:1111:3900:2020"') - .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_udp_toeplitz] - -mac_ipv4_gtpu_eh_without_ul_dl_ipv6_tcp_toeplitz = [eval(str(element).replace('gtp_psc / ipv4', 'gtp_psc / ipv6') - .replace('ipv4 / tcp', 'ipv6 / tcp') - .replace('types ipv4', 'types ipv6') - .replace('ipv4-tcp', 'ipv6-tcp') - .replace('ul_dl_ipv4_tcp', 'ul_dl_ipv6_tcp') - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.1.1",src="192.168.0.2"', 'IPv6(dst="1212:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.1",src="192.168.1.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="3434:910A:2222:5498:8475:1111:3900:2020"') - .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 = { - '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', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dstl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dstl4src', '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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst) - .replace('mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst', - 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src') - .replace('l3-dst-only', 'l3-src-only') - .replace('check_hash_same', 'hash_check_different') - .replace('check_hash_different', 'check_hash_same') - .replace('hash_check_different', 'check_hash_different')) - -mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src_l4src', - '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-src-only l4-src-only end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], '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.1', '192.168.1.1'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src_l4dst', - '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-src-only l4-dst-only end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('192.168.0.2', '192.168.1.2'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-dl'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-dl'], '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.1', '192.168.1.1'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4src', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dstl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dstl4dst', '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 l4-src-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=2, sport=14)', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} - -mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4dst', - '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 l4-dst-only end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=2, sport=14)', 'action': 'check_hash_same', }, - ], - 'post-test': [] -} -mac_ipv4_gtpu_eh_dl_ipv4_udp_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l4dst', - '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 l4-dst-only end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-dl'], '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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', }, - ], - 'post-test': [] -} -mac_ipv4_gtpu_eh_dl_ipv4_udp_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l4src', - '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 l4-src-only end key_len 0 queues end / end', - 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], - 'action': 'save_hash', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', }, { - '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_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, + ], + 'post-test': [ { - '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', + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', }, - ], - 'post-test': [] + ] } -mac_ipv4_gtpu_eh_dl_ipv4_udp_all = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_all', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_all', '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 end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_basic['gtpogre-ipv4-nonfrag'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.7")/UDP(dport=2, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_toeplitz = [mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dst_only, mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3src_only, + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4dst_only, mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l4src_only, + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dstl4dst, mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3srcl4dst, + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3dstl4src, mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_l3srcl4src, + mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_all] + +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_tcp_toeplitz = [eval(str(element).replace('_udp', '_tcp') + .replace('ipv4-udp', 'ipv4-tcp') + .replace('TCP(sport', 'UDP(sport') + .replace('UDP(dport', 'TCP(dport') + .replace('gtp_psc / ipv4 / udp', 'gtp_psc / ipv4 / tcp')) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_toeplitz] + +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_basic = { + 'gtpogre-ipv4-ul': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.7")', } +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv4_basic).replace('1.1.2.6', '1.1.2.16')) +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv4_basic).replace('1.1.2.7', '1.1.2.17')) + +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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")/("X"*480)', +] -mac_ipv4_gtpu_eh_dl_ipv4_udp_l3 = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3', +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_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 end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic['gtpogre-ipv4-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_basic['gtpogre-ipv4-ul'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3dst_changed_pkt['gtpogre-ipv4-ul'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")', + 'action': 'check_hash_same', }, { - '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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_unmatched_pkt, + 'action': 'check_no_hash', }, ], - 'post-test': [] -} - -mac_ipv4_gtpu_eh_dl_ipv4_udp_toeplitz = [mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst, mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src, - mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4src, - mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4dst, - mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src_l4src, - mac_ipv4_gtpu_eh_dl_ipv4_udp_l3src_l4dst, - mac_ipv4_gtpu_eh_dl_ipv4_udp_l4src, mac_ipv4_gtpu_eh_dl_ipv4_udp_l4dst, - mac_ipv4_gtpu_eh_dl_ipv4_udp_all, mac_ipv4_gtpu_eh_dl_ipv4_udp_l3] - -mac_ipv4_gtpu_eh_ul_ipv4_udp_toeplitz = [eval(str(element).replace('(type=1', '(type=2') - .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')) - for element in mac_ipv4_gtpu_eh_dl_ipv4_udp_toeplitz] - -mac_ipv4_gtpu_eh_ipv4_udp_toeplitz = mac_ipv4_gtpu_eh_dl_ipv4_udp_toeplitz + mac_ipv4_gtpu_eh_ul_ipv4_udp_toeplitz - -mac_ipv4_gtpu_eh_ipv4_tcp_toeplitz = [eval(str(element).replace('TCP', 'TCP1').replace('udp', 'tcp') - .replace('UDP(sport', 'TCP(sport').replace('TCP1', 'UDP') - .replace('ipv4 / tcp / gtpu', 'ipv4 / udp / gtpu')) - for element in mac_ipv4_gtpu_eh_ipv4_udp_toeplitz] - -mac_ipv4_gtpu_eh_dl_ipv6_basic = { - '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)', + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt = eval(str(mac_ipv4_gtpu_eh_dl_ipv6_basic).replace('ABAB', '1212')) -mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt = eval(str(mac_ipv4_gtpu_eh_dl_ipv6_basic).replace('CDCD', '3434')) - -mac_ipv4_gtpu_eh_dl_ipv6_l3dst_only = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_l3dst', +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3src', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['gtpogre-ipv6-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3src_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['gtpogre-ipv6-nonfrag'], + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_l3src_only = eval(str(mac_ipv4_gtpu_eh_dl_ipv6_l3dst_only) - .replace('mac_ipv4_gtpu_eh_dl_ipv6_l3dst', 'mac_ipv4_gtpu_eh_dl_ipv6_l3src') - .replace('l3-dst-only', 'l3-src-only') - .replace('check_hash_same', 'hash_check_different') - .replace('check_hash_different', 'check_hash_same') - .replace('hash_check_different', 'check_hash_different')) -mac_ipv4_gtpu_eh_dl_ipv6_all = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_all', +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_all', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['gtpogre-ipv6-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['gtpogre-ipv6-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3src_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['gtpogre-ipv6-nonfrag'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3dst_changed_pkt['gtpogre-ipv4-ul'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.7")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_unmatched_pkt, + 'action': 'check_no_hash', }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_toeplitz = [mac_ipv4_gtpu_eh_dl_ipv6_l3dst_only, mac_ipv4_gtpu_eh_dl_ipv6_l3src_only, - mac_ipv4_gtpu_eh_dl_ipv6_all] - -mac_ipv4_gtpu_eh_ul_ipv6_toeplitz = [eval(str(element).replace('(type=1', '(type=2') - .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')) - for element in mac_ipv4_gtpu_eh_dl_ipv6_toeplitz] - -mac_ipv4_gtpu_eh_ipv6_toeplitz = mac_ipv4_gtpu_eh_dl_ipv6_toeplitz + mac_ipv4_gtpu_eh_ul_ipv6_toeplitz +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_toeplitz = [mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3dst_only, mac_ipv4_gre_ipv4_gtpu_ul_ipv4_l3src_only, + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_all] + +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic = { + 'gtpogre-ipv4-ul': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.7")/UDP(dport=2, sport=4)', + } +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic).replace('1.1.2.6', '1.1.2.16')) +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic).replace('1.1.2.7', '1.1.2.17')) +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic).replace('sport=4', 'sport=14')) +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic).replace('dport=2', 'dport=12')) + +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(dport=2, sport=4)/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=4)/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.7")/TCP(sport=4, dport=2)' +] -mac_ipv4_gtpu_eh_dl_ipv6_udp_basic = { - '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', +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_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', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / 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_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=12, sport=14)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src = eval(str(mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst) - .replace('mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst', 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src') - .replace('l3-dst-only', 'l3-src-only') - .replace('check_hash_same', 'hash_check_different') - .replace('check_hash_different', 'check_hash_same') - .replace('hash_check_different', 'check_hash_different')) - -mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4src', +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3src', '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-src-only l4-src-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end', 'test': [ { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', }, { - '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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4dst', +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4dst', '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-src-only l4-dst-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / 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_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.17")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', }, { - '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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4src', +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4src', '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 l4-src-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / 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_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], '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': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.17")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', }, { - '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', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4dst', +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3srcl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3srcl4src', '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 l4-dst-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / 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_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_udp_l4dst = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l4dst', + +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3srcl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3srcl4dst', '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 l4-dst-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / 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_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], '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'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.17")/UDP(dport=2, sport=14)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_udp_l4src = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l4src', + +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dstl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dstl4src', '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 l4-src-only end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / 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_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], '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'), + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=12, sport=4)', 'action': 'check_hash_same', }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_udp_all = { - 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_all', +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dstl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dstl4dst', '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 end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / 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_ipv6_udp_basic['gtpogre-ipv6-udp'], + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], 'action': 'save_hash', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('sport=22', 'sport=32'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('dport=23', 'dport=33'), + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('CDCD', '3434'), - 'action': 'check_hash_different', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.16", dst="1.1.2.7")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', }, { - 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic['gtpogre-ipv6-udp'].replace('ABAB', '1212'), - 'action': 'check_hash_different', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', }, ], - 'post-test': [] + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] } -mac_ipv4_gtpu_eh_dl_ipv6_udp_toeplitz = [mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst, mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src, - mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4src, - mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4dst, - mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4src, - mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4dst, - mac_ipv4_gtpu_eh_dl_ipv6_udp_l4src, mac_ipv4_gtpu_eh_dl_ipv6_udp_l4dst, - mac_ipv4_gtpu_eh_dl_ipv6_udp_all] -mac_ipv4_gtpu_eh_ul_ipv6_udp_toeplitz = [eval(str(element).replace('(type=1', '(type=2') - .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')) - for element in mac_ipv4_gtpu_eh_dl_ipv6_udp_toeplitz] -mac_ipv4_gtpu_eh_ipv6_udp_toeplitz = mac_ipv4_gtpu_eh_dl_ipv6_udp_toeplitz + mac_ipv4_gtpu_eh_ul_ipv6_udp_toeplitz - -mac_ipv4_gtpu_eh_ipv6_tcp_toeplitz = [eval(str(element).replace('TCP', 'TCP1').replace('udp', 'tcp') - .replace('UDP(sport', 'TCP(sport').replace('TCP1', 'UDP') - .replace('ipv4 / tcp / gtpu', 'ipv4 / udp / gtpu')) - for element in mac_ipv4_gtpu_eh_ipv6_udp_toeplitz] - -inner_l4_mac_ipv4_gtpu_ipv4_udp_tcp = { - 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_tcp', +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_all', 'port_id': 0, - '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', - 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / tcp / end actions rss types ipv4-tcp end key_len 0 queues end / end', - ], + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end', 'test': [ { - '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)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_basic['gtpogre-ipv4-ul'], '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)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, - ], - 'post-test': [ { - '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': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], + '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")/UDP(sport=22,dport=23)/("X"*480)', - 'action': 'check_hash_same_or_no_hash', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.6", dst="1.1.2.7")/UDP(dport=2, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz = [mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dst_only, mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3src_only, + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4dst_only, mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l4src_only, + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dstl4dst, mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3srcl4dst, + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3dstl4src, mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_l3srcl4src, + mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_all] + +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_toeplitz = [eval(str(element).replace('_udp', '_tcp') + .replace('TCP(sport', 'UDP(sport') + .replace('UDP(dport', 'TCP(dport') + .replace('gtp_psc pdu_t is 1 / ipv4 / udp', 'gtp_psc pdu_t is 1 / ipv4 / tcp') + .replace('ipv4-udp', 'ipv4-tcp')) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz] + +mac_ipv4_gre_ipv4_gtpu_dl_ipv4_toeplitz = [eval(str(element).replace('_ul_', '_dl_') + .replace('gtp_psc pdu_t is 1', 'gtp_psc pdu_t is 0') + .replace('type=1', 'type=0')) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_toeplitz] + +mac_ipv4_gre_ipv4_gtpu_dl_ipv4_udp_toeplitz = [eval(str(element).replace('_ul_', '_dl_') + .replace('gtp_psc pdu_t is 1', 'gtp_psc pdu_t is 0') + .replace('type=1', 'type=0')) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz] + +mac_ipv4_gre_ipv4_gtpu_dl_ipv4_tcp_toeplitz = [eval(str(element).replace('_ul_', '_dl_') + .replace('gtp_psc pdu_t is 1', 'gtp_psc pdu_t is 0') + .replace('type=1', 'type=0')) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_toeplitz] +# global variable +ipv4_case_name = 'mac_ipv4_gre_ipv4' +ipv4_rule = '/ ipv4 / gre / ipv4 /' +ipv4_match_ip1 = 'IP(src="1.1.2.2", dst="1.1.2.3")' +ipv4_match_ip2 = 'IP(src="1.1.2.4", dst="1.1.2.5")' +ipv4_mismatch_ip1 = 'IP(src="1.1.2.12", dst="1.1.2.13")' +ipv4_mismatch_ip2 = 'IP(src="1.1.2.14", dst="1.1.2.15")' + +# new global variable +ipv6_ipv4_name = 'mac_ipv6_gre_ipv4' +ipv6_ipv4_rule = '/ ipv6 / gre / ipv4 /' +ipv4_ipv6_name = 'mac_ipv4_gre_ipv6' +ipv4_ipv6_rule = '/ ipv4 / gre / ipv6 /' +ipv6_ipv6_name = 'mac_ipv6_gre_ipv6' +ipv6_ipv6_rule = '/ ipv6 / gre / ipv6 /' + +ipv6_match_ip1 = 'IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2927",dst="CDCD:910A:2222:5498:8475:1111:3900:2022")' +ipv6_mismatch_ip1 = 'IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2922",dst="CDCD:910A:2222:5498:8475:1111:3900:2023")' +ipv6_match_ip2 = 'IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")' +ipv6_mismatch_ip2 = 'IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2924",dst="CDCD:910A:2222:5498:8475:1111:3900:2025")' + +# ipv6+ipv4+ipv4 +mac_ipv6_gre_ipv4_gtpu_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv4_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv4_udp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv4_tcp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_eh_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv4_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_eh_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_eh_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv4_tcp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_ul_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_ul_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_dl_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv4_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_dl_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv4_udp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_dl_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv4_tcp_toeplitz] + +# ipv4+ipv6+ipv4 +mac_ipv4_gre_ipv6_gtpu_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv4_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv4_udp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv4_tcp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_eh_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv4_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_eh_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_eh_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv4_tcp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_ul_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_ul_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_ul_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_dl_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv4_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_dl_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv4_udp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_dl_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv4_tcp_toeplitz] + +# ipv6+ipv6+ipv4 +mac_ipv6_gre_ipv6_gtpu_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ipv4_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ipv4_udp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ipv4_tcp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_eh_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv4_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_eh_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_eh_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv4_tcp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_ul_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_ul_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_ul_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_dl_ipv4_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv4_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_dl_ipv4_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv4_udp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_dl_ipv4_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv4_tcp_toeplitz] +# ipv4+ipv4+ipv6 +mac_ipv4_gre_ipv4_gtpu_ipv6_basic = { + 'gtpogre-ipv4-nonfrag': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv6_basic).replace('ABAB:910B:6666:3457:8295:3333:1800:2929', 'ABAB:910B:6666:3457:8295:3333:1800:2926')) +mac_ipv4_gre_ipv4_gtpu_ipv6_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv6_basic).replace('CDCD:910A:2222:5498:8475:1111:3900:2020', 'CDCD:910A:2222:5498:8475:1111:3900:2027')) +mac_ipv4_gre_ipv4_gtpu_ipv6_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)', +] + +mac_ipv4_gre_ipv4_gtpu_ipv6_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_l3dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_l3src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_all', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_l3src_changed_pkt['gtpogre-ipv4-nonfrag'].replace('CDCD:910A:2222:5498:8475:1111:3900:2020', 'CDCD:910A:2222:5498:8475:1111:3900:2027'), + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_toeplitz = [mac_ipv4_gre_ipv4_gtpu_ipv6_l3dst_only, mac_ipv4_gre_ipv4_gtpu_ipv6_l3src_only, + mac_ipv4_gre_ipv4_gtpu_ipv6_all] + + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic = { + 'gtpogre-ipv4-nonfrag': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=4)', +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic).replace('ABAB:910B:6666:3457:8295:3333:1800:2929', 'ABAB:910B:6666:3457:8295:3333:1800:2926')) +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic).replace('CDCD:910A:2222:5498:8475:1111:3900:2020', 'CDCD:910A:2222:5498:8475:1111:3900:2027')) +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic).replace('sport=4', 'sport=14')) +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic).replace('dport=2', 'dport=12')) + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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=4, dport=2)/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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(dport=2, sport=4)/("X"*480)', +] + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types ipv6-udp l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3srcl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3srcl4src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3srcl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3srcl4dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dstl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dstl4src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dstl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dstl4dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / 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_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv6_udp_all', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types ipv6-udp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ipv6_udp_toeplitz = [mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dst_only, mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3src_only, + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4dst_only, mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l4src_only, + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dstl4dst, mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3srcl4dst, + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3dstl4src, mac_ipv4_gre_ipv4_gtpu_ipv6_udp_l3srcl4src, + mac_ipv4_gre_ipv4_gtpu_ipv6_udp_all] + + +mac_ipv4_gre_ipv4_gtpu_ipv6_tcp_toeplitz = [eval(str(element).replace('_udp', '_tcp') + .replace('TCP(sport', 'UDP(sport') + .replace('UDP(dport', 'TCP(dport') + .replace('gtpu / ipv6 / udp', 'gtpu / ipv6 / tcp') + .replace('ipv6-udp', 'ipv6-tcp')) + for element in mac_ipv4_gre_ipv4_gtpu_ipv6_udp_toeplitz] + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic = { + 'gtpogre-ipv4-nonfrag': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', + 'gtpogre-ipv4-ul': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/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")', + 'gtpogre-ipv4-dl': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/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")', +} +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic).replace('ABAB:910B:6666:3457:8295:3333:1800:2929', 'ABAB:910B:6666:3457:8295:3333:1800:2926')) +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic).replace('CDCD:910A:2222:5498:8475:1111:3900:2020', 'CDCD:910A:2222:5498:8475:1111:3900:2027')) + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer()/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)', +] + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3dst_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3src_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_all', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_toeplitz = [mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3dst_only, mac_ipv4_gre_ipv4_gtpu_eh_ipv6_l3src_only, + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_all] + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic = { + 'gtpogre-ipv4-nonfrag': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=4)', + 'gtpogre-ipv4-ul': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/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(dport=2, sport=4)', + 'gtpogre-ipv4-dl': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/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(dport=2, sport=4)', +} +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic).replace('ABAB:910B:6666:3457:8295:3333:1800:2929', 'ABAB:910B:6666:3457:8295:3333:1800:2926')) +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic).replace('CDCD:910A:2222:5498:8475:1111:3900:2020', 'CDCD:910A:2222:5498:8475:1111:3900:2027')) +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic).replace('sport=4', 'sport=14')) +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic).replace('dport=2', 'dport=12')) + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(dport=2, sport=4)/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.7")/UDP(dport=2, sport=4)/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=4, dport=2)' +] + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv6 / udp / end actions rss types ipv6-udp l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv6 / udp / end actions rss types ipv6-udp l4-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3srcl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3srcl4src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3srcl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3srcl4dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dstl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dstl4src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dstl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dstl4dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / 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_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-dl'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-ul'], + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-dl'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_all', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv6 / udp / end actions rss types ipv6-udp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_basic['gtpogre-ipv4-nonfrag'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-nonfrag'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_basic['gtpogre-ipv4-nonfrag'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_toeplitz = [mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dst_only, mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3src_only, + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4dst_only, mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l4src_only, + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dstl4dst, mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3srcl4dst, + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3dstl4src, mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_l3srcl4src, + mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_all] + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_tcp_toeplitz = [eval(str(element).replace('_udp', '_tcp') + .replace('TCP(sport', 'UDP(sport') + .replace('UDP(dport', 'TCP(dport') + .replace('gtp_psc / ipv6 / udp', 'gtp_psc / ipv6 / tcp') + .replace('ipv6-udp', 'ipv6-tcp')) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_toeplitz] + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_basic = { + 'gtpogre-ipv4-ul': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/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")', +} +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv6_basic).replace('ABAB:910B:6666:3457:8295:3333:1800:2929', 'ABAB:910B:6666:3457:8295:3333:1800:2926')) +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv6_basic).replace('CDCD:910A:2222:5498:8475:1111:3900:2020', 'CDCD:910A:2222:5498:8475:1111:3900:2027')) + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/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)', +] + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_all', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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")', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_toeplitz = [mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3dst_only, mac_ipv4_gre_ipv4_gtpu_ul_ipv6_l3src_only, + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_all] + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic = { + 'gtpogre-ipv4-ul': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/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(dport=2, sport=4)', + } +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic).replace('ABAB:910B:6666:3457:8295:3333:1800:2929', 'ABAB:910B:6666:3457:8295:3333:1800:2926')) +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic).replace('CDCD:910A:2222:5498:8475:1111:3900:2020', 'CDCD:910A:2222:5498:8475:1111:3900:2027')) +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4src_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic).replace('sport=4', 'sport=14')) +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4dst_changed_pkt = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic).replace('dport=2', 'dport=12')) + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_unmatched_pkt = [ + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(dport=2, sport=4)/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(proto=0x2F)/GRE(proto=0x0800)/IP()/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer()/IP(src="1.1.2.6", dst="1.1.2.7")/UDP(dport=2, sport=4)/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.2", dst="1.1.2.3")/GRE()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=4, dport=2)' +] + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / udp / end actions rss types ipv6-udp l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")/UDP(dport=12, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4dst_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / udp / end actions rss types ipv6-udp l4-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4src_only = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2027")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3srcl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3srcl4src', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / 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_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3srcl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3srcl4dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / 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_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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:2027")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', }, ] } -inner_l4_mac_ipv6_gtpu_ipv4_udp_tcp = eval(str(inner_l4_mac_ipv4_gtpu_ipv4_udp_tcp) - .replace('eth / ipv4', 'eth / ipv6') - .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('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', + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dstl4src = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dstl4src', '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 end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / tcp / end actions rss types ipv6-tcp end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / 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_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=12, sport=4)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dstl4dst = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dstl4dst', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only l4-dst-only end key_len 0 queues end / end', 'test': [ { - '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)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], '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)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2926",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(dport=2, sport=14)', + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, ], 'post-test': [ { - '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': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', + }, + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_all = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_all', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / udp / end actions rss types ipv6-udp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_basic['gtpogre-ipv4-ul'], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4src_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4dst_changed_pkt['gtpogre-ipv4-ul'], + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP(src="1.1.2.12", dst="1.1.2.13")/GRE()/IP(src="1.1.2.14", dst="1.1.2.15")/UDP()/GTP_U_Header()/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(dport=2, sport=4)', + '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)/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': mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_unmatched_pkt, + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_basic['gtpogre-ipv4-ul'], + ], + 'action': 'check_no_hash', }, ] } -inner_l4_mac_ipv6_gtpu_eh_ipv6_udp_tcp = eval(str(inner_l4_mac_ipv4_gtpu_eh_ipv6_udp_tcp) - .replace('eth / ipv4', 'eth / ipv6') - .replace('pdu_t is 0', 'pdu_t is 1') - .replace('(type=0', '(type=1') - .replace('IP()', '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] -mac_ipv4_gtpu_eh_ipv4_without_ul_dl_symmetric = { - 'sub_casename': 'mac_ipv4_gtpu_eh_ipv4_without_ul_dl_symmetric', +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz = [mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dst_only, mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3src_only, + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4dst_only, mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l4src_only, + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dstl4dst, mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3srcl4dst, + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3dstl4src, mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_l3srcl4src, + mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_all] + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_toeplitz = [eval(str(element).replace('_udp', '_tcp') + .replace('TCP(sport', 'UDP(sport') + .replace('UDP(dport', 'TCP(dport') + .replace('gtp_psc pdu_t is 1 / ipv6 / udp', 'gtp_psc pdu_t is 1 / ipv6 / tcp') + .replace('ipv6-udp', 'ipv6-tcp')) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz] + +mac_ipv4_gre_ipv4_gtpu_dl_ipv6_toeplitz = [eval(str(element).replace('_ul_', '_dl_') + .replace('gtp_psc pdu_t is 1', 'gtp_psc pdu_t is 0') + .replace('type=1', 'type=0')) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_toeplitz] + +mac_ipv4_gre_ipv4_gtpu_dl_ipv6_udp_toeplitz = [eval(str(element).replace('_ul_', '_dl_') + .replace('gtp_psc pdu_t is 1', 'gtp_psc pdu_t is 0') + .replace('type=1', 'type=0')) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz] + +mac_ipv4_gre_ipv4_gtpu_dl_ipv6_tcp_toeplitz = [eval(str(element).replace('_ul_', '_dl_') + .replace('gtp_psc pdu_t is 1', 'gtp_psc pdu_t is 0') + .replace('type=1', 'type=0')) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_toeplitz] + +# ipv4+ipv6+ipv6 +mac_ipv4_gre_ipv6_gtpu_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv6_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv6_udp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv6_tcp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_eh_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv6_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_eh_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_eh_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv6_tcp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_ul_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_ul_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_ul_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_dl_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv6_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_dl_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv6_udp_toeplitz] + +mac_ipv4_gre_ipv6_gtpu_dl_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv6_tcp_toeplitz] + +# ipv6+ipv4+ipv6 +mac_ipv6_gre_ipv4_gtpu_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv6_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv6_udp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ipv6_tcp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_eh_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv6_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_eh_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_eh_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv6_tcp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_ul_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_ul_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_dl_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv6_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_dl_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv6_udp_toeplitz] + +mac_ipv6_gre_ipv4_gtpu_dl_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1)) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv6_tcp_toeplitz] + +# ipv6+ipv6+ipv6 +mac_ipv6_gre_ipv6_gtpu_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ipv6_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ipv6_udp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ipv6_tcp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_eh_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv6_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_eh_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_eh_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_eh_ipv6_tcp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_ul_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_ul_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_ul_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_dl_ipv6_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv6_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_dl_ipv6_udp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv6_udp_toeplitz] + +mac_ipv6_gre_ipv6_gtpu_dl_ipv6_tcp_toeplitz = [eval(str(element).replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule) + .replace(ipv4_match_ip1, ipv6_match_ip1) + .replace(ipv4_match_ip2, ipv6_match_ip2) + .replace(ipv4_mismatch_ip1, ipv6_mismatch_ip1) + .replace(ipv4_mismatch_ip2, ipv6_mismatch_ip2) + ) + for element in mac_ipv4_gre_ipv4_gtpu_dl_ipv6_tcp_toeplitz] +## symmetric cases +# IPV4+IPV4+IPV4 +ipv4_mac = 'IP(src="1.1.2.6", dst="1.1.2.7")' +swap_ipv4_mac = 'IP(src="1.1.2.7", dst="1.1.2.6")' + +ipv6_mac = 'IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")' +swap_ipv6_mac = 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929", src="CDCD:910A:2222:5498:8475:1111:3900:2020")' + +mac_ipv4_gre_ipv4_gtpu_ipv4_pkt = { + 'basic_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/{}'.format(ipv4_mac), + 'symmetric_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/{}'.format(swap_ipv4_mac) +} + +mac_ipv4_gre_ipv4_gtpu_ipv4_symmetric = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_symmetric', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end', 'test': [ { - '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")/("X"*480)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_pkt['basic_packet'], 'action': {'save_hash': 'gtpogre-ipv4-nonfrag'}, }, { - '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")/("X"*480)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_pkt['symmetric_packet'], 'action': 'check_hash_same', }, - ], - 'post-test': [ - { - '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")/("X"*480)', - 'action': {'check_no_hash_or_different': 'gtpogre-ipv4-nonfrag'}, + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_IPV6 + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/{}'.format(ipv6_match_ip2), + 'action': 'check_no_hash', + }, + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_EH_IPV4 + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/{}'.format(ipv4_mac), + 'action': 'check_no_hash', }, ], + 'post_test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ipv4_pkt['basic_packet'], + 'action': 'check_no_hash', + } + ] } -mac_ipv4_gtpu_eh_ipv6_without_ul_dl_symmetric = eval(str(mac_ipv4_gtpu_eh_ipv4_without_ul_dl_symmetric) - .replace('gtp_psc / ipv4', 'gtp_psc / ipv6') - .replace('types ipv4', 'types ipv6') - .replace('gtpu_eh_ipv4', 'gtpu_eh_ipv6') - .replace(',frag=6)', ')/IPv6ExtHdrFragment()') - .replace('IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"','IP(dst="192.168.1.1", src="192.168.1.2"',) - .replace('IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020"','IP(src="192.168.1.1", dst="192.168.1.2"',) - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.2",src="192.168.0.1"', 'IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020",src="ABAB:910B:6666:3457:8295:3333:1800:2929"') - ) +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_pkt = { + 'basic_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/{}/UDP(dport=2, sport=4)'.format(ipv4_mac), + 'symmetric_packet1': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/{}/UDP(dport=2, sport=4)'.format(swap_ipv4_mac), + 'symmetric_packet2': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/{}/UDP(dport=4, sport=2)'.format(ipv4_mac), + 'symmetric_packet3': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/{}/UDP(dport=4, sport=2)'.format(swap_ipv4_mac), + 'symmetric_packet4': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/{}/UDP(dport=2, sport=4)'.format(ipv4_mac), + 'symmetric_packet5': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/{}/UDP(dport=2, sport=4)'.format(ipv4_mac), +} -mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric = { - 'sub_casename': 'mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric', +mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_symmetric = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ipv4_symmetric', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp end key_len 0 queues end / end', + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp end key_len 0 queues end / end', 'test': [ { - '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(sport=22, dport=23)/("X"*480)', - 'action': {'save_hash': 'gtpogre-udp-dl'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_pkt['basic_packet'], + 'action': {'save_hash': 'gtpogre-ipv4-nonfrag'}, }, { - '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(sport=23, dport=22)/("X"*480)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_pkt['symmetric_packet1'], '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)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_pkt['symmetric_packet2'], '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=23, dport=22)/("X"*480)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_pkt['symmetric_packet3'], '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=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': 'gtpogre-udp-ul'}, - }, - { - '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=1, P=1, QFI=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_pkt['symmetric_packet4'], '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=1, P=1, QFI=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)', + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_pkt['symmetric_packet5'], '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=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', + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_EH_IPV6_UDP + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/{}/UDP(dport=2, sport=4)'.format(ipv6_match_ip2), + 'action': 'check_no_hash', + }, + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_EH_IPV4_TCP + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/{}/TCP(dport=2, sport=4)'.format(ipv4_mac), + 'action': 'check_no_hash', + }, + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_IPV4_UDP + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/{}/UDP(dport=2, sport=4)'.format(ipv4_mac), + 'action': 'check_no_hash', }, ], - 'post-test': [ + 'post_test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_pkt['basic_packet'], + 'action': 'check_no_hash', + } + ] +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_pkt = { + 'basic_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/{}/TCP(dport=2, sport=4)'.format(ipv4_mac), + 'symmetric_packet1': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/{}/TCP(dport=2, sport=4)'.format(swap_ipv4_mac), + 'symmetric_packet2': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/{}/TCP(dport=4, sport=2)'.format(ipv4_mac), + 'symmetric_packet3': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/{}/TCP(dport=4, sport=2)'.format(swap_ipv4_mac), +} + +mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp end key_len 0 queues end / end', + 'test': [ { - '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(sport=23, dport=22)/("X"*480)', - 'action': {'check_no_hash_or_different', 'gtpogre-udp-dl'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_pkt['basic_packet'], + 'action': {'save_hash': 'gtpogre-ipv4-nonfrag'}, }, { - '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', 'gtpogre-udp-dl'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_pkt['symmetric_packet1'], + '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=23, dport=22)/("X"*480)', - 'action': {'check_no_hash_or_different', 'gtpogre-udp-dl'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_pkt['symmetric_packet2'], + '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=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_no_hash_or_different', 'gtpogre-udp-ul'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_pkt['symmetric_packet3'], + 'action': 'check_hash_same', + }, + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_UL_IPV6_TCP + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/{}/TCP(dport=2, sport=4)'.format(ipv6_match_ip2), + 'action': 'check_no_hash', + }, + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_UL_IPV4_UDP + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/{}/UDP(dport=2, sport=4)'.format(ipv4_mac), + 'action': 'check_no_hash', + }, + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_DL_IPV4_TCP + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/{}/TCP(dport=2, sport=4)'.format(ipv4_mac), + 'action': 'check_no_hash', }, + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_IPV4_TCP + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/{}/TCP(dport=2, sport=4)'.format(ipv4_mac), + 'action': 'check_no_hash', + }, + ], + 'post_test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_pkt['basic_packet'], + 'action': 'check_no_hash', + } + ] +} + +mac_ipv4_gre_ipv4_gtpu_dl_ipv4_pkt = { + 'basic_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/{}'.format(ipv4_mac), + 'symmetric_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/{}'.format(swap_ipv4_mac) +} + +mac_ipv4_gre_ipv4_gtpu_dl_ipv4_symmetric = { + 'sub_casename': 'mac_ipv4_gre_ipv4_gtpu_dl_ipv4_symmetric', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end', + 'test': [ { - '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=1, 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', 'gtpogre-udp-ul'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_dl_ipv4_pkt['basic_packet'], + 'action': {'save_hash': 'gtpogre-ipv4-nonfrag'}, }, { - '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=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_no_hash_or_different', 'gtpogre-udp-ul'}, + 'send_packet': mac_ipv4_gre_ipv4_gtpu_dl_ipv4_pkt['symmetric_packet'], + 'action': 'check_hash_same', + }, + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_DL_IPV6 + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/{}'.format(ipv6_match_ip2), + 'action': 'check_no_hash', + }, + { # unmatch MMAC_IPV4_GRE_IPV4_GTPU_UL_IPV4 + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/{}'.format(ipv4_mac), + 'action': 'check_no_hash', + }, + { # unmatch MAC_IPV4_GRE_IPV4_GTPU_IPV4 + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/{}'.format(ipv4_mac), + 'action': 'check_no_hash', }, ], + 'post_test': [ + { + 'send_packet': mac_ipv4_gre_ipv4_gtpu_dl_ipv4_pkt['basic_packet'], + 'action': 'check_no_hash', + } + ] } -mac_ipv4_gtpu_eh_ipv6_udp_without_ul_dl_symmetric = eval(str(mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric) - .replace('gtp_psc / ipv4', 'gtp_psc / ipv6') - .replace('types ipv4', 'types ipv6') - .replace('gtpu_eh_ipv4', 'gtpu_eh_ipv6') - .replace('IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"','IP(dst="192.168.1.1", src="192.168.1.2"',) - .replace('IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020"','IP(src="192.168.1.1", dst="192.168.1.2"',) - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.2",src="192.168.0.1"', 'IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020",src="ABAB:910B:6666:3457:8295:3333:1800:2929"') - ) -mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric = { - 'sub_casename': 'mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric', +# packet +ipv4_packet = '/IP()/GRE()/IP()/' +ipv6_ipv4_packet = '/IPv6()/GRE()/IP()/' +ipv4_ipv6_packet = '/IP()/GRE()/IPv6()/' +ipv6_ipv6_packet = '/IPv6()/GRE()/IPv6()/' + +mac_ipv6_gre_ipv4_gtpu_ipv4_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv4_symmetric).replace(ipv4_packet, ipv6_ipv4_packet) + .replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule)) + +mac_ipv6_gre_ipv4_gtpu_eh_ipv4_udp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_symmetric).replace(ipv4_packet, ipv6_ipv4_packet) + .replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule)) + +mac_ipv6_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric).replace(ipv4_packet, ipv6_ipv4_packet) + .replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule)) + +mac_ipv6_gre_ipv4_gtpu_dl_ipv4_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_dl_ipv4_symmetric).replace(ipv4_packet, ipv6_ipv4_packet) + .replace(ipv4_case_name, ipv6_ipv4_name) + .replace(ipv4_rule, ipv6_ipv4_rule)) + +# IPV6+IPV4+IPV4 +mac_ipv4_gre_ipv6_gtpu_ipv4_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv4_symmetric).replace(ipv4_packet, ipv4_ipv6_packet) + .replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule)) + +mac_ipv4_gre_ipv6_gtpu_eh_ipv4_udp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_symmetric).replace(ipv4_packet, ipv4_ipv6_packet) + .replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule)) + +mac_ipv4_gre_ipv6_gtpu_ul_ipv4_tcp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric).replace(ipv4_packet, ipv4_ipv6_packet) + .replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule)) + +mac_ipv4_gre_ipv6_gtpu_dl_ipv4_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_dl_ipv4_symmetric).replace(ipv4_packet, ipv4_ipv6_packet) + .replace(ipv4_case_name, ipv4_ipv6_name) + .replace(ipv4_rule, ipv4_ipv6_rule)) + +# IPV6+IPV6+IPV4 +mac_ipv6_gre_ipv6_gtpu_ipv4_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv4_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv6_gre_ipv6_gtpu_eh_ipv4_udp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv6_gre_ipv6_gtpu_ul_ipv4_tcp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv6_gre_ipv6_gtpu_dl_ipv4_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_dl_ipv4_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +# IPV4+IPV4+IPV6 +ipv4_mac = 'IP(src="1.1.2.6", dst="1.1.2.7")' +swap_ipv4_mac = 'IP(src="1.1.2.7", dst="1.1.2.6")' + +ipv6_mac = 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")' +swap_ipv6_mac = 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")' + +mac_ipv4_gre_ipv4_gtpu_ipv6_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv4_symmetric).replace('ipv4_symmetric', 'ipv6_symmetric') + .replace(ipv4_mac, ipv6_mac) + .replace(swap_ipv4_mac, swap_ipv6_mac) + .replace(ipv6_match_ip2, ipv4_mac) + .replace('/ gtpu / ipv4 /', '/ gtpu / ipv6 /') + .replace('symmetric_toeplitz types ipv4', 'symmetric_toeplitz types ipv6')) + +mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_symmetric).replace('ipv4_symmetric', 'ipv6_symmetric') + .replace(ipv4_mac, ipv6_mac) + .replace(swap_ipv4_mac, swap_ipv6_mac) + .replace(ipv6_match_ip2, ipv4_mac) + .replace('/ gtp_psc / ipv4 / udp /', '/ gtp_psc / ipv6 / udp /') + .replace('symmetric_toeplitz types ipv4', 'symmetric_toeplitz types ipv6')) + +mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric).replace('ipv4_symmetric', 'ipv6_symmetric') + .replace(ipv4_mac, ipv6_mac) + .replace(swap_ipv4_mac, swap_ipv6_mac) + .replace(ipv6_match_ip2, ipv4_mac) + .replace('/ gtp_psc pdu_t is 1 / ipv4 / tcp /', '/ gtp_psc pdu_t is 1 / ipv6 / tcp /') + .replace('symmetric_toeplitz types ipv4', 'symmetric_toeplitz types ipv6')) + +mac_ipv4_gre_ipv4_gtpu_dl_ipv6_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_dl_ipv4_symmetric).replace('ipv4_symmetric', 'ipv6_symmetric') + .replace(ipv4_mac, ipv6_mac) + .replace(swap_ipv4_mac, swap_ipv6_mac) + .replace(ipv6_match_ip2, ipv4_mac) + .replace('/ gtp_psc pdu_t is 0 / ipv4 /', '/ gtp_psc pdu_t is 0 / ipv6 /') + .replace('symmetric_toeplitz types ipv4', 'symmetric_toeplitz types ipv6')) + +# IPV4+IPV6+IPV6 +mac_ipv4_gre_ipv6_gtpu_ipv6_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv6_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv4_gre_ipv6_gtpu_eh_ipv6_udp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv4_gre_ipv6_gtpu_ul_ipv6_tcp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv4_gre_ipv6_gtpu_dl_ipv6_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_dl_ipv6_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +# IPV6+IPV4+IPV6 +mac_ipv6_gre_ipv4_gtpu_ipv6_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv6_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv6_gre_ipv4_gtpu_eh_ipv6_udp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv6_gre_ipv4_gtpu_ul_ipv6_tcp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv6_gre_ipv4_gtpu_dl_ipv6_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_dl_ipv6_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +# IPV6+IPV6+IPV6 +mac_ipv6_gre_ipv6_gtpu_ipv6_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ipv6_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv6_gre_ipv6_gtpu_eh_ipv6_udp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv6_gre_ipv6_gtpu_ul_ipv6_tcp_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +mac_ipv6_gre_ipv6_gtpu_dl_ipv6_symmetric = eval(str(mac_ipv4_gre_ipv4_gtpu_dl_ipv6_symmetric).replace(ipv4_packet, ipv6_ipv6_packet) + .replace(ipv4_case_name, ipv6_ipv6_name) + .replace(ipv4_rule, ipv6_ipv6_rule)) + +exclusive_with_eh_without_eh = { + 'sub_casename': 'exclusive_eh_without_eh', 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp end key_len 0 queues end / end', + 'rule': ['flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / udp / gtpu / gtp_psc / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end'], 'test': [ { - '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")/TCP(sport=22, dport=23)/("X"*480)', - 'action': {'save_hash': 'gtpogre-tcp-dl'}, + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()', + '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)/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="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.14", dst="1.1.2.5")/UDP()', + '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)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.4", dst="1.1.2.15")/UDP()', '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")/TCP(sport=23, dport=22)/("X"*480)', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.4", dst="1.1.2.15")/UDP()', + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(src="1.1.2.14", dst="1.1.2.5")/UDP()', 'action': 'check_hash_same', + } + ] +} + +exclusive_with_l4_without_l4 = { + 'sub_casename': 'exclusive_with_l4_without_l4', + 'port_id': 0, + 'rule': ['flow create 0 ingress pattern eth / ipv6 / gre / ipv6 / udp / gtpu / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv6 / gre / ipv6 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end'], + 'test': [ + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.4", dst="1.1.2.5")', + '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=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': 'gtpogre-tcp-ul'}, + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.14", dst="1.1.2.5")', + '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=1, P=1, QFI=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.4", dst="1.1.2.15")', '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=1, 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="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.4", dst="1.1.2.15")/UDP()', + 'action': 'check_hash_different', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.14", dst="1.1.2.5")/UDP()', 'action': 'check_hash_same', + } + ], + 'destroy_rule_1':[ + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()', + '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=1, P=1, QFI=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)', + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.4", dst="1.1.2.15")/UDP()', 'action': 'check_hash_same', }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.14", dst="1.1.2.5")/UDP()', + 'action': 'check_hash_different', + } ], - 'post-test': [ + 'destroy_rule_0':[ + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.4", dst="1.1.2.5")', + 'action': 'check_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)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)', - 'action': {'check_no_hash_or_different', 'gtpogre-tcp-dl'}, + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.14", dst="1.1.2.5")', + 'action': 'check_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)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)', - 'action': {'check_no_hash_or_different', 'gtpogre-tcp-dl'}, + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IPv6()/GRE()/IP()/UDP()/GTP_U_Header()/IP(src="1.1.2.4", dst="1.1.2.15")', + 'action': 'check_no_hash', + }, + ], +} + +exclusive_eh_with_ul_without_eh_dl_ul = { + 'sub_casename': 'exclusive_eh_with_ul_without_eh_dl_ul', + 'port_id': 0, + 'rule': ['flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / udp / gtpu / gtp_psc / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end'], + 'test': [ + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()', + '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)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)', - 'action': {'check_no_hash_or_different', 'gtpogre-tcp-dl'}, + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.14", dst="1.1.2.5")/UDP()', + '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=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_no_hash_or_different', 'gtpogre-tcp-ul'}, + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer()/IP(src="1.1.2.4", dst="1.1.2.15")/UDP()', + '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=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_no_hash_or_different', 'gtpogre-tcp-ul'}, + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()', + '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=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_no_hash_or_different', 'gtpogre-tcp-ul'}, + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.4", dst="1.1.2.15")/UDP()', + 'action': 'check_hash_different', }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.14", dst="1.1.2.5")/UDP()', + 'action': 'check_hash_same', + } ], + 'destroy_rule_1': [ + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.4", dst="1.1.2.5")/UDP()', + 'action': 'save_hash', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.4", dst="1.1.2.15")/UDP()', + 'action': 'check_hash_same', + }, + { + 'send_packet': 'Ether(dst="00:11:22:33:44:55")/IP()/GRE()/IP()/UDP()/GTP_U_Header()/GTPPDUSessionContainer(type=1, P=1, QFI=0x34)/IP(src="1.1.2.14", dst="1.1.2.5")/UDP()', + 'action': 'check_hash_different', + } + ] } -mac_ipv4_gtpu_eh_ipv6_tcp_without_ul_dl_symmetric = eval(str(mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric) - .replace('gtp_psc / ipv4', 'gtp_psc / ipv6') - .replace('types ipv4', 'types ipv6') - .replace('gtpu_eh_ipv4', 'gtpu_eh_ipv6') - .replace('IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"','IP(dst="192.168.1.1", src="192.168.1.2"',) - .replace('IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020"','IP(src="192.168.1.1", dst="192.168.1.2"',) - .replace('IP(dst="192.168.0.1",src="192.168.0.2"', 'IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020"') - .replace('IP(dst="192.168.0.2",src="192.168.0.1"', 'IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020",src="ABAB:910B:6666:3457:8295:3333:1800:2929"') - ) - +exclusive = [exclusive_with_eh_without_eh, exclusive_with_l4_without_l4, exclusive_eh_with_ul_without_eh_dl_ul] class TestCVLAdvancedIAVFRSSGTPoGRE(TestCase): @@ -2161,8 +4608,6 @@ class TestCVLAdvancedIAVFRSSGTPoGRE(TestCase): self.pkt = Packet() self.pmd_output = PmdOutput(self.dut) - self.launch_testpmd() - self.symmetric = False self.rxq = 16 self.rssprocess = RssProcessing(self, self.pmd_output, [self.tester_iface0, self.tester_iface1], self.rxq) self.logger.info('rssprocess.tester_ifaces: {}'.format(self.rssprocess.tester_ifaces)) @@ -2172,372 +4617,479 @@ class TestCVLAdvancedIAVFRSSGTPoGRE(TestCase): """ Run before each test case. """ - self.pmd_output.execute_cmd("start") + #if "toeplitz" in self.running_case: + # self.skip_case(False, "not support the case") + #else: + self.launch_testpmd() + + def tear_down(self): + # destroy all flow rule on port 0 + #if "toeplitz" not in self.running_case: + self.pmd_output.execute_cmd("quit", "# ") + + def tear_down_all(self): + self.destroy_vf() def destroy_vf(self): - self.dut.send_expect("quit", "# ", 60) - time.sleep(2) - self.dut.destroy_sriov_vfs_by_port(self.dut_ports[0]) + self.dut.destroy_sriov_vfs_by_port(self.used_dut_port_0) - def launch_testpmd(self, symmetric=False): - if symmetric: - param = "--rxq=16 --txq=16" - else: - # if support add --disable-rss - param = "--rxq=16 --txq=16" + def launch_testpmd(self): + # if support add --disable-rss + param = "--rxq=16 --txq=16 --rxd=384 --txd=384 --disable-rss" self.pmd_output.start_testpmd(cores="1S/4C/1T", param=param, - eal_param=f"-w {self.vf0_pci}", socket=self.ports_socket) - ''' - self.symmetric = symmetric + eal_param=f"-a {self.vf0_pci}", socket=self.ports_socket) + '''self.symmetric = symmetric if symmetric: # Need config rss in setup - self.pmd_output.execute_cmd("port config all rss all") - ''' + self.pmd_output.execute_cmd("port config all rss all")''' self.pmd_output.execute_cmd("set fwd rxonly") self.pmd_output.execute_cmd("set verbose 1") + self.pmd_output.execute_cmd("start") res = self.pmd_output.wait_link_status_up('all', timeout=15) self.verify(res is True, 'there have port link is down') - def switch_testpmd(self, symmetric=True): - if symmetric != self.symmetric: - self.pmd_output.quit() - self.launch_testpmd(symmetric=symmetric) - self.pmd_output.execute_cmd("start") - - def test_mac_ipv4_gtpogre_ipv4(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv4_toeplitz) - - def test_mac_ipv4_gtpogre_ipv4_udp(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv4_udp_toeplitz) - - def test_mac_ipv4_gtpogre_ipv4_tcp(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv4_tcp_toeplitz) - - def test_mac_ipv4_gtpogre_ipv6(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv6_toeplitz) - - def test_mac_ipv4_gtpogre_ipv6_udp(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv6_udp_toeplitz) - - def test_mac_ipv4_gtpogre_ipv6_tcp(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv6_tcp_toeplitz) - - def test_mac_ipv6_gtpogre_ipv4(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv4_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_ipv4_udp(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv4_udp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_ipv4_tcp(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv4_tcp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_ipv6(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv6_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_ipv6_udp(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv6_udp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_ipv6_tcp(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv6_tcp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv4_gtpogre_eh_ipv4(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv4_toeplitz) - - def test_mac_ipv4_gtpogre_eh_ipv4_udp(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv4_udp_toeplitz) - - def test_mac_ipv4_gtpogre_eh_ipv4_tcp(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv4_tcp_toeplitz) - - def test_mac_ipv4_gtpogre_eh_ipv6(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv6_toeplitz) - - def test_mac_ipv4_gtpogre_eh_ipv6_udp(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv6_udp_toeplitz) - - def test_mac_ipv4_gtpogre_eh_ipv6_tcp(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv6_tcp_toeplitz) - - def test_mac_ipv6_gtpogre_eh_ipv4(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv4_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv4_udp(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv4_udp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv4_tcp(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv4_tcp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv6_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_udp(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv6_udp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_tcp(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv6_tcp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv4_gtpogre_eh_ipv4_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_without_ul_dl_ipv4_toeplitz) - - def test_mac_ipv4_gtpogre_eh_ipv4_udp_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_toeplitz) - - def test_mac_ipv4_gtpogre_eh_ipv4_tcp_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_without_ul_dl_ipv4_tcp_toeplitz) - - def test_mac_ipv4_gtpogre_eh_ipv6_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_without_ul_dl_ipv6_toeplitz) - - def test_mac_ipv4_gtpogre_eh_ipv6_udp_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_without_ul_dl_ipv6_udp_toeplitz) - - def test_mac_ipv4_gtpogre_eh_ipv6_tcp_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_without_ul_dl_ipv6_tcp_toeplitz) - - def test_mac_ipv6_gtpogre_eh_ipv4_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv4_udp_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv4_tcp_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_tcp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_without_ul_dl_ipv6_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_udp_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_without_ul_dl_ipv6_udp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_tcp_without_ul_dl(self): - self.switch_testpmd(symmetric=False) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_without_ul_dl_ipv6_tcp_toeplitz) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv4_gtpogre_ipv4_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv4_symmetric) - - def test_mac_ipv4_gtpogre_ipv4_udp_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv4_udp_symmetric) - - def test_mac_ipv4_gtpogre_ipv4_tcp_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv4_tcp_symmetric) - - def test_mac_ipv4_gtpogre_ipv6_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv6_symmetric) - - def test_mac_ipv4_gtpogre_ipv6_udp_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv6_udp_symmetric) - - def test_mac_ipv4_gtpogre_ipv6_tcp_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv6_tcp_symmetric) - - def test_mac_ipv6_gtpogre_ipv4_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv4_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_ipv4_udp_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv4_udp_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_ipv4_tcp_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv4_tcp_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_ipv6_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv6_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_ipv6_udp_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv6_udp_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_ipv6_tcp_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_ipv6_tcp_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv4_gtpogre_eh_ipv4_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv4_symmetric) - - def test_mac_ipv4_gtpogre_eh_ipv4_udp_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv4_udp_symmetric) - - def test_mac_ipv4_gtpogre_eh_ipv4_tcp_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv4_tcp_symmetric) - - def test_mac_ipv4_gtpogre_eh_ipv6_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv6_symmetric) - - def test_mac_ipv4_gtpogre_eh_ipv6_udp_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv6_udp_symmetric) - - def test_mac_ipv4_gtpogre_eh_ipv6_tcp_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv6_tcp_symmetric) - - def test_mac_ipv6_gtpogre_eh_ipv4_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv4_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv4_udp_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv4_tcp_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv4_tcp_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv4_tcp_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_symmetric(self): - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv6_symmetric) - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_udp_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv6_tcp_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_tcp_symmetric(self): - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv6_tcp_symmetric) - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv4_gtpogre_eh_ipv4_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv4_without_ul_dl_symmetric) - - def test_mac_ipv4_gtpogre_eh_ipv4_udp_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric) - - def test_mac_ipv4_gtpogre_eh_ipv4_tcp_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric) - - def test_mac_ipv4_gtpogre_eh_ipv6_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv6_without_ul_dl_symmetric) - - def test_mac_ipv4_gtpogre_eh_ipv6_udp_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv6_udp_without_ul_dl_symmetric) - - def test_mac_ipv4_gtpogre_eh_ipv6_tcp_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv6_tcp_without_ul_dl_symmetric) - - def test_mac_ipv6_gtpogre_eh_ipv4_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv4_without_ul_dl_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv4_udp_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv4_tcp_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv6_without_ul_dl_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_udp_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv6_udp_without_ul_dl_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_mac_ipv6_gtpogre_eh_ipv6_tcp_without_ul_dl_symmetric(self): - self.switch_testpmd(symmetric=True) - ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4_gtpogre(mac_ipv4_gtpu_eh_ipv6_tcp_without_ul_dl_symmetric) - self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template) - - def test_inner_l4_protocal_hash(self): - self.switch_testpmd(symmetric=True) - self.rssprocess.handle_rss_distribute_cases(cases_info=inner_l4_protocal_hash) + def test_mac_ipv4_gre_ipv4_gtpu_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ipv4_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ipv4_udp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ipv4_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_eh_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_eh_ipv4_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_eh_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_eh_ipv4_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ul_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ul_ipv4_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_dl_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_dl_ipv4_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_dl_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_dl_ipv4_udp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_dl_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_dl_ipv4_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ipv4_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ipv4_udp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ipv4_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_eh_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_eh_ipv4_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_eh_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_eh_ipv4_udp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_eh_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_eh_ipv4_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ul_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ul_ipv4_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ul_ipv4_udp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ul_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ul_ipv4_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_dl_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_dl_ipv4_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_dl_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_dl_ipv4_udp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_dl_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_dl_ipv4_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ipv4_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ipv4_udp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ipv4_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_eh_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_eh_ipv4_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_eh_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_eh_ipv4_udp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_eh_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_eh_ipv4_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ul_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ul_ipv4_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ul_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ul_ipv4_udp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ul_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ul_ipv4_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_dl_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_dl_ipv4_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_dl_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_dl_ipv4_udp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_dl_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_dl_ipv4_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ipv4_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ipv4_udp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ipv4_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_eh_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_eh_ipv4_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_eh_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_eh_ipv4_udp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_eh_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_eh_ipv4_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ul_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ul_ipv4_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ul_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ul_ipv4_udp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ul_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ul_ipv4_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_dl_ipv4_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_dl_ipv4_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_dl_ipv4_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_dl_ipv4_udp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_dl_ipv4_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_dl_ipv4_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ipv6_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ipv6_udp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ipv6_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_eh_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_eh_ipv6_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_eh_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_eh_ipv6_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ul_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ul_ipv6_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_dl_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_dl_ipv6_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_dl_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_dl_ipv6_udp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_dl_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_dl_ipv6_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ipv6_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ipv6_udp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ipv6_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_eh_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_eh_ipv6_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_eh_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_eh_ipv6_udp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_eh_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_eh_ipv6_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ul_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ul_ipv6_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ul_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ul_ipv6_udp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_ul_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ul_ipv6_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_dl_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_dl_ipv6_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_dl_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_dl_ipv6_udp_toeplitz) + + def test_mac_ipv4_gre_ipv6_gtpu_dl_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_dl_ipv6_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ipv6_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ipv6_udp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ipv6_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_eh_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_eh_ipv6_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_eh_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_eh_ipv6_udp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_eh_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_eh_ipv6_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ul_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ul_ipv6_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ul_ipv6_udp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_ul_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ul_ipv6_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_dl_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_dl_ipv6_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_dl_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_dl_ipv6_udp_toeplitz) + + def test_mac_ipv6_gre_ipv4_gtpu_dl_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_dl_ipv6_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ipv6_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ipv6_udp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ipv6_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_eh_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_eh_ipv6_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_eh_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_eh_ipv6_udp_toeplitz) + + def mac_ipv6_gre_ipv6_gtpu_eh_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_eh_ipv6_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ul_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ul_ipv6_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ul_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ul_ipv6_udp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_ul_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ul_ipv6_tcp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_dl_ipv6_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_dl_ipv6_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_dl_ipv6_udp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_dl_ipv6_udp_toeplitz) + + def test_mac_ipv6_gre_ipv6_gtpu_dl_ipv6_tcp_toeplitz(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_dl_ipv6_tcp_toeplitz) + + def test_mac_ipv4_gre_ipv4_gtpu_ipv4_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ipv4_symmetric) + + def test_mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_eh_ipv4_udp_symmetric) + + def test_mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric) + + def test_mac_ipv4_gre_ipv4_gtpu_dl_ipv4_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_dl_ipv4_symmetric) + + def test_mac_ipv6_gre_ipv4_gtpu_ipv4_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ipv4_symmetric) + + def test_mac_ipv6_gre_ipv4_gtpu_eh_ipv4_udp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_eh_ipv4_udp_symmetric) + + def test_mac_ipv6_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ul_ipv4_tcp_symmetric) + + def test_mac_ipv6_gre_ipv4_gtpu_dl_ipv4_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_dl_ipv4_symmetric) + + def test_mac_ipv4_gre_ipv6_gtpu_ipv4_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ipv4_symmetric) + + def test_mac_ipv4_gre_ipv6_gtpu_eh_ipv4_udp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_eh_ipv4_udp_symmetric) + + def test_mac_ipv4_gre_ipv6_gtpu_ul_ipv4_tcp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ul_ipv4_tcp_symmetric) + + def test_mac_ipv4_gre_ipv6_gtpu_dl_ipv4_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_dl_ipv4_symmetric) + + def test_mac_ipv6_gre_ipv6_gtpu_ipv4_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ipv4_symmetric) + + def test_mac_ipv6_gre_ipv6_gtpu_eh_ipv4_udp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_eh_ipv4_udp_symmetric) + + def test_mac_ipv6_gre_ipv6_gtpu_ul_ipv4_tcp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ul_ipv4_tcp_symmetric) + + def test_mac_ipv6_gre_ipv6_gtpu_dl_ipv4_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_dl_ipv4_symmetric) + + def test_mac_ipv4_gre_ipv4_gtpu_ipv6_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ipv6_symmetric) + + def test_mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_eh_ipv6_udp_symmetric) + + def test_mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_ul_ipv6_tcp_symmetric) + + def test_mac_ipv4_gre_ipv4_gtpu_dl_ipv6_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv4_gtpu_dl_ipv6_symmetric) + + def test_mac_ipv4_gre_ipv6_gtpu_ipv6_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ipv6_symmetric) + + def test_mac_ipv4_gre_ipv6_gtpu_eh_ipv6_udp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_eh_ipv6_udp_symmetric) + + def test_mac_ipv4_gre_ipv6_gtpu_ul_ipv6_tcp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_ul_ipv6_tcp_symmetric) + + def test_mac_ipv4_gre_ipv6_gtpu_dl_ipv6_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gre_ipv6_gtpu_dl_ipv6_symmetric) + + def test_mac_ipv6_gre_ipv4_gtpu_ipv6_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ipv6_symmetric) + + def test_mac_ipv6_gre_ipv4_gtpu_eh_ipv6_udp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_eh_ipv6_udp_symmetric) + + def test_mac_ipv6_gre_ipv4_gtpu_ul_ipv6_tcp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_ul_ipv6_tcp_symmetric) + + def test_mac_ipv6_gre_ipv4_gtpu_dl_ipv6_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv4_gtpu_dl_ipv6_symmetric) + + def test_mac_ipv6_gre_ipv6_gtpu_ipv6_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ipv6_symmetric) + + def test_mac_ipv6_gre_ipv6_gtpu_eh_ipv6_udp_symmetric(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_eh_ipv6_udp_symmetric) + + def test_mac_ipv6_gre_ipv6_gtpu_ul_ipv6_tcp_symmetric(self): + """ + + """ + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_ul_ipv6_tcp_symmetric) + + def test_mac_ipv6_gre_ipv6_gtpu_dl_ipv6_symmetric(self): + """ + mac_ipv6_gre_ipv6_gtpu_dl_ipv6_symmetric + """ + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_gre_ipv6_gtpu_dl_ipv6_symmetric) + + def test_negative(self): + """ + negative test case + """ + rules = ['flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / udp / gtpu / gtp_psc is 1 / ipv4 / udp / end actions rss types ipv4-udp gtpu end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / udp / gtpu / gtp_psc is 1 / ipv4 / udp / end actions rss types ipv6-tcp end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv6 / gre / ipv4 / udp / gtpu / gtp_psc is 1 / ipv4 / end actions rss types ipv4 l4-dst-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / ipv6 / end actions rss types ipv6 l2-src-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / udp / gtpu / gtp_psc is 1 / ipv6 / tcp / end actions rss func symmetric_toeplitz types l3-src-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv6 / gre / ipv6 / udp / gtpu / gtp_psc is 1 / ipv4 / end actions rss func symmetric_toeplitz types l4-src-only end key_len 0 queues end / end'] + for rule in rules: + rule_index = rules.index(rule) + out = self.pmd_output.execute_cmd(rule) + check_param = 'Failed to create flow' if rule_index == 3 else 'Bad arguments' + print("check_param===%s" % check_param) + self.verify(check_param in out, 'create rule successfully, not as expected') + + def check_exclusive_cases(self, case_list): + + for case in case_list: + self.logger.info('===================Test sub case: {}================'.format(case['sub_casename'])) + rule_ids = self.rssprocess.create_rule(rule=case['rule'], check_stats=True) + self.rssprocess.check_rule(rule_list=rule_ids) + self.rssprocess.handle_tests(case['test']) + if 'destroy_rule_1' in case: + self.rssprocess.destroy_rule(rule_id=1) + self.rssprocess.handle_tests(case['destroy_rule_1']) + if case['sub_casename'] == 'exclusive_with_l4_without_l4': + self.pmd_output.execute_cmd('flow flush 0') + rule_ids = self.rssprocess.create_rule(rule=case['rule'], check_stats=True) + self.rssprocess.check_rule(rule_list=rule_ids) + if 'destroy_rule_0' in case: + self.rssprocess.destroy_rule(rule_id=0) + self.rssprocess.handle_tests(case['destroy_rule_0']) + self.pmd_output.execute_cmd('flow flush 0') + + def test_exclusive(self): + """ + exclusive test case + """ + rule1 = 'flow create 0 ingress pattern eth / ipv4 / gre / ipv4 / udp / gtpu / gtp_psc / ipv4 src is 1.1.2.4 dst is 1.1.2.5 / end actions queue index 13 / mark id 13 / end' + rule2 = 'flow create 0 ingress pattern eth / ipv4 / gre / ipv6 / udp / gtpu / gtp_psc / ipv4 src is 1.1.2.4 dst is 1.1.2.5 / end actions queue index 3 / mark id 3 / end' + self.check_exclusive_cases(exclusive) + rule_ids = self.rssprocess.create_rule(rule=rule1, check_stats=True) + self.rssprocess.check_rule(rule_list=rule_ids) + out = self.pmd_output.execute_cmd(rule2) + self.verify('Failed to create flow' in out, 'create rule successfully, not as expected') + self.pmd_output.execute_cmd('flow flush 0') + rule_ids = self.rssprocess.create_rule(rule=rule2, check_stats=True) + self.rssprocess.check_rule(rule_list=rule_ids) + out = self.pmd_output.execute_cmd(rule1) + self.verify('Failed to create flow' in out, 'create rule successfully, not as expected') + self.pmd_output.execute_cmd('flow flush 0') - def tear_down(self): - # destroy all flow rule on port 0 - self.dut.send_command("flow flush 0", timeout=1) - self.dut.send_command("clear port stats all", timeout=1) - self.pmd_output.execute_cmd("stop") - def tear_down_all(self): - self.destroy_vf() - self.dut.kill_all()