* Re: [dts] [PATCH V1] tests: add cvl_advanced_rss_gtpu
2020-10-20 14:01 [dts] [PATCH V1] tests: add cvl_advanced_rss_gtpu Haiyang Zhao
@ 2020-10-20 6:15 ` Zhao, HaiyangX
0 siblings, 0 replies; 2+ messages in thread
From: Zhao, HaiyangX @ 2020-10-20 6:15 UTC (permalink / raw)
To: dts, Peng, Yuan
[-- Attachment #1: Type: text/plain, Size: 334189 bytes --]
Tested-by: Haiyang Zhao <haiyangx.zhao@intel.com>
> -----Original Message-----
> From: Haiyang Zhao <haiyangx.zhao@intel.com>
> Sent: Tuesday, October 20, 2020 22:01
> To: dts@dpdk.org; Peng, Yuan <yuan.peng@intel.com>
> Cc: Zhao, HaiyangX <haiyangx.zhao@intel.com>
> Subject: [dts][PATCH V1] tests: add cvl_advanced_rss_gtpu
>
> *add cvl rss gtpu cases.
>
> Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
> ---
> tests/TestSuite_cvl_advanced_rss_gtpu.py | 5305
> ++++++++++++++++++++++
> 1 file changed, 5305 insertions(+)
> create mode 100755 tests/TestSuite_cvl_advanced_rss_gtpu.py
>
> diff --git a/tests/TestSuite_cvl_advanced_rss_gtpu.py
> b/tests/TestSuite_cvl_advanced_rss_gtpu.py
> new file mode 100755
> index 0000000..e505dc2
> --- /dev/null
> +++ b/tests/TestSuite_cvl_advanced_rss_gtpu.py
> @@ -0,0 +1,5305 @@
> +# BSD LICENSE
> +#
> +# Copyright(c) 2010-2020 Intel Corporation. All rights reserved.
> +# All rights reserved.
> +#
> +# Redistribution and use in source and binary forms, with or without
> +# modification, are permitted provided that the following conditions
> +# are met:
> +#
> +# * Redistributions of source code must retain the above copyright
> +# notice, this list of conditions and the following disclaimer.
> +# * Redistributions in binary form must reproduce the above copyright
> +# notice, this list of conditions and the following disclaimer in
> +# the documentation and/or other materials provided with the
> +# distribution.
> +# * Neither the name of Intel Corporation nor the names of its
> +# contributors may be used to endorse or promote products derived
> +# from this software without specific prior written permission.
> +#
> +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
> CONTRIBUTORS
> +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT
> NOT
> +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
> FITNESS FOR
> +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
> COPYRIGHT
> +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
> INCIDENTAL,
> +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
> NOT
> +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
> OF USE,
> +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
> AND ON ANY
> +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
> +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
> THE USE
> +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
> DAMAGE.
> +
> +
> +import re
> +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 = {
> + 'ipv4-nonfrag':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'ipv4-frag':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2",
> frag=6)/("X"*480)',
> + 'ipv4-icmp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'ipv4-udp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
> +}
> +
> +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_gtpu_ipv4_unmatched_pkt = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +]
> +
> +mac_ipv4_gtpu_ipv4_l3dst_only = {
> + 'sub_casename': 'mac_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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-
> nonfrag'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-frag'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-icmp'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-udp'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'],
> + mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
> + mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
> + mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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['ipv4-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> nonfrag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> frag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> icmp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> udp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'],
> + mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
> + mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
> + mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv4_gtpu = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv4_gtpu',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> nonfrag'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> nonfrag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> frag'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> frag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> icmp'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> icmp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> udp'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-
> udp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'],
> + mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
> + mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
> + mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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',
> + 'pre-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2",
> frag=6)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1",
> frag=6)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': {'save_hash': 'nonfrag'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2",
> frag=6)/("X"*480)',
> + 'action': {'save_hash': 'frag'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1",
> frag=6)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'action': {'save_hash': 'icmp'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + { # unmatch MAC_IPV4_GTPU_IPV6 nonfrag
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + { # unmatch MAC_IPV4_GTPU_EH_IPV4
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': 'save_hash',
> + },
> + { # unmatch MAC_IPV4_GTPU_EH_IPV4
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': {'check_no_hash_or_different': 'nonfrag'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': {'check_no_hash_or_different': 'nonfrag'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2",
> frag=6)/("X"*480)',
> + 'action': {'check_no_hash_or_different': 'frag'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1",
> frag=6)/("X"*480)',
> + 'action': {'check_no_hash_or_different': 'frag'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'action': {'check_no_hash_or_different': 'icmp'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
> + 'action': {'check_no_hash_or_different': 'icmp'},
> + },
> + ],
> +}
> +
> +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:180
> 0: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',
> + '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',
> + 'pre-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'save_hash': 'basic_with_rule'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/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)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'check_hash_different': 'basic_with_rule'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': {'check_hash_different': 'basic_with_rule'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'check_hash_different': 'basic_with_rule'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': {'check_hash_different': 'basic_with_rule'},
> + },
> + ],
> +}
> +
> +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:18
> 00: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:18
> 00: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_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_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:18
> 00: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:18
> 00: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_gtpu_eh_dl_ipv4_symmetric = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_symmetric',
> + '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',
> + 'pre-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': 'save_or_no_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': 'check_no_hash_or_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
> + 'action': 'save_or_no_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
> + 'action': 'check_no_hash_or_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'action': 'save_or_no_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
> + 'action': 'check_no_hash_or_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
> + 'action': 'save_or_no_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)',
> + 'action': 'check_no_hash_or_different',
> + },
> + ],
> +}
> +mac_ipv4_gtpu_eh_ul_ipv4_symmetric =
> eval(str(mac_ipv4_gtpu_eh_dl_ipv4_symmetric)
> + .replace('pdu_type=1', 'pdu_type=2')
> + .replace('pdu_type=0', 'pdu_type=1')
> + .replace('pdu_type=2', 'pdu_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',
> + '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',
> + 'pre-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=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':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=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="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=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',
> + },
> + ],
> +}
> +mac_ipv4_gtpu_eh_ul_ipv4_udp_symmetric =
> eval(str(mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric)
> + .replace('pdu_type=1', 'pdu_type=2')
> + .replace('pdu_type=0', 'pdu_type=1')
> + .replace('pdu_type=2', 'pdu_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:18
> 00: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:18
> 00: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:18
> 00: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:18
> 00: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:18
> 00: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:18
> 00: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 =
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",
> src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)'
> +mac_ipv4_gtpu_ipv4_udp_unmatch = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",
> src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*
> 480)'
> +]
> +mac_ipv4_gtpu_ipv4_udp_l3dst = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3dst',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1',
> '192.168.1.1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2',
> '192.168.1.2'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + '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',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2',
> '192.168.1.2'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22',
> 'sport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23',
> 'dport=33').replace('192.168.0.1', '192.168.1.1'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv4_udp_l3src_l4dst = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3src_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-dst-only end key_len 0 queues
> end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2',
> '192.168.1.2'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23',
> 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22',
> 'sport=32').replace('192.168.0.1', '192.168.1.1'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv4_udp_l3dst_l4src = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3dst_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 l4-src-only end key_len 0 queues
> end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1',
> '192.168.1.1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22',
> 'sport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23',
> 'dport=33').replace('192.168.0.2', '192.168.1.2'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv4_udp_l3dst_l4dst = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3dst_l4dst',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1',
> '192.168.1.1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23',
> 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22',
> 'sport=32').replace('192.168.0.2', '192.168.1.2'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +mac_ipv4_gtpu_ipv4_udp_l4dst = {
> + 'sub_casename': 'mac_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 l4-dst-only end key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23',
> 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22',
> 'sport=32')
> + .replace('192.168.0', '192.168.1'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22',
> 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23',
> 'dport=32')
> + .replace('192.168.0', '192.168.1'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv4_udp_all = {
> + 'sub_casename': 'mac_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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22',
> 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23',
> 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1',
> '192.168.1.1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2',
> '192.168.1.2'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_ipv4_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv4_udp_gtpu = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_gtpu',
> + 'port_id': 0,
> + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp /
> end actions rss types gtpu end key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0',
> '192.168.1')
> + .replace('sport=22', 'sport=32')
> + .replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_ipv4_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +
> +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_gtpu]
> +
> +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_gtpu_ipv6_basic = {
> + 'ipv6-nonfrag':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> + 'ipv6-frag':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*48
> 0)',
> + 'ipv6-icmp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)',
> + 'ipv6-udp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP()/("X"*480)',
> +}
> +
> +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_gtpu_ipv6_unmatched_pkt = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)',
> +]
> +mac_ipv4_gtpu_ipv6_l3dst_only = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv6_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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-
> nonfrag'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-frag'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-icmp'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-udp'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'],
> + mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
> + mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
> + mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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['ipv6-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-
> nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'].replace('ABAB',
> '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'].replace('ABAB',
> '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'].replace('ABAB',
> '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'],
> + mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
> + mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
> + mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv6_gtpu = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv6_gtpu',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-
> nonfrag'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-
> nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-
> frag'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'].replace('ABAB',
> '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-
> icmp'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'].replace('ABAB',
> '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-
> udp'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'].replace('ABAB',
> '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'],
> + mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
> + mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
> + mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv6_toeplitz = [mac_ipv4_gtpu_ipv6_l3dst_only,
> mac_ipv4_gtpu_ipv6_l3src_only,
> + mac_ipv4_gtpu_ipv6_all, mac_ipv4_gtpu_ipv6_gtpu]
> +
> +mac_ipv4_gtpu_ipv6_udp_basic =
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*
> 480)'
> +mac_ipv4_gtpu_ipv6_udp_unmatch = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(src="192.168.0.1",
> dst="192.168.0.2")/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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD',
> '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB',
> '1212'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB',
> '1212'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22',
> 'sport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23',
> 'dport=33').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv6_udp_l3src_l4dst = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l3src_l4dst',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB',
> '1212'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23',
> 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22',
> 'sport=32').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv6_udp_l3dst_l4src = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l3dst_l4src',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD',
> '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22',
> 'sport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23',
> 'dport=33').replace('ABAB', '1212'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD',
> '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23',
> 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22',
> 'sport=32').replace('ABAB', '1212'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23',
> 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22',
> 'sport=32')
> + .replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +mac_ipv4_gtpu_ipv6_udp_l4src = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l4src',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22',
> 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23',
> 'dport=32')
> + .replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22',
> 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23',
> 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD',
> '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB',
> '1212'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_ipv6_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_ipv6_udp_gtpu = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_gtpu',
> + 'port_id': 0,
> + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp /
> end actions rss types gtpu end key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB',
> '1212').replace('CDCD', '3434')
> + .replace('sport=22', 'sport=32')
> + .replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_ipv6_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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_udp_gtpu]
> +
> +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 = {
> + 'ipv4-nonfrag':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'ipv4-frag':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
> + 'ipv4-icmp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'ipv4-udp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
> + 'ipv4-tcp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP()/("X"*480)',
> +
> +}
> +
> +mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt =
> eval(str(mac_ipv4_gtpu_eh_dl_ipv4_basic).replace('192.168.0.2',
> '192.168.1.2'))
> +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_ipv4_unmatched_pkt = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=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_l3dst_only = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_l3dst',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-
> nonfrag'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-
> frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-
> frag'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-
> icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-
> icmp'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-
> udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-
> udp'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-
> tcp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-
> tcp'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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['ipv4-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> nonfrag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> nonfrag'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-
> frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-
> frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> frag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> frag'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-
> icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-
> icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> icmp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> icmp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-
> udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-
> udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> udp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> udp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-
> tcp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-
> tcp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> tcp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> tcp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_eh_dl_ipv4_gtpu = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_gtpu',
> + 'port_id': 0,
> + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc
> pdu_t is 0 / ipv4 / end actions rss types gtpu end key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> nonfrag'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> nonfrag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> frag'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> frag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> icmp'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> icmp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> udp'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> udp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> tcp'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-
> tcp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_ipv4_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
> + mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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_dl_ipv4_gtpu]
> +
> +mac_ipv4_gtpu_eh_ul_ipv4 = [eval(str(element).replace('pdu_type=1',
> 'pdu_type=2')
> + .replace('pdu_type=0', 'pdu_type=1').replace('pdu_type=2',
> 'pdu_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 = {
> + 'ipv4-nonfrag':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'ipv4-nonfrag_ul':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'ipv4-frag':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
> + 'ipv4-icmp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'ipv4-udp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("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_unmatched_pkt = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",
> src="192.168.0.2")/("X"*480)',
> +]
> +
> +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['ipv4-
> nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-
> nonfrag'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag_ul'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-
> nonfrag_ul'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-
> nonfrag_ul'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-
> frag'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-
> icmp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-
> udp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'],
> + ],
> + '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',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag_ul'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-
> nonfrag_ul'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-
> nonfrag_ul'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag_ul'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag_ul'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> frag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> frag'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> icmp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> icmp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> udp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> udp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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['ipv4-
> nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag_ul'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag_ul'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> nonfrag_ul'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> frag'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> frag'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> icmp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> icmp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> udp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-
> udp'].replace('192.168.0.', '192.168.1.'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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_gtpu]
> +
> +mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic = {
> + 'dl':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'ul':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> +}
> +
> +mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> +]
> +
> +mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_only = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst',
> + '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',
> + 'test': [
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.1',
> '192.168.1.1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.2',
> '192.168.1.2')
> + .replace('sport=22, dport=23',
> 'sport=32, dport=33')
> + .replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +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['dl'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'].replace('sport=22',
> 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.2',
> '192.168.1.2'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.1',
> '192.168.1.1')
> + .replace('dport=23', 'dport=33')
> + .replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'].replace('192.168.0.1',
> '192.168.1.1')
> + .replace('dport=23', 'dport=33')
> + .replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +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['dl'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'].replace('sport=22',
> 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0',
> '192.168.1')
> + .replace('dport=23', 'dport=33')
> + .replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'].replace('192.168.0',
> '192.168.1')
> + .replace('dport=23', 'dport=33')
> + .replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
> + ],
> + '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',
> + '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',
> + 'test': [
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('sport=22',
> 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('dport=23',
> 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.1',
> '192.168.1.1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.2',
> '192.168.1.2'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('0x123456',
> '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_gtpu = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_gtpu',
> + 'port_id': 0,
> + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4
> / udp / end actions rss types gtpu end key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl']
> + .replace('192.168.0.', '192.168.1.')
> + .replace('sport=22, dport=23', 'sport=32, dport=33'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul']
> + .replace('192.168.0.', '192.168.1.')
> + .replace('sport=22, dport=23', 'sport=32, dport=33'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('0x123456',
> '0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
> + mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
> + ],
> + '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_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_gtpu,
> +]
> +
> +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:33
> 33: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:5
> 498: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('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:5
> 498: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('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:5
> 498:8475:1111:3900:2020"'))
> + for element in
> mac_ipv4_gtpu_eh_without_ul_dl_ipv4_tcp_toeplitz]
> +
> +mac_ipv4_gtpu_eh_dl_ipv4_udp_basic =
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",
> src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)'
> +mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> +]
> +mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst',
> + 'port_id': 0,
> + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc
> pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end
> key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23',
> 'dport=33').replace('192.168.0.1', '192.168.1.1'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22',
> 'sport=32').replace('192.168.0.1', '192.168.1.1'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4src = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_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-dst-only l4-src-only
> end key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23',
> 'dport=33').replace('192.168.0.2', '192.168.1.2'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32')
> + .replace('192.168.0.2', '192.168.1.2'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32')
> + .replace('192.168.0', '192.168.1'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +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,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=32')
> + .replace('192.168.0', '192.168.1'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_eh_dl_ipv4_udp_all = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('teid=0x123456',
> 'teid=0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_eh_dl_ipv4_udp_gtpu = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_gtpu',
> + '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 gtpu end key_len 0 queues end
> / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0', '192.168.1')
> + .replace('sport=22', 'sport=32')
> + .replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('teid=0x123456',
> 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +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_gtpu]
> +
> +mac_ipv4_gtpu_eh_ul_ipv4_udp_toeplitz =
> [eval(str(element).replace('pdu_type=1', 'pdu_type=2')
> + .replace('pdu_type=0',
> 'pdu_type=1').replace('pdu_type=2', 'pdu_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 = {
> + 'ipv6-nonfrag':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> + 'ipv6-frag':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*48
> 0)',
> + 'ipv6-icmp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)',
> + 'ipv6-udp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP()/("X"*480)',
> + 'ipv6-tcp':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP()/("X"*480)',
> +}
> +
> +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_unmatched_pkt = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)',
> +]
> +mac_ipv4_gtpu_eh_dl_ipv6_l3dst_only = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_l3dst',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-
> nonfrag'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-
> frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-
> frag'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-
> icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-
> icmp'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-
> udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-
> udp'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-
> tcp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-
> tcp'],
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
> + ],
> + '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',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-
> nonfrag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> nonfrag'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-
> frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-
> frag'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> frag'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> frag'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-
> icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-
> icmp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> icmp'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> icmp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-
> udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-
> udp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> udp'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> udp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-
> tcp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-
> tcp'],
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> tcp'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> tcp'].replace('0x123456', '0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
> + ],
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_eh_dl_ipv6_gtpu = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_gtpu',
> + 'port_id': 0,
> + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc
> pdu_t is 0 / ipv6 / end actions rss types gtpu end key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> nonfrag'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> frag'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> frag'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> icmp'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> icmp'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> udp'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> udp'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> tcp'].replace('teid=0x123456', 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-
> tcp'].replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_unmatched_pkt,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': [
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
> + mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
> + ],
> + '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_dl_ipv6_gtpu]
> +
> +mac_ipv4_gtpu_eh_ul_ipv6_toeplitz =
> [eval(str(element).replace('pdu_type=1', 'pdu_type=2')
> + .replace('pdu_type=0',
> 'pdu_type=1').replace('pdu_type=2', 'pdu_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_gtpu_eh_dl_ipv6_udp_basic =
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*
> 480)'
> +mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=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)',
> +]
> +mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst',
> + 'port_id': 0,
> + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc
> pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only end
> key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD',
> '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB',
> '1212'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + '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',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB',
> '1212'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23',
> 'dport=33').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4dst = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB',
> '1212'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22',
> 'sport=32').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4src = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD',
> '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23',
> 'dport=33').replace('ABAB', '1212'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4dst = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_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-dst-only l4-dst-only
> end key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD',
> '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22',
> 'sport=32').replace('ABAB', '1212'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +mac_ipv4_gtpu_eh_dl_ipv6_udp_l4dst = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_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 l4-dst-only end
> key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32')
> + .replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +mac_ipv4_gtpu_eh_dl_ipv6_udp_l4src = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_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 l4-src-only end
> key_len 0 queues end / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=32')
> + .replace('ABAB', '1212').replace('CDCD', '3434'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_eh_dl_ipv6_udp_all = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_all',
> + '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',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD',
> '3434'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB',
> '1212'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('teid=0x123456',
> 'teid=0x12345'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'check_no_hash',
> + },
> + ]
> +}
> +
> +mac_ipv4_gtpu_eh_dl_ipv6_udp_gtpu = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_gtpu',
> + '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 gtpu end key_len 0 queues end
> / end',
> + 'test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB',
> '1212').replace('CDCD', '3434')
> + .replace('sport=22', 'sport=32')
> + .replace('dport=23', 'dport=33'),
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('teid=0x123456',
> 'teid=0x12345'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
> + 'action': 'check_no_hash',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
> + '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_dl_ipv6_udp_gtpu]
> +mac_ipv4_gtpu_eh_ul_ipv6_udp_toeplitz =
> [eval(str(element).replace('pdu_type=1', 'pdu_type=2')
> + .replace('pdu_type=0',
> 'pdu_type=1').replace('pdu_type=2', 'pdu_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]
> +
> +default_pattern_ipv4_gtpu_eh_dl_ipv4_src =
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)'
> +default_pattern_ipv4_gtpu_eh_dl_ipv4_dst =
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2", src="192.168.0.1")/("X"*480)'
> +default_pattern_ipv4_gtpu_eh_dl_ipv6_src =
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)'
> +default_pattern_ipv4_gtpu_eh_dl_ipv6_dst =
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)'
> +default_pattern_support_ipv4 = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_gtpu',
> + 'port_id': 0,
> + 'rule': '',
> + 'test': [
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst,
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv4_src.replace('pdu_type=0',
> 'pdu_type=1'),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('pdu_type=0',
> 'pdu_type=1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv4_src.replace('/("X"',
> '/UDP(sport=22,dport=23)/("X"'),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('/("X"',
> '/UDP(sport=22,dport=23)/("X"'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src
> + .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
> + .replace('pdu_type=0', 'pdu_type=1'),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
> + .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
> + .replace('pdu_type=0', 'pdu_type=1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv4_src.replace('/("X"',
> '/TCP(sport=22,dport=23)/("X"'),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('/("X"',
> '/TCP(sport=22,dport=23)/("X"'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src
> + .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
> + .replace('pdu_type=0', 'pdu_type=1'),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
> + .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
> + .replace('pdu_type=0', 'pdu_type=1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src
> + .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
> + .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src
> + .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
> + .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src,
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst,
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv6_src.replace('pdu_type=0',
> 'pdu_type=1'),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('pdu_type=0',
> 'pdu_type=1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv6_src.replace('/("X"',
> '/UDP(sport=22,dport=23)/("X"'),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('/("X"',
> '/UDP(sport=22,dport=23)/("X"'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src
> + .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
> + .replace('pdu_type=0', 'pdu_type=1'),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
> + .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
> + .replace('pdu_type=0', 'pdu_type=1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv6_src.replace('/("X"',
> '/TCP(sport=22,dport=23)/("X"'),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('/("X"',
> '/TCP(sport=22,dport=23)/("X"'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src
> + .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
> + .replace('pdu_type=0', 'pdu_type=1'),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
> + .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
> + .replace('pdu_type=0', 'pdu_type=1'),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src
> + .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
> + .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src
> + .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
> + .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
> + .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)', ''),
> + 'action': 'check_hash_different',
> + },
> + ],
> +}
> +
> +inner_l4_mac_ipv4_gtpu_ipv4_udp_tcp = {
> + 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_tcp',
> + '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',
> + ],
> + 'test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport
> =23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport
> =23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport
> =23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=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',
> + },
> + ]
> +}
> +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)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)')
> + .replace('mac_ipv4', 'mac_ipv6'))
> +inner_l4_mac_ipv4_gtpu_eh_ipv6_udp_tcp = {
> + 'sub_casename': 'mac_ipv4_gtpu_eh_ipv6_udp_tcp',
> + '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',
> + ],
> + 'test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*
> 480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=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"*4
> 80)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*
> 480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=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"*4
> 80)',
> + 'action': 'check_hash_same',
> + },
> + ]
> +}
> +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('pdu_type=0', 'pdu_type=1')
> + .replace('IP()', 'IPv6()')
> + .replace('mac_ipv4', 'mac_ipv6'))
> +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',
> + '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',
> + 'pre-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2",frag=6)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1",frag=6)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': {'save_hash': 'ipv4-nonfrag'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2",frag=6)/("X"*480)',
> + 'action': {'save_hash': 'ipv4-frag'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1",frag=6)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'action': {'save_hash': 'ipv4-icmp'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> + 'action': {'check_no_hash_or_different': 'ipv4-nonfrag'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2",frag=6)/("X"*480)',
> + 'action': {'check_no_hash_or_different': 'ipv4-frag'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
> + 'action': {'check_no_hash_or_different': 'ipv4-icmp'},
> + },
> + ],
> +}
> +
> +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:33
> 33: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:33
> 33: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_udp_without_ul_dl_symmetric = {
> + 'sub_casename':
> 'mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_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',
> + 'pre-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'save_hash', 'udp-dl'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'save_hash', 'udp-ul'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=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': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'check_hash_different', 'udp-dl'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'check_hash_different', 'udp-ul'},
> + },
> + ],
> +}
> +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="1
> 92.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="1
> 92.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',
> + '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',
> + 'pre-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'save_hash', 'udp-dl'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'save_hash', 'udp-ul'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_same',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': 'save_hash',
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23,
> dport=22)/("X"*480)',
> + 'action': 'check_hash_different',
> + },
> + ],
> + 'post-test': [
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'check_hash_different', 'udp-dl'},
> + },
> + {
> + 'send_packet':
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> + 'action': {'check_hash_different', 'udp-ul'},
> + },
> + ],
> +}
> +
> +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="1
> 92.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="1
> 92.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"')
> + )
> +
> +
> +class TestCVLAdvancedRSSGTPU(TestCase):
> +
> + def set_up_all(self):
> + """
> + Run at the start of each test suite.
> + prerequisites.
> + """
> + # Based on h/w type, choose how many ports to use
> + self.dut_ports = self.dut.get_ports(self.nic)
> + self.verify(len(self.dut_ports) >= 2, "Insufficient ports for testing")
> + # Verify that enough threads are available
> + cores = self.dut.get_core_list("1S/4C/1T")
> + self.verify(cores is not None, "Insufficient cores for speed testing")
> + self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
> + self.tester_port0 = self.tester.get_local_port(self.dut_ports[0])
> + self.tester_port1 = self.tester.get_local_port(self.dut_ports[1])
> + self.tester_iface0 = self.tester.get_interface(self.tester_port0)
> + self.tester_iface1 = self.tester.get_interface(self.tester_port1)
> + self.pci0 = self.dut.ports_info[self.dut_ports[0]]['pci']
> + self.pci1 = self.dut.ports_info[self.dut_ports[1]]['pci']
> + self.pass_flag = 'passed'
> + self.fail_flag = 'failed'
> +
> + self.pkt = Packet()
> + self.pmd_output = PmdOutput(self.dut)
> + self.launch_testpmd()
> + self.symmetric = False
> + self.rxq = 64
> + 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))
> + self.logger.info('rssprocess.test_case:
> {}'.format(self.rssprocess.test_case))
> +
> + def set_up(self):
> + """
> + Run before each test case.
> + """
> +
> + # check pkg version match
> +
> + if self.symmetric:
> + self.pmd_output.execute_cmd("port config all rss all")
> + self.pmd_output.execute_cmd("start")
> +
> + def launch_testpmd(self, symmetric=False):
> + if symmetric:
> + param = "--rxq=64 --txq=64"
> + else:
> + param = "--rxq=64 --txq=64 --disable-rss --rxd=384 --txd=384"
> + self.pmd_output.start_testpmd(cores="1S/4C/1T", param=param,
> + eal_param=f"-w {self.pci0}", socket=self.ports_socket)
> + self.symmetric = symmetric
> + if symmetric is True:
> + '''
> + symmetric may be False/True/2(any other not negative value)
> + False: disable rss
> + True: enable rss and execute port config all rss
> + 2: enable rss and do not execute port config all rss
> + '''
> + # Need config rss in setup
> + 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")
> + 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_gtpu_ipv4(self):
> + self.switch_testpmd(symmetric=False)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 4_toeplitz)
> +
> + def test_mac_ipv4_gtpu_ipv4_udp(self):
> + self.switch_testpmd(symmetric=False)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 4_udp_toeplitz)
> +
> + def test_mac_ipv4_gtpu_ipv4_tcp(self):
> + self.switch_testpmd(symmetric=False)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 4_tcp_toeplitz)
> +
> + def test_mac_ipv4_gtpu_ipv6(self):
> + self.switch_testpmd(symmetric=False)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 6_toeplitz)
> +
> + def test_mac_ipv4_gtpu_ipv6_udp(self):
> + self.switch_testpmd(symmetric=False)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 6_udp_toeplitz)
> +
> + def test_mac_ipv4_gtpu_ipv6_tcp(self):
> + self.switch_testpmd(symmetric=False)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 6_tcp_toeplitz)
> +
> + def test_mac_ipv6_gtpu_ipv4(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_toeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_ipv4_udp(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_udp_toep
> litz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_ipv4_tcp(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_tcp_toepli
> tz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_ipv6(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_toeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_ipv6_udp(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_udp_toep
> litz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_ipv6_tcp(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_tcp_toepli
> tz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_eh_ipv4(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_toepli
> tz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv4_udp(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_udp_t
> oeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv4_tcp(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_tcp_t
> oeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_toepli
> tz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_udp(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_udp_t
> oeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_tcp(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_tcp_t
> oeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_eh_ipv4_without_ul_dl(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul
> _dl_ipv4_toeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv4_udp_without_ul_dl(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul
> _dl_ipv4_udp_toeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv4_tcp_without_ul_dl(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul
> _dl_ipv4_tcp_toeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_without_ul_dl(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul
> _dl_ipv6_toeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_udp_without_ul_dl(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul
> _dl_ipv6_udp_toeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_tcp_without_ul_dl(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul
> _dl_ipv6_tcp_toeplitz)
> + self.switch_testpmd(symmetric=False)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv4_gtpu_ipv4_symmetric(self):
> + self.switch_testpmd(symmetric=True)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 4_symmetric)
> +
> + def test_mac_ipv4_gtpu_ipv4_udp_symmetric(self):
> + self.switch_testpmd(symmetric=True)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 4_udp_symmetric)
> +
> + def test_mac_ipv4_gtpu_ipv4_tcp_symmetric(self):
> + self.switch_testpmd(symmetric=True)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 4_tcp_symmetric)
> +
> + def test_mac_ipv4_gtpu_ipv6_symmetric(self):
> + self.switch_testpmd(symmetric=True)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 6_symmetric)
> +
> + def test_mac_ipv4_gtpu_ipv6_udp_symmetric(self):
> + self.switch_testpmd(symmetric=True)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 6_udp_symmetric)
> +
> + def test_mac_ipv4_gtpu_ipv6_tcp_symmetric(self):
> + self.switch_testpmd(symmetric=True)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv
> 6_tcp_symmetric)
> +
> + def test_mac_ipv6_gtpu_ipv4_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_symmetri
> c)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_ipv4_udp_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_udp_sym
> metric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_ipv4_tcp_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_tcp_sym
> metric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_ipv6_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_symmetri
> c)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_ipv6_udp_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_udp_sym
> metric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_ipv6_tcp_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_tcp_sym
> metric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv4_gtpu_eh_ipv4_symmetric(self):
> + self.switch_testpmd(symmetric=2)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh
> _ipv4_symmetric)
> +
> + def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_eh_ipv6_symmetric(self):
> + self.switch_testpmd(symmetric=2)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh
> _ipv6_symmetric)
> +
> + def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_eh_ipv4_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_symm
> etric)
> + self.switch_testpmd(symmetric=2)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv4_udp_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_tcp_s
> ymmetric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv4_tcp_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_tcp_s
> ymmetric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_symm
> etric)
> + self.switch_testpmd(symmetric=2)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_udp_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_udp_s
> ymmetric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_tcp_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_tcp_s
> ymmetric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_eh_ipv4_without_ul_dl_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_witho
> ut_ul_dl_symmetric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv4_udp_without_ul_dl_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_udp_
> without_ul_dl_symmetric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_tcp_w
> ithout_ul_dl_symmetric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_without_ul_dl_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_witho
> ut_ul_dl_symmetric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_udp_without_ul_dl_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_udp_
> without_ul_dl_symmetric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_mac_ipv6_gtpu_eh_ipv6_tcp_without_ul_dl_symmetric(self):
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_tcp_w
> ithout_ul_dl_symmetric)
> + self.switch_testpmd(symmetric=True)
> + self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
> +
> + def test_inner_l4_protocal_hash(self):
> + self.switch_testpmd(2)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=inner_l4_protocal_
> hash)
> +
> + def test_default_pattern_support(self):
> + self.switch_testpmd(symmetric=True)
> + ipv6_template =
> self.rssprocess.get_ipv6_template_by_ipv4(default_pattern_support_ipv4)
> +
> self.rssprocess.handle_rss_distribute_cases(cases_info=[default_pattern_s
> upport_ipv4] + ipv6_template)
> +
> + def test_negative_cases(self):
> + negative_rules = [
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end
> actions rss types ipv4-tcp end key_len 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end
> actions rss types ipv6-udp end key_len 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end
> actions rss types ipv4 end key_len 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end
> actions rss types udp end key_len 0 queues end / end']
> + self.rssprocess.create_rule(rule=negative_rules, check_stats=False,
> msg="Invalid input pattern: Invalid argument")
> +
> + def test_symmetric_negative_cases(self):
> + rules = [
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is
> 0 / ipv4 / end actions rss func symmetric_toeplitz types gtpu end key_len 0
> queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is
> 0 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 l3-dst-only end
> key_len 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is
> 0 / ipv4 / end actions rss func symmetric_toeplitz types ipv4-udp end key_len
> 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is
> 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-udp end
> key_len 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is
> 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4 end
> key_len 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is
> 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv6-tcp end
> key_len 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is
> 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types tcp end key_len
> 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is
> 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp l3-src-
> only end key_len 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / tcp / end
> actions rss func symmetric_toeplitz types ipv4-tcp l4-dst-only end key_len 0
> queues end / end',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is
> 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp l3-dst-
> only l4-src-only end key_len 0 queues end / end']
> + self.rssprocess.create_rule(rule=rules, check_stats=False)
> +
> + def test_global_simple_xor(self):
> + self.switch_testpmd()
> + rule1 = 'flow create 0 ingress pattern end actions rss func simple_xor
> key_len 0 queues end / end'
> + rule_li1 = self.rssprocess.create_rule(rule=rule1)
> + pkts1 = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2020",dst="
> ABAB:910B:6666:3457:8295:3333:1800:2929")/TCP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:ca:a3:28:94")/IP(src="1.1.4.1",dst="2.2.2.3")/("X"*480)',
> +
> 'Ether(dst="68:05:ca:a3:28:94")/IP(src="2.2.2.3",dst="1.1.4.1")/("X"*480)',
> +
> 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="CDCD:910A:2222:5498:8475:1111:39
> 00:2020",dst="ABAB:910B:6666:3457:8295:3333:1800:2929")/("X" * 80)',
> +
> 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="ABAB:910B:6666:3457:8295:3333:18
> 00:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X" * 80)',
> +
> 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="CDCD:910A:2222:5498:8475:1111:39
> 00:2020",dst="ABAB:910B:6666:3457:8295:3333:1800:2929")/UDP(sport=22,
> dport=23)/("X" * 80)',
> +
> 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="ABAB:910B:6666:3457:8295:3333:18
> 00:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,
> dport=23)/("X" * 80)', ]
> + output = self.rssprocess.send_pkt_get_output(pkts=pkts1)
> + hash_values, rss_distribute =
> self.rssprocess.get_hash_verify_rss_distribute(output)
> + for i in range(0, len(hash_values), 2):
> + self.verify(hash_values[i] == hash_values[i + 1],
> + 'the pair of packets with switched l3 address should have same
> hash value')
> + rule2 = [
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / tcp / end
> actions rss types ipv4-tcp end key_len 0 queues end / end',
> + 'flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types
> ipv6-udp end key_len 0 queues end / end']
> + rule_li2 = self.rssprocess.create_rule(rule=rule2)
> + pkts2 = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23,
> dport=22)/("X"*480)',
> +
> 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="CDCD:910A:2222:5498:8475:1111:39
> 00:2020",dst="ABAB:910B:6666:3457:8295:3333:1800:2929")/UDP(sport=22,
> dport=23)/("X" * 80)',
> +
> 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="CDCD:910A:2222:5498:8475:1111:39
> 00:2020",dst="ABAB:910B:6666:3457:8295:3333:1800:2929")/UDP(sport=23,
> dport=22)/("X" * 80)', ]
> + output = self.rssprocess.send_pkt_get_output(pkts=pkts2)
> + hash_values, rss_distribute =
> self.rssprocess.get_hash_verify_rss_distribute(output)
> + for i in range(0, len(hash_values), 2):
> + self.verify(hash_values[i] != hash_values[i + 1],
> + 'the packets with switched l4 port should have different hash
> values.')
> + self.pmd_output.execute_cmd('flow destroy 0 rule 0')
> + output = self.rssprocess.send_pkt_get_output(pkts=pkts1)
> + hash_values, rss_distribute =
> self.rssprocess.get_hash_verify_rss_distribute(output)
> + for i in range(0, len(hash_values), 2):
> + self.verify(hash_values[i] != hash_values[i + 1],
> + 'the pair of packets with switched l3 address should have
> defferent hash value')
> + output = self.rssprocess.send_pkt_get_output(pkts=pkts2)
> + hash_values, rss_distribute =
> self.rssprocess.get_hash_verify_rss_distribute(output)
> + for i in range(0, len(hash_values), 2):
> + self.verify(hash_values[i] != hash_values[i + 1],
> + 'the packets with switched l4 port should have different hash
> values.')
> + self.pmd_output.execute_cmd('flow flush 0')
> + output = self.rssprocess.send_pkt_get_output(pkts=pkts1)
> + hash_values, rss_distribute =
> self.rssprocess.get_hash_verify_rss_distribute(output)
> + for i in range(0, len(hash_values), 2):
> + self.verify(hash_values[i] != hash_values[i + 1],
> + 'the pair of packets with switched l3 address should have
> defferent hash value')
> + output = self.rssprocess.send_pkt_get_output(pkts=pkts2)
> + hash_values, rss_distribute =
> self.rssprocess.get_hash_verify_rss_distribute(output)
> + for i in range(0, len(hash_values), 2):
> + self.verify(hash_values[i] == hash_values[i + 1],
> + 'the packets with switched l4 port should have same hash
> values.')
> +
> + def test_rss_function_when_disable_rss(self):
> + self.switch_testpmd(False)
> + 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'
> + self.rssprocess.create_rule(rule=rule)
> + pkt =
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst=RandIP(),src=RandIP())/UDP(sport=RandShort(),dpo
> rt=RandShort())/("X"*480)'
> + output = self.rssprocess.send_pkt_get_output(pkts=pkt, count=1280)
> + hashes, rss_distribute =
> self.rssprocess.get_hash_verify_rss_distribute(output)
> + self.verify(len(hashes) == 1280,
> + 'all the packets should have hash value and distributed to all
> queues by RSS.')
> + self.verify(rss_distribute, 'the packet do not distribute by rss')
> +
> + def test_stress_cases(self):
> + # Subcase: add/delete IPV4_GTPU_UL_IPV4_TCP rules
> + self.switch_testpmd(2)
> + rule1 = 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc
> pdu_t is 1 / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-src-only
> end key_len 0 queues end / end'
> + for _ in range(100):
> + self.pmd_output.execute_cmd(rule1)
> + self.pmd_output.execute_cmd('flow destroy 0 rule 0')
> + rule_li = self.rssprocess.create_rule(rule=rule1)
> + out = self.pmd_output.execute_cmd('flow list 0')
> + p = re.compile("^(\d+)\s")
> + li = out.splitlines()
> + res = list(filter(bool, list(map(p.match, li))))
> + result = [i.group(1) for i in res]
> + self.verify(result == rule_li, 'should only rule 0 existed')
> + pkts1 = [
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/TCP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=32,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/TCP(sport=22,
> dport=33)/("X"*480)', ]
> + output = self.rssprocess.send_pkt_get_output(pkts=pkts1)
> + hash_values1, rss_distribute =
> self.rssprocess.get_hash_verify_rss_distribute(output)
> + self.verify(hash_values1[1] != hash_values1[0] and hash_values1[2] !=
> hash_values1[0] and hash_values1[3] ==
> + hash_values1[0],
> + 'packet 2 and packet 3 should have different hash value with
> packet 1, packet 4 should has same hash value with packet 1.')
> + self.pmd_output.execute_cmd('flow flush 0')
> + # Subcase: add/delete IPV4_GTPU_DL_IPV4 rules
> + rule2 = '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'
> + for _ in range(100):
> + self.pmd_output.execute_cmd(rule2)
> + self.pmd_output.execute_cmd('flow destroy 0 rule 0')
> + rule_li = self.rssprocess.create_rule(rule=rule2)
> + out = self.pmd_output.execute_cmd('flow list 0')
> + p = re.compile("^(\d+)\s")
> + li = out.splitlines()
> + res = list(filter(bool, list(map(p.match, li))))
> + result = [i.group(1) for i in res]
> + self.verify(result == rule_li, 'should only rule 0 existed')
> + pkts2 = [
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x12345)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/("X"*480)', ]
> + output = self.rssprocess.send_pkt_get_output(pkts=pkts2)
> + hash_values2, rss_distribute =
> self.rssprocess.get_hash_verify_rss_distribute(output)
> + self.verify(hash_values2[1] != hash_values2[0] and hash_values2[2] ==
> hash_values2[0],
> + 'packet 2 should has different hash value with packet 1, packet 3
> should has same hash value with packet 1.')
> +
> + def test_ipv4_gtpu_ipv4_ipv4_gtpu_eh_ipv4(self):
> + self.switch_testpmd(2)
> + rules = [
> + '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',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 /
> end actions rss types ipv4 l3-src-only end key_len 0 queues end / end'
> + ]
> + pkts1 = [
> + [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ],
> + [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ],
> + [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)', ]
> + ]
> +
> + pkts2 = [
> + [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255,
> teid=0x123456)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ],
> + [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ],
> + [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ]
> + ]
> + rule_li1 = self.rssprocess.create_rule(rule=rules[0])
> + hash_value1, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1[0])
> + self.verify(hash_value1[0] == hash_value1[1] and hash_value1[0] !=
> hash_value1[2],
> + 'got wrong hash, expect 1st hash equal to 2nd and different with
> 3rd')
> + hash_value2, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1[1])
> + self.verify(len(set(hash_value2)) == len(pkts1[1]), 'hash wrong, expect
> all hash value are different')
> + hash_value3, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1[2])
> + self.verify(len(set(hash_value3)) == len(pkts1[2]), 'hash wrong, expect
> all hash value are different')
> +
> + rule_li2 = self.rssprocess.create_rule(rule=rules[1])
> + hash_value1, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[0])
> + self.verify(hash_value1[0] == hash_value1[1] and hash_value1[0] !=
> hash_value1[2],
> + 'got wrong hash, expect 1st hash equal to 2nd and different with
> 3rd')
> + hash_value2, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[1])
> + self.verify(hash_value2[0] != hash_value2[1] and hash_value2[0] ==
> hash_value2[2],
> + 'got wrong hash, expect 1st hash equal to 3rd and different with
> 2nd')
> + hash_value3, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[2])
> + self.verify(hash_value3[0] != hash_value3[1] and hash_value3[0] ==
> hash_value3[2],
> + 'got wrong hash, expect 1st hash equal to 3rd and different with
> 2nd')
> +
> + self.rssprocess.destroy_rule(port_id=0, rule_id=rule_li1)
> + hash_value1, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[0])
> + self.verify(all([i == '0' for i in hash_value1]),
> + 'got wrong hash, expect not got rss hash and distribute to queue
> 0')
> + hash_value2, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[1])
> + self.verify(hash_value2[0] != hash_value2[1] and hash_value2[0] ==
> hash_value2[2],
> + 'got wrong hash, expect 1st hash equal to 3rd and different with
> 2nd')
> + hash_value3, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[2])
> + self.verify(hash_value3[0] != hash_value3[1] and hash_value3[0] ==
> hash_value3[2],
> + 'got wrong hash, expect 1st hash equal to 3rd and different with
> 2nd')
> +
> + self.rssprocess.create_rule(rule=rules[0])
> + hash_value1, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[0])
> + self.verify(hash_value1[0] == hash_value1[1] and hash_value1[0] !=
> hash_value1[2],
> + 'got wrong hash, expect 1st hash equal to 2nd and different with
> 3rd')
> + hash_value2, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[1])
> + self.verify(hash_value2[0] != hash_value2[1] and hash_value2[0] ==
> hash_value2[2],
> + 'got wrong hash, expect 1st hash equal to 3rd and different with
> 2nd')
> + hash_value3, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[2])
> + self.verify(hash_value3[0] != hash_value3[1] and hash_value3[0] ==
> hash_value3[2],
> + 'got wrong hash, expect 1st hash equal to 3rd and different with
> 2nd')
> +
> + self.rssprocess.destroy_rule(port_id=0, rule_id=rule_li2)
> + hash_value1, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[0])
> + self.verify(hash_value1[0] == hash_value1[1] and hash_value1[0] !=
> hash_value1[2],
> + 'got wrong hash, expect 1st hash equal to 2nd and different with
> 3rd')
> + hash_value2, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[1] + pkts2[2])
> + self.verify(all([i == '0' for i in hash_value2]),
> + 'got wrong hash, expect not got rss hash and distribute to queue
> 0')
> +
> + def test_ipv4_gtpu_eh_ipv4_with_without_ul_dl(self):
> + self.switch_testpmd(2)
> + rules = [
> + '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',
> + 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 /
> end actions rss types ipv4 l3-src-only end key_len 0 queues end / end']
> + pkts1 = [
> + [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
> + ],
> + [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
> + ]
> + ]
> +
> + pkts2 = [
> + [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ],
> + [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ]
> + ]
> + rule_li1 = self.rssprocess.create_rule(rule=rules[0])
> + hash_value1, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1[0])
> + self.verify(hash_value1[0] == hash_value1[1] and hash_value1[0] !=
> hash_value1[2],
> + 'got wrong hash, expect 1st hash equal to 2nd and different with
> 3rd')
> + hash_value2, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts1[1])
> + self.verify(len(set(hash_value2)) == len(pkts1[1]), 'hash wrong, expect
> all hash value are different')
> +
> + rule_li2 = self.rssprocess.create_rule(rule=rules[1])
> + hash_value1, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[0])
> + self.verify(hash_value1[0] != hash_value1[1] and hash_value1[0] ==
> hash_value1[2],
> + 'got wrong hash, expect 1st hash equal to 3rd and different with
> 2nd')
> + hash_value2, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[1])
> + self.verify(hash_value2[0] != hash_value2[1] and hash_value2[0] ==
> hash_value2[2],
> + 'got wrong hash, expect 1st hash equal to 3rd and different with
> 2nd')
> +
> + self.rssprocess.destroy_rule(port_id=0, rule_id=rule_li2)
> + hash_value1, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts2[0] + pkts2[1])
> + self.verify(all([i == '0' for i in hash_value1]),
> + 'got wrong hash, expect not got rss hash and distribute to queue
> 0')
> +
> + def test_ipv4_gtpu_eh_ipv4_without_with_ul_dl(self):
> + self.switch_testpmd(2)
> + rules = [
> + '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',
> + 'flow create 0 ingress pattern eth / 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',
> + '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']
> + pkts1 = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ]
> + rule0 = self.rssprocess.create_rule(rules[0])
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0], 'packet 2 should has
> same hash value with packet 1')
> + self.verify(hash_values[2] != hash_values[0], 'packet 3 should has
> different hash value with packet 1')
> + self.verify(hash_values[4] == hash_values[3], 'packet 5 should has
> same hash value with packet 4')
> + self.verify(hash_values[5] != hash_values[3], 'packet 6 should has
> different hash value with packet 4')
> +
> + rule1 = self.rssprocess.create_rule(rules[1])
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0], 'packet 2 should has
> same hash value with packet 1')
> + self.verify(hash_values[2] != hash_values[0], 'packet 3 should has
> different hash value with packet 1')
> + self.verify(hash_values[4] != hash_values[3], 'packet 5 should has
> different hash value with packet 4')
> + self.verify(hash_values[5] == hash_values[3], 'packet 6 should has
> same hash value with packet 4')
> +
> + self.rssprocess.destroy_rule(port_id=0, rule_id=rule0)
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts1[3:])
> + self.verify(hash_values[1] != hash_values[0], 'should get different hash
> values')
> + self.verify(hash_values[2] == hash_values[0], 'should get same hash
> values')
> +
> + rule2 = self.rssprocess.create_rule(rules[0])
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts1)
> + self.verify(hash_values[1] == hash_values[0], 'packet 2 should has
> same hash value with packet 1')
> + self.verify(hash_values[2] != hash_values[0], 'packet 3 should has
> different hash value with packet 1')
> + self.verify(hash_values[4] == hash_values[3], 'packet 5 should has
> same hash value with packet 4')
> + self.verify(hash_values[5] != hash_values[3], 'packet 6 should has
> different hash value with packet 4')
> +
> + self.rssprocess.destroy_rule(port_id=0, rule_id=rule2)
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts1)
> + self.verify(all([i == '0' for i in hash_values]), 'all pkts should has no hash
> value and distribute to queue 0')
> +
> + def test_ipv4_gtpu_eh_ipv4_and_ipv4_gtpu_eh_ipv4_udp_tcp(self):
> + self.switch_testpmd(2)
> + pkts1 = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dpor
> t=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dpor
> t=33)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/UDP(sport=22,dpor
> t=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dpor
> t=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dpor
> t=33)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/UDP(sport=22,dpor
> t=23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ]
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0], 'packet 2 should has
> same hash value with packet 1')
> + self.verify(hash_values[2] != hash_values[0], 'packet 3 should has
> different hash value with packet 1')
> + self.verify(hash_values[4] == hash_values[3], 'packet 5 should has
> same hash value with packet 4')
> + self.verify(hash_values[5] != hash_values[3], 'packet 6 should has
> different hash value with packet 4')
> + self.verify(hash_values[7] != hash_values[6], 'packet 8 should has
> different hash value to packet 7')
> + self.verify(hash_values[8] != hash_values[6] and hash_values[8] !=
> hash_values[7],
> + 'packet 9 should have different hash value to packet 7 and 8')
> + self.verify(hash_values[10] != hash_values[9], 'packet 11 should has
> different hash value to packet 10')
> + self.verify(hash_values[11] != hash_values[9] and hash_values[11] !=
> hash_values[10],
> + 'packet 12 have different hash value to packet 10 and 11')
> + rule1 = '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'
> + rule_li1 = self.rssprocess.create_rule(rule=rule1)
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0], 'packet 2 should has
> same hash value with packet 1')
> + self.verify(hash_values[2] != hash_values[0], 'packet 3 should has
> different hash value with packet 1')
> + self.verify(hash_values[4] != hash_values[3], 'packet 5 should has
> different hash value with packet 4')
> + self.verify(hash_values[5] == hash_values[3], 'packet 6 should has
> same hash value with packet 4')
> + self.verify(hash_values[7] != hash_values[6], 'packet 8 should has
> different hash value to packet 7')
> + self.verify(hash_values[8] != hash_values[6] and hash_values[8] !=
> hash_values[7],
> + 'packet 9 should have different hash value to packet 7 and 8')
> + self.verify(hash_values[10] != hash_values[9], 'packet 11 should has
> different hash value to packet 10')
> + self.verify(hash_values[11] != hash_values[9] and hash_values[11] !=
> hash_values[10],
> + 'packet 12 have different hash value to packet 10 and 11')
> + rule2 = 'flow create 0 ingress pattern eth / 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'
> + rule_li2 = self.rssprocess.create_rule(rule=rule2)
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0], 'packet 2 should has
> same hash value with packet 1')
> + self.verify(hash_values[2] == hash_values[0], 'packet 3 should has
> same hash value with packet 1')
> + self.verify(hash_values[4] != hash_values[3], 'packet 5 should has
> different hash value with packet 4')
> + self.verify(hash_values[5] == hash_values[3], 'packet 6 should has
> same hash value with packet 4')
> + self.verify(hash_values[7] != hash_values[6], 'packet 8 should has
> different hash value to packet 7')
> + self.verify(hash_values[8] != hash_values[6] and hash_values[8] !=
> hash_values[7],
> + 'packet 9 should have different hash value to packet 7 and 8')
> + self.verify(hash_values[10] != hash_values[9], 'packet 11 should has
> different hash value to packet 10')
> + self.verify(hash_values[11] == hash_values[9],
> + 'packet 12 have same hash value to packet 10')
> +
> + def test_ipv6_gtpu_eh_ipv6_and_ipv6_gtpu_eh_ipv6_udp_tcp(self):
> + self.switch_testpmd(2)
> + pkts1 = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=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"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=33)/("X"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2021")/TCP(sport=22,dport=23)/("X"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=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"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=33)/("X"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2021")/TCP(sport=22,dport=23)/("X"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)', ]
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0], 'packet 2 should has
> same hash value with packet 1')
> + self.verify(hash_values[2] != hash_values[0], 'packet 3 should has
> different hash value with packet 1')
> + self.verify(hash_values[4] == hash_values[3], 'packet 5 should has
> same hash value with packet 4')
> + self.verify(hash_values[5] != hash_values[3], 'packet 6 should has
> different hash value with packet 4')
> + self.verify(hash_values[7] != hash_values[6], 'packet 8 should has
> different hash value to packet 7')
> + self.verify(hash_values[8] != hash_values[6] and hash_values[8] !=
> hash_values[7],
> + 'packet 9 should have different hash value to packet 7 and 8')
> + self.verify(hash_values[10] != hash_values[9], 'packet 11 should has
> different hash value to packet 10')
> + self.verify(hash_values[11] != hash_values[9] and hash_values[11] !=
> hash_values[10],
> + 'packet 12 have different hash value to packet 10 and 11')
> + rule1 = 'flow create 0 ingress pattern eth / ipv6 / udp / gtpu / gtp_psc
> pdu_t is 0 / ipv6 / tcp / end actions rss types ipv6-tcp l4-dst-only end key_len
> 0 queues end / end'
> + rule_li1 = self.rssprocess.create_rule(rule=rule1)
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] != hash_values[0], 'packet 2 should has
> different hash value with packet 1')
> + self.verify(hash_values[2] == hash_values[0], 'packet 3 should has
> same hash value with packet 1')
> + self.verify(hash_values[4] == hash_values[3], 'packet 5 should has
> same hash value with packet 4')
> + self.verify(hash_values[5] != hash_values[3], 'packet 6 should has
> different hash value with packet 4')
> + self.verify(hash_values[7] != hash_values[6], 'packet 8 should has
> different hash value to packet 7')
> + self.verify(hash_values[8] != hash_values[6] and hash_values[8] !=
> hash_values[7],
> + 'packet 9 should have different hash value to packet 7 and 8')
> + self.verify(hash_values[10] != hash_values[9], 'packet 11 should has
> different hash value to packet 10')
> + self.verify(hash_values[11] != hash_values[9] and hash_values[11] !=
> hash_values[10],
> + 'packet 12 have different hash value to packet 10 and 11')
> + rule2 = 'flow create 0 ingress pattern eth / ipv6 / 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_li2 = self.rssprocess.create_rule(rule=rule2)
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0], 'packet 2 should has
> same hash value with packet 1')
> + self.verify(hash_values[2] != hash_values[0], 'packet 3 should has
> different hash value with packet 1')
> + self.verify(hash_values[4] == hash_values[3], 'packet 5 should has
> same hash value with packet 4')
> + self.verify(hash_values[5] != hash_values[3], 'packet 6 should has
> different hash value with packet 4')
> + self.verify(hash_values[7] == hash_values[6], 'packet 8 should has
> same hash value to packet 7')
> + self.verify(hash_values[8] != hash_values[6],
> + 'packet 9 should have different hash value to packet 7')
> + self.verify(hash_values[10] != hash_values[9], 'packet 11 should has
> different hash value to packet 10')
> + self.verify(hash_values[11] != hash_values[9] and hash_values[11] !=
> hash_values[10],
> + 'packet 12 have different hash value to packet 10 and 11')
> +
> + def
> test_ipv4_gtpu_eh_ipv6_and_ipv4_gtpu_eh_ipv6_udp_tcp_without_ul_dl(
> self):
> + self.switch_testpmd(2)
> + pkts1 = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=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"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=33)/("X"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2021")/TCP(sport=22,dport=23)/("X"*4
> 80)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="
> CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)', ]
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0], 'packet 2 should has
> same hash value with packet 1')
> + self.verify(hash_values[2] != hash_values[0] and hash_values[3] !=
> hash_values[0],
> + 'packet 3 and packet 4 should have different hash value to packet
> 1.')
> + self.verify(len({hash_values[4], hash_values[5], hash_values[6]}) == 3,
> + 'packet 5 and packet 6 and packet 7 have different hash value.')
> + rule1 = 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc /
> ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end'
> + self.rssprocess.create_rule(rule=rule1)
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0] and hash_values[2] ==
> hash_values[0],
> + 'packet 2 should has same hash value with packet 1, packet 3
> should has same hash value to packet 1')
> + self.verify(hash_values[3] != hash_values[0], 'packet 4 should have
> different hash value to packet 1.')
> + self.verify(hash_values[5] == hash_values[4], 'packet 6 should has
> same hash value to packet 5.')
> + self.verify(hash_values[6] != hash_values[4], 'packet 7 should has
> differnt hash value to packet 5.')
> +
> + def test_ipv6_gtpu_ipv4_and_ipv6_gtpu_ipv4_udp_tcp(self):
> + self.switch_testpmd(2)
> + pkts1 = [
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport
> =23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport
> =33)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IP(dst="192.168.1.1",src="192.168.0.2")/UDP(sport=22,dport
> =23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.1.2")/UDP(sport=22,dport
> =23)/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gt
> p_type=255,
> teid=0x123456)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ]
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0],
> + 'packet 2 should has same hash value with packet 1')
> + self.verify(hash_values[2] != hash_values[0] and hash_values[3] !=
> hash_values[0],
> + 'packet 3 and packet 4 should have different hash value to packet
> 1.')
> + self.verify(len({hash_values[4], hash_values[5], hash_values[6]}) == 3,
> + 'packet 5 and packet 6 and packet 7 have different hash value.')
> + self.rssprocess.create_rule(
> + rule='flow create 0 ingress pattern eth / ipv6 / udp / gtpu / ipv4 / udp
> / end actions rss types ipv4-udp l4-dst-only end key_len 0 queues end / end')
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] != hash_values[0],
> + 'packet 2 should has defferent hash value with packet 1')
> + self.verify(hash_values[2] == hash_values[0] and hash_values[3] ==
> hash_values[0],
> + 'packet 3 and packet 4 should have same hash value to packet 1.')
> + self.verify(len({hash_values[4], hash_values[5], hash_values[6]}) == 3,
> + 'packet 5 and packet 6 and packet 7 have different hash value.')
> + self.rssprocess.create_rule(
> + rule='flow create 0 ingress pattern eth / ipv6 / udp / gtpu / ipv4 / end
> actions rss types ipv4 l3-dst-only end key_len 0 queues end / end')
> + hash_values, queues =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
> + self.verify(hash_values[1] == hash_values[0],
> + 'packet 2 should has same hash value with packet 1')
> + self.verify(hash_values[2] != hash_values[0], 'packet 3 should has
> different hash value to packet 1.')
> + self.verify(hash_values[3] == hash_values[0],
> + 'packet 4 should has same hash value with packet 1')
> + self.verify(hash_values[5] == hash_values[4],
> + 'packet 6 should has same hash value with packet 5')
> + self.verify(hash_values[6] != hash_values[4], 'packet 7 should has
> different hash value to packet 5.')
> +
> + def test_toeplitz_symmetric_combination(self):
> + self.switch_testpmd(False)
> + self.logger.info('Subcase: toeplitz/symmetric with same pattern')
> + # step 1
> + rule_toeplitz = '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_id_toeplitz = self.rssprocess.create_rule(rule=rule_toeplitz)
> + self.rssprocess.check_rule(rule_list=rule_id_toeplitz)
> + pkts_toeplitz =
> ['Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_
> type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/("X"*480)']
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(hash_value[1] != hash_value[0], 'second packet should hash
> value different from the first packet')
> + self.verify(hash_value[2] == hash_value[0], 'third packet should hash
> value same with the first packet')
> + # step 2
> + rule_symmetric = '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_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
> + pkts_symmetric
> =['Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp
> _type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.2",dst="192.168.0.1")/("X"*480)']
> + self.rssprocess.check_rule(rule_list=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(hash_value[0] == hash_value[1], 'second packet should hash
> value same with the first packet')
> + # step 3
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + for temp in range(len(hash_value)):
> + self.verify(len(hash_value[temp]) != 0, 'all the toeplitz packet should
> have hash value')
> + #step 4
> + self.rssprocess.destroy_rule(rule_id=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(len(hash_value) == 0, 'all the toeplitz packet should have no
> hash value')
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(len(hash_value) == 0, 'all the symmetric packet should have
> no hash value')
> + self.pmd_output.execute_cmd('flow flush 0')
> +
> + self.logger.info('Subcase: toeplitz/symmetric with same pattern
> (switched rule order)')
> + # step 1
> + rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
> + self.rssprocess.check_rule(rule_list=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(hash_value[0] == hash_value[1], 'second packet should hash
> value same with the first packet')
> + rule_id_toeplitz = self.rssprocess.create_rule(rule=rule_toeplitz)
> + self.rssprocess.check_rule(rule_list=rule_id_toeplitz)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(hash_value[1] != hash_value[0], 'second packet should hash
> value different from the first packet')
> + self.verify(hash_value[2] == hash_value[0], 'third packet should hash
> value same with the first packet')
> + # step 2
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + for temp in range(len(hash_value)):
> + self.verify(len(hash_value[temp]) != 0, 'all the toeplitz packet should
> have hash value')
> + # step 3
> + self.rssprocess.destroy_rule(rule_id=rule_id_toeplitz)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(len(hash_value) == 0, 'all the toeplitz packet should have no
> hash value')
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(len(hash_value) == 0, 'all the symmetric packet should have
> no hash value')
> + self.pmd_output.execute_cmd('flow flush 0')
> +
> + self.logger.info('Subcase: toeplitz/symmetric with different pattern
> (different UL/DL)')
> + # step 1
> + rule_toeplitz = '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'
> + pkts_toeplitz = [
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/("X"*480)'
> + ]
> + rule_symmetric = 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu /
> gtp_psc pdu_t is 1 / ipv4 / end actions rss func symmetric_toeplitz types ipv4
> end key_len 0 queues end / end'
> + pkts_symmetric = [
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(src="192.168.0.2",dst="192.168.0.1")/("X"*480)'
> + ]
> + rule_id_toeplitz = self.rssprocess.create_rule(rule=rule_toeplitz)
> + self.rssprocess.check_rule(rule_list=rule_id_toeplitz)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(hash_value[1] != hash_value[0], 'second packet should hash
> value different from the first packet')
> + self.verify(hash_value[2] == hash_value[0], 'third packet should hash
> value same with the first packet')
> + rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
> + self.rssprocess.check_rule(rule_list=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(hash_value[0] == hash_value[1], 'second packet should hash
> value same with the first packet')
> + # step 2
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(hash_value[1] != hash_value[0], 'second packet should hash
> value different from the first packet')
> + self.verify(hash_value[2] == hash_value[0], 'third packet should hash
> value same with the first packet')
> + # step 3
> + self.rssprocess.destroy_rule(rule_id=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(len(hash_value) == 0, 'all the symmetric packet should have
> no hash value')
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(hash_value[1] != hash_value[0], 'second packet should hash
> value different from the first packet')
> + self.verify(hash_value[2] == hash_value[0], 'third packet should hash
> value same with the first packet')
> + rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
> + self.rssprocess.check_rule(rule_list=rule_id_symmetric)
> + self.rssprocess.destroy_rule(rule_id=rule_id_toeplitz)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(hash_value[0] == hash_value[1], 'second packet should hash
> value same with the first packet')
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(len(hash_value) == 0, 'third packet should hash value same
> with the first packet')
> + self.pmd_output.execute_cmd('flow flush 0')
> +
> + self.logger.info('Subcase: toeplitz/symmetric with different pattern
> (with/without UL/DL)')
> + # step 1
> + rule_toeplitz = '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'
> + pkts_toeplitz = [
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/("X"*480)'
> + ]
> + rule_symmetric = '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'
> + pkts_symmetric = [
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.2",dst="192.168.0.1")/("X"*480)'
> + ]
> + rule_id_toeplitz = self.rssprocess.create_rule(rule=rule_toeplitz)
> + self.rssprocess.check_rule(rule_list=rule_id_toeplitz)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(hash_value[1] != hash_value[0], 'hash_value[1] should hash
> value different from hash_value[0]')
> + self.verify(hash_value[2] == hash_value[0], 'hash_value[2] should hash
> value same with hash_value[0]')
> + self.verify(hash_value[4] != hash_value[3], 'hash_value[4] should hash
> value different from hash_value[3]')
> + self.verify(hash_value[5] == hash_value[3], 'hash_value[5] should hash
> value same with hash_value[3]')
> + rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
> + self.rssprocess.check_rule(rule_list=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(hash_value[0] == hash_value[1], 'second packet should hash
> value same with the first packet')
> + # step 2
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + for temp in range(len(hash_value)):
> + self.verify(len(hash_value[temp]) != 0, 'all the toeplitz packet should
> have hash value')
> + # step 3
> + self.rssprocess.destroy_rule(rule_id=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(len(hash_value) == 0, 'all the symmetric packet should have
> no hash value')
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + for temp in range(len(hash_value)):
> + if temp < 3:
> + self.verify(len(hash_value) == 0, 'all the toeplitz DL packet should
> have no hash value')
> + else:
> + self.verify(len(hash_value[temp]) != 0, 'all the toeplitz UL packet
> should have hash value')
> + # step 4
> + rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
> + self.rssprocess.check_rule(rule_list=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(hash_value[0] == hash_value[1], 'second packet should hash
> value same with the first packet')
> + # step 5
> + self.rssprocess.destroy_rule(rule_id=rule_id_toeplitz)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(hash_value[0] == hash_value[1], 'second packet should hash
> value same with the first packet')
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + for temp in range(len(hash_value)):
> + if temp > 2:
> + self.verify(len(hash_value) == 0, 'all the toeplitz UL packet should
> have no hash value')
> + self.pmd_output.execute_cmd('flow flush 0')
> +
> + self.logger.info('Subcase: toeplitz/symmetric with different pattern')
> + # step 1
> + rule_toeplitz = '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'
> + pkts_toeplitz = [
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/UDP(sport=22,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=32,
> dport=23)/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0,
> qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/UDP(sport=22,
> dport=33)/("X"*480)'
> + ]
> + rule_symmetric = 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu /
> gtp_psc pdu_t is 1 / ipv6 / end actions rss func symmetric_toeplitz types ipv6
> end key_len 0 queues end / end'
> + pkts_symmetric = [
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888",dst="2
> 222:3333:4444:5555:6666:7777:8888:9999")/("X"*480)',
> +
> 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_t
> ype=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1,
> qos_flow=0x34)/IPv6(src="2222:3333:4444:5555:6666:7777:8888:9999",dst="1
> 111:2222:3333:4444:5555:6666:7777:8888")/("X"*480)'
> + ]
> + rule_id_toeplitz = self.rssprocess.create_rule(rule=rule_toeplitz)
> + self.rssprocess.check_rule(rule_list=rule_id_toeplitz)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(hash_value[1] != hash_value[0], 'hash_value[1] should hash
> value different from hash_value[0]')
> + self.verify(hash_value[2] != hash_value[0], 'hash_value[2] should hash
> value different with hash_value[0]')
> + self.verify(hash_value[3] == hash_value[0], 'hash_value[3] should hash
> value same from hash_value[0]')
> + rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
> + self.rssprocess.check_rule(rule_list=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(hash_value[0] == hash_value[1], 'second packet should hash
> value same with the first packet')
> + # step 2
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + for temp in range(len(hash_value)):
> + self.verify(len(hash_value[temp]) != 0, 'all the toeplitz packet should
> have hash value')
> + # step 3
> + self.rssprocess.destroy_rule(rule_id=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(len(hash_value) == 0, 'all the symmetric packet should have
> no hash value')
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(hash_value[1] != hash_value[0], 'hash_value[1] should hash
> value different from hash_value[0]')
> + self.verify(hash_value[2] != hash_value[0], 'hash_value[2] should hash
> value different with hash_value[0]')
> + self.verify(hash_value[3] == hash_value[0], 'hash_value[3] should hash
> value same from hash_value[0]')
> + # step 4
> + rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
> + self.rssprocess.check_rule(rule_list=rule_id_symmetric)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(hash_value[0] == hash_value[1], 'second packet should hash
> value same with the first packet')
> + self.rssprocess.destroy_rule(rule_id=rule_id_toeplitz)
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
> + self.verify(hash_value[0] == hash_value[1], 'second packet should hash
> value same with the first packet')
> + hash_value, _ =
> self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
> + self.verify(len(hash_value) == 0, 'all the symmetric packet should have
> no hash value')
> + 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.dut.kill_all()
> --
> 2.17.1
[-- Attachment #2: TestCVLAdvancedRSSGTPU.log --]
[-- Type: application/octet-stream, Size: 49406 bytes --]
20/10/2020 14:08:10 dts:
TEST SUITE : TestCVLAdvancedRSSGTPU
20/10/2020 14:08:10 dts: NIC : columbiaville_100g
20/10/2020 14:08:10 dut.10.240.183.62:
20/10/2020 14:08:10 tester:
20/10/2020 14:08:10 dut.10.240.183.62: x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 32,33,34,35 -n 4 -w 0000:af:00.0 --file-prefix=dpdk_9776_20201020140752 -- -i --rxq=64 --txq=64 --disable-rss --rxd=384 --txd=384
20/10/2020 14:08:12 dut.10.240.183.62: EAL: Detected 72 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/dpdk_9776_20201020140752/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: using IOMMU type 1 (Type 1)
EAL: Probe PCI driver: net_ice (8086:1592) device: 0000:af:00.0 (socket 1)
ice_load_pkg_type(): Active package is: 1.3.21.0, ICE COMMS Package
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_1>: n=171456, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
Warning! port-topology=paired and odd forward ports number, the last port will pair with itself.
Configuring Port 0 (socket 1)
Port 0: 68:A6:B7:0B:6F:38
Checking link statuses...
Done
20/10/2020 14:08:22 dut.10.240.183.62: set fwd rxonly
20/10/2020 14:08:22 dut.10.240.183.62:
Set rxonly packet forwarding mode
20/10/2020 14:08:22 dut.10.240.183.62: set verbose 1
20/10/2020 14:08:22 dut.10.240.183.62:
Change verbose level from 0 to 1
20/10/2020 14:08:22 dut.10.240.183.62: show port info all
20/10/2020 14:08:22 dut.10.240.183.62:
********************* Infos for port 0 *********************
MAC address: 68:A6:B7:0B:6F:38
Device name: 0000:af:00.0
Driver name: net_ice
Firmware-version: 2.20 0x800048d3 1.2832.0
Devargs:
Connect to socket: 1
memory allocation on the socket: 1
Link status: up
Link speed: 10 Gbps
Link duplex: full-duplex
MTU: 1500
Promiscuous mode: enabled
Allmulticast mode: disabled
Maximum number of MAC addresses: 64
Maximum number of MAC addresses of hash filtering: 0
VLAN offload:
strip off, filter off, extend off, qinq strip off
Hash key size in bytes: 52
Redirection table size: 512
Supported RSS offload flow types:
ipv4
ipv4-frag
ipv4-tcp
ipv4-udp
ipv4-sctp
ipv4-other
ipv6
ipv6-frag
ipv6-tcp
ipv6-udp
ipv6-sctp
ipv6-other
l2_payload
Minimum size of RX buffer: 1024
Maximum configurable length of RX packet: 9728
Maximum configurable size of LRO aggregated packet: 0
Current number of RX queues: 64
Max possible RX queues: 64
Max possible number of RXDs per queue: 4096
Min possible number of RXDs per queue: 64
RXDs number alignment: 32
Current number of TX queues: 64
Max possible TX queues: 64
Max possible number of TXDs per queue: 4096
Min possible number of TXDs per queue: 64
TXDs number alignment: 32
Max segment number per packet: 0
Max segment number per MTU/TSO: 0
20/10/2020 14:08:22 TestCVLAdvancedRSSGTPU: rssprocess.tester_ifaces: ['ens192f0', 'ens192f1']
20/10/2020 14:08:22 TestCVLAdvancedRSSGTPU: rssprocess.test_case: <TestSuite_cvl_advanced_rss_gtpu.TestCVLAdvancedRSSGTPU object at 0x7fb0b90eb400>
20/10/2020 14:08:22 TestCVLAdvancedRSSGTPU: Test Case test_ipv4_gtpu_ipv4_ipv4_gtpu_eh_ipv4 Begin
20/10/2020 14:08:22 dut.10.240.183.62:
20/10/2020 14:08:22 tester:
20/10/2020 14:08:22 dut.10.240.183.62: start
20/10/2020 14:08:22 dut.10.240.183.62:
rxonly packet forwarding - ports=1 - cores=1 - streams=64 - NUMA support enabled, MP allocation mode: native
Logical Core 33 (socket 1) forwards packets on 64 streams:
RX P=0/Q=0 (socket 1) -> TX P=0/Q=0 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=1 (socket 1) -> TX P=0/Q=1 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=2 (socket 1) -> TX P=0/Q=2 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=3 (socket 1) -> TX P=0/Q=3 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=4 (socket 1) -> TX P=0/Q=4 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=5 (socket 1) -> TX P=0/Q=5 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=6 (socket 1) -> TX P=0/Q=6 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=7 (socket 1) -> TX P=0/Q=7 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=8 (socket 1) -> TX P=0/Q=8 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=9 (socket 1) -> TX P=0/Q=9 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=10 (socket 1) -> TX P=0/Q=10 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=11 (socket 1) -> TX P=0/Q=11 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=12 (socket 1) -> TX P=0/Q=12 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=13 (socket 1) -> TX P=0/Q=13 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=14 (socket 1) -> TX P=0/Q=14 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=15 (socket 1) -> TX P=0/Q=15 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=16 (socket 1) -> TX P=0/Q=16 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=17 (socket 1) -> TX P=0/Q=17 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=18 (socket 1) -> TX P=0/Q=18 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=19 (socket 1) -> TX P=0/Q=19 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=20 (socket 1) -> TX P=0/Q=20 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=21 (socket 1) -> TX P=0/Q=21 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=22 (socket 1) -> TX P=0/Q=22 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=23 (socket 1) -> TX P=0/Q=23 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=24 (socket 1) -> TX P=0/Q=24 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=25 (socket 1) -> TX P=0/Q=25 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=26 (socket 1) -> TX P=0/Q=26 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=27 (socket 1) -> TX P=0/Q=27 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=28 (socket 1) -> TX P=0/Q=28 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=29 (socket 1) -> TX P=0/Q=29 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=30 (socket 1) -> TX P=0/Q=30 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=31 (socket 1) -> TX P=0/Q=31 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=32 (socket 1) -> TX P=0/Q=32 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=33 (socket 1) -> TX P=0/Q=33 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=34 (socket 1) -> TX P=0/Q=34 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=35 (socket 1) -> TX P=0/Q=35 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=36 (socket 1) -> TX P=0/Q=36 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=37 (socket 1) -> TX P=0/Q=37 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=38 (socket 1) -> TX P=0/Q=38 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=39 (socket 1) -> TX P=0/Q=39 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=40 (socket 1) -> TX P=0/Q=40 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=41 (socket 1) -> TX P=0/Q=41 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=42 (socket 1) -> TX P=0/Q=42 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=43 (socket 1) -> TX P=0/Q=43 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=44 (socket 1) -> TX P=0/Q=44 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=45 (socket 1) -> TX P=0/Q=45 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=46 (socket 1) -> TX P=0/Q=46 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=47 (socket 1) -> TX P=0/Q=47 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=48 (socket 1) -> TX P=0/Q=48 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=49 (socket 1) -> TX P=0/Q=49 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=50 (socket 1) -> TX P=0/Q=50 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=51 (socket 1) -> TX P=0/Q=51 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=52 (socket 1) -> TX P=0/Q=52 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=53 (socket 1) -> TX P=0/Q=53 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=54 (socket 1) -> TX P=0/Q=54 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=55 (socket 1) -> TX P=0/Q=55 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=56 (socket 1) -> TX P=0/Q=56 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=57 (socket 1) -> TX P=0/Q=57 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=58 (socket 1) -> TX P=0/Q=58 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=59 (socket 1) -> TX P=0/Q=59 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=60 (socket 1) -> TX P=0/Q=60 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=61 (socket 1) -> TX P=0/Q=61 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=62 (socket 1) -> TX P=0/Q=62 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=63 (socket 1) -> TX P=0/Q=63 (socket 1) peer=02:00:00:00:00:00
rxonly packet forwarding packets/burst=32
nb forwarding cores=1 - nb forwarding ports=1
port 0: RX queue number: 64 Tx queue number: 64
Rx offloads=0x0 Tx offloads=0x10000
RX queue: 0
RX desc=384 - RX free threshold=32
RX threshold registers: pthresh=0 hthresh=0 wthresh=0
RX Offloads=0x0
TX queue: 0
TX desc=384 - TX free threshold=32
TX threshold registers: pthresh=32 hthresh=0 wthresh=0
TX offloads=0x10000 - TX RS bit threshold=32
20/10/2020 14:08:22 dut.10.240.183.62: quit
20/10/2020 14:08:23 dut.10.240.183.62:
Telling cores to stop...
Waiting for lcores to finish...
---------------------- Forward statistics for port 0 ----------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0
----------------------------------------------------------------------------
+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Done.
Stopping port 0...
Stopping ports...
Done
Shutting down port 0...
Closing ports...
Port 0 is closed
Done
Bye...
20/10/2020 14:08:23 dut.10.240.183.62: x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 32,33,34,35 -n 4 -w 0000:af:00.0 --file-prefix=dpdk_9776_20201020140752 -- -i --rxq=64 --txq=64
20/10/2020 14:08:24 dut.10.240.183.62: EAL: Detected 72 lcore(s)
EAL: Detected 2 NUMA nodes
EAL: Multi-process socket /var/run/dpdk/dpdk_9776_20201020140752/mp_socket
EAL: Selected IOVA mode 'VA'
EAL: 1024 hugepages of size 2097152 reserved, but no mounted hugetlbfs found for that size
EAL: Probing VFIO support...
EAL: VFIO support initialized
EAL: using IOMMU type 1 (Type 1)
EAL: Probe PCI driver: net_ice (8086:1592) device: 0000:af:00.0 (socket 1)
ice_load_pkg_type(): Active package is: 1.3.21.0, ICE COMMS Package
Interactive-mode selected
testpmd: create a new mbuf pool <mb_pool_1>: n=171456, size=2176, socket=1
testpmd: preferred mempool ops selected: ring_mp_mc
Warning! port-topology=paired and odd forward ports number, the last port will pair with itself.
Configuring Port 0 (socket 1)
Port 0: 68:A6:B7:0B:6F:38
Checking link statuses...
Done
20/10/2020 14:08:34 dut.10.240.183.62: set fwd rxonly
20/10/2020 14:08:34 dut.10.240.183.62:
Set rxonly packet forwarding mode
20/10/2020 14:08:34 dut.10.240.183.62: set verbose 1
20/10/2020 14:08:34 dut.10.240.183.62:
Change verbose level from 0 to 1
20/10/2020 14:08:34 dut.10.240.183.62: show port info all
20/10/2020 14:08:35 dut.10.240.183.62:
********************* Infos for port 0 *********************
MAC address: 68:A6:B7:0B:6F:38
Device name: 0000:af:00.0
Driver name: net_ice
Firmware-version: 2.20 0x800048d3 1.2832.0
Devargs:
Connect to socket: 1
memory allocation on the socket: 1
Link status: up
Link speed: 10 Gbps
Link duplex: full-duplex
MTU: 1500
Promiscuous mode: enabled
Allmulticast mode: disabled
Maximum number of MAC addresses: 64
Maximum number of MAC addresses of hash filtering: 0
VLAN offload:
strip off, filter off, extend off, qinq strip off
Hash key size in bytes: 52
Redirection table size: 512
Supported RSS offload flow types:
ipv4
ipv4-frag
ipv4-tcp
ipv4-udp
ipv4-sctp
ipv4-other
ipv6
ipv6-frag
ipv6-tcp
ipv6-udp
ipv6-sctp
ipv6-other
l2_payload
Minimum size of RX buffer: 1024
Maximum configurable length of RX packet: 9728
Maximum configurable size of LRO aggregated packet: 0
Current number of RX queues: 64
Max possible RX queues: 64
Max possible number of RXDs per queue: 4096
Min possible number of RXDs per queue: 64
RXDs number alignment: 32
Current number of TX queues: 64
Max possible TX queues: 64
Max possible number of TXDs per queue: 4096
Min possible number of TXDs per queue: 64
TXDs number alignment: 32
Max segment number per packet: 0
Max segment number per MTU/TSO: 0
20/10/2020 14:08:35 dut.10.240.183.62: start
20/10/2020 14:08:35 dut.10.240.183.62:
rxonly packet forwarding - ports=1 - cores=1 - streams=64 - NUMA support enabled, MP allocation mode: native
Logical Core 33 (socket 1) forwards packets on 64 streams:
RX P=0/Q=0 (socket 1) -> TX P=0/Q=0 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=1 (socket 1) -> TX P=0/Q=1 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=2 (socket 1) -> TX P=0/Q=2 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=3 (socket 1) -> TX P=0/Q=3 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=4 (socket 1) -> TX P=0/Q=4 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=5 (socket 1) -> TX P=0/Q=5 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=6 (socket 1) -> TX P=0/Q=6 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=7 (socket 1) -> TX P=0/Q=7 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=8 (socket 1) -> TX P=0/Q=8 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=9 (socket 1) -> TX P=0/Q=9 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=10 (socket 1) -> TX P=0/Q=10 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=11 (socket 1) -> TX P=0/Q=11 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=12 (socket 1) -> TX P=0/Q=12 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=13 (socket 1) -> TX P=0/Q=13 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=14 (socket 1) -> TX P=0/Q=14 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=15 (socket 1) -> TX P=0/Q=15 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=16 (socket 1) -> TX P=0/Q=16 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=17 (socket 1) -> TX P=0/Q=17 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=18 (socket 1) -> TX P=0/Q=18 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=19 (socket 1) -> TX P=0/Q=19 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=20 (socket 1) -> TX P=0/Q=20 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=21 (socket 1) -> TX P=0/Q=21 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=22 (socket 1) -> TX P=0/Q=22 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=23 (socket 1) -> TX P=0/Q=23 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=24 (socket 1) -> TX P=0/Q=24 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=25 (socket 1) -> TX P=0/Q=25 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=26 (socket 1) -> TX P=0/Q=26 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=27 (socket 1) -> TX P=0/Q=27 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=28 (socket 1) -> TX P=0/Q=28 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=29 (socket 1) -> TX P=0/Q=29 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=30 (socket 1) -> TX P=0/Q=30 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=31 (socket 1) -> TX P=0/Q=31 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=32 (socket 1) -> TX P=0/Q=32 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=33 (socket 1) -> TX P=0/Q=33 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=34 (socket 1) -> TX P=0/Q=34 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=35 (socket 1) -> TX P=0/Q=35 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=36 (socket 1) -> TX P=0/Q=36 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=37 (socket 1) -> TX P=0/Q=37 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=38 (socket 1) -> TX P=0/Q=38 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=39 (socket 1) -> TX P=0/Q=39 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=40 (socket 1) -> TX P=0/Q=40 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=41 (socket 1) -> TX P=0/Q=41 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=42 (socket 1) -> TX P=0/Q=42 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=43 (socket 1) -> TX P=0/Q=43 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=44 (socket 1) -> TX P=0/Q=44 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=45 (socket 1) -> TX P=0/Q=45 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=46 (socket 1) -> TX P=0/Q=46 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=47 (socket 1) -> TX P=0/Q=47 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=48 (socket 1) -> TX P=0/Q=48 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=49 (socket 1) -> TX P=0/Q=49 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=50 (socket 1) -> TX P=0/Q=50 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=51 (socket 1) -> TX P=0/Q=51 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=52 (socket 1) -> TX P=0/Q=52 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=53 (socket 1) -> TX P=0/Q=53 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=54 (socket 1) -> TX P=0/Q=54 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=55 (socket 1) -> TX P=0/Q=55 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=56 (socket 1) -> TX P=0/Q=56 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=57 (socket 1) -> TX P=0/Q=57 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=58 (socket 1) -> TX P=0/Q=58 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=59 (socket 1) -> TX P=0/Q=59 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=60 (socket 1) -> TX P=0/Q=60 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=61 (socket 1) -> TX P=0/Q=61 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=62 (socket 1) -> TX P=0/Q=62 (socket 1) peer=02:00:00:00:00:00
RX P=0/Q=63 (socket 1) -> TX P=0/Q=63 (socket 1) peer=02:00:00:00:00:00
rxonly packet forwarding packets/burst=32
nb forwarding cores=1 - nb forwarding ports=1
port 0: RX queue number: 64 Tx queue number: 64
Rx offloads=0x0 Tx offloads=0x10000
RX queue: 0
RX desc=1024 - RX free threshold=32
RX threshold registers: pthresh=0 hthresh=0 wthresh=0
RX Offloads=0x0
TX queue: 0
TX desc=1024 - TX free threshold=32
TX threshold registers: pthresh=32 hthresh=0 wthresh=0
TX offloads=0x10000 - TX RS bit threshold=32
20/10/2020 14:08:35 dut.10.240.183.62: 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
20/10/2020 14:08:35 dut.10.240.183.62:
Flow rule #0 created
20/10/2020 14:08:35 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:36 dut.10.240.183.62: port 0/queue 32: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x7ab2cca0 - RSS queue=0x20 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x20
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 32: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x7ab2cca0 - RSS queue=0x20 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x20
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 51: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x6efec533 - RSS queue=0x33 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x33
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:36 TestCVLAdvancedRSSGTPU: hash_infos: [('0x7ab2cca0', '0x20'), ('0x7ab2cca0', '0x20'), ('0x6efec533', '0x33')]
20/10/2020 14:08:36 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:37 dut.10.240.183.62: port 0/queue 21: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0xbf854b95 - RSS queue=0x15 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x15
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 6: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0xabc94206 - RSS queue=0x6 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x6
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 47: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x1fef8a6f - RSS queue=0x2f - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x2f
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:37 TestCVLAdvancedRSSGTPU: hash_infos: [('0xbf854b95', '0x15'), ('0xabc94206', '0x6'), ('0x1fef8a6f', '0x2f')]
20/10/2020 14:08:37 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:38 dut.10.240.183.62: port 0/queue 21: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0xbf854b95 - RSS queue=0x15 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x15
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 47: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x1fef8a6f - RSS queue=0x2f - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x2f
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 6: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0xabc94206 - RSS queue=0x6 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x6
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:38 TestCVLAdvancedRSSGTPU: hash_infos: [('0xbf854b95', '0x15'), ('0x1fef8a6f', '0x2f'), ('0xabc94206', '0x6')]
20/10/2020 14:08:38 dut.10.240.183.62: flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end
20/10/2020 14:08:38 dut.10.240.183.62:
Flow rule #1 created
20/10/2020 14:08:38 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:39 dut.10.240.183.62: port 0/queue 32: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x7ab2cca0 - RSS queue=0x20 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x20
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 32: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x7ab2cca0 - RSS queue=0x20 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x20
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 51: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x6efec533 - RSS queue=0x33 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x33
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:39 TestCVLAdvancedRSSGTPU: hash_infos: [('0x7ab2cca0', '0x20'), ('0x7ab2cca0', '0x20'), ('0x6efec533', '0x33')]
20/10/2020 14:08:39 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:40 dut.10.240.183.62: port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 3: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x4f39f43 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x3
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:40 TestCVLAdvancedRSSGTPU: hash_infos: [('0x10bf96d0', '0x10'), ('0x4f39f43', '0x3'), ('0x10bf96d0', '0x10')]
20/10/2020 14:08:40 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:41 dut.10.240.183.62: port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 3: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x4f39f43 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x3
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:41 TestCVLAdvancedRSSGTPU: hash_infos: [('0x10bf96d0', '0x10'), ('0x4f39f43', '0x3'), ('0x10bf96d0', '0x10')]
20/10/2020 14:08:41 dut.10.240.183.62: flow destroy 0 rule 0
20/10/2020 14:08:43 dut.10.240.183.62:
Flow rule #0 destroyed
testpmd>
20/10/2020 14:08:43 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:44 dut.10.240.183.62: port 0/queue 0: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:44 TestCVLAdvancedRSSGTPU: hash_infos: []
20/10/2020 14:08:44 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:45 dut.10.240.183.62: port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 3: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x4f39f43 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x3
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:45 TestCVLAdvancedRSSGTPU: hash_infos: [('0x10bf96d0', '0x10'), ('0x4f39f43', '0x3'), ('0x10bf96d0', '0x10')]
20/10/2020 14:08:45 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:46 dut.10.240.183.62: port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 3: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x4f39f43 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x3
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:46 TestCVLAdvancedRSSGTPU: hash_infos: [('0x10bf96d0', '0x10'), ('0x4f39f43', '0x3'), ('0x10bf96d0', '0x10')]
20/10/2020 14:08:46 dut.10.240.183.62: 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
20/10/2020 14:08:46 dut.10.240.183.62:
Flow rule #2 created
20/10/2020 14:08:46 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:47 dut.10.240.183.62: port 0/queue 32: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x7ab2cca0 - RSS queue=0x20 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x20
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 32: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x7ab2cca0 - RSS queue=0x20 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x20
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 51: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x6efec533 - RSS queue=0x33 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x33
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:47 TestCVLAdvancedRSSGTPU: hash_infos: [('0x7ab2cca0', '0x20'), ('0x7ab2cca0', '0x20'), ('0x6efec533', '0x33')]
20/10/2020 14:08:47 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:48 dut.10.240.183.62: port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 3: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x4f39f43 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x3
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:48 TestCVLAdvancedRSSGTPU: hash_infos: [('0x10bf96d0', '0x10'), ('0x4f39f43', '0x3'), ('0x10bf96d0', '0x10')]
20/10/2020 14:08:48 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:49 dut.10.240.183.62: port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 3: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x4f39f43 - RSS queue=0x3 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x3
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 16: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - RSS hash=0x10bf96d0 - RSS queue=0x10 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x10
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:49 TestCVLAdvancedRSSGTPU: hash_infos: [('0x10bf96d0', '0x10'), ('0x4f39f43', '0x3'), ('0x10bf96d0', '0x10')]
20/10/2020 14:08:49 dut.10.240.183.62: flow destroy 0 rule 1
20/10/2020 14:08:50 dut.10.240.183.62:
Flow rule #1 destroyed
testpmd>
20/10/2020 14:08:50 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:52 dut.10.240.183.62: port 0/queue 32: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x7ab2cca0 - RSS queue=0x20 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x20
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 32: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x7ab2cca0 - RSS queue=0x20 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x20
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 51: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=550 - nb_segs=1 - RSS hash=0x6efec533 - RSS queue=0x33 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x33
ol_flags: PKT_RX_RSS_HASH PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:52 TestCVLAdvancedRSSGTPU: hash_infos: [('0x7ab2cca0', '0x20'), ('0x7ab2cca0', '0x20'), ('0x6efec533', '0x33')]
20/10/2020 14:08:52 TestCVLAdvancedRSSGTPU: ----------send packet-------------
20/10/2020 14:08:53 dut.10.240.183.62: port 0/queue 0: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
port 0/queue 0: received 1 packets
src=00:00:00:00:00:00 - dst=68:05:CA:BB:26:E0 - type=0x0800 - length=562 - nb_segs=1 - hw ptype: L2_ETHER L3_IPV4_EXT_UNKNOWN TUNNEL_GTPU INNER_L3_IPV4_EXT_UNKNOWN INNER_L4_NONFRAG - sw ptype: L2_ETHER L3_IPV4 L4_UDP - l2_len=14 - l3_len=20 - l4_len=8 - VXLAN packet: packet type =32913, Destination UDP port =2152, VNI = 4660 - Receive queue=0x0
ol_flags: PKT_RX_L4_CKSUM_GOOD PKT_RX_IP_CKSUM_GOOD PKT_RX_OUTER_L4_CKSUM_UNKNOWN
20/10/2020 14:08:53 TestCVLAdvancedRSSGTPU: hash_infos: []
20/10/2020 14:08:53 TestCVLAdvancedRSSGTPU: Test Case test_ipv4_gtpu_ipv4_ipv4_gtpu_eh_ipv4 Result PASSED:
20/10/2020 14:08:53 dut.10.240.183.62: flow flush 0
20/10/2020 14:08:54 dut.10.240.183.62:
testpmd>
20/10/2020 14:08:54 dut.10.240.183.62: clear port stats all
20/10/2020 14:08:55 dut.10.240.183.62:
NIC statistics for port 0 cleared
testpmd>
20/10/2020 14:08:55 dut.10.240.183.62: stop
20/10/2020 14:08:55 dut.10.240.183.62:
Telling cores to ...
Waiting for lcores to finish...
------- Forward Stats for RX Port= 0/Queue= 0 -> TX Port= 0/Queue= 0 -------
RX-packets: 9 TX-packets: 0 TX-dropped: 0
------- Forward Stats for RX Port= 0/Queue= 3 -> TX Port= 0/Queue= 3 -------
RX-packets: 6 TX-packets: 0 TX-dropped: 0
------- Forward Stats for RX Port= 0/Queue= 6 -> TX Port= 0/Queue= 6 -------
RX-packets: 2 TX-packets: 0 TX-dropped: 0
------- Forward Stats for RX Port= 0/Queue=16 -> TX Port= 0/Queue=16 -------
RX-packets: 12 TX-packets: 0 TX-dropped: 0
------- Forward Stats for RX Port= 0/Queue=21 -> TX Port= 0/Queue=21 -------
RX-packets: 2 TX-packets: 0 TX-dropped: 0
------- Forward Stats for RX Port= 0/Queue=32 -> TX Port= 0/Queue=32 -------
RX-packets: 8 TX-packets: 0 TX-dropped: 0
------- Forward Stats for RX Port= 0/Queue=47 -> TX Port= 0/Queue=47 -------
RX-packets: 2 TX-packets: 0 TX-dropped: 0
------- Forward Stats for RX Port= 0/Queue=51 -> TX Port= 0/Queue=51 -------
RX-packets: 4 TX-packets: 0 TX-dropped: 0
---------------------- Forward statistics for port 0 ----------------------
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0
----------------------------------------------------------------------------
+++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++
RX-packets: 0 RX-dropped: 0 RX-total: 0
TX-packets: 0 TX-dropped: 0 TX-total: 0
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Done.
20/10/2020 14:08:55 dts:
TEST SUITE ENDED: TestCVLAdvancedRSSGTPU
^ permalink raw reply [flat|nested] 2+ messages in thread
* [dts] [PATCH V1] tests: add cvl_advanced_rss_gtpu
@ 2020-10-20 14:01 Haiyang Zhao
2020-10-20 6:15 ` Zhao, HaiyangX
0 siblings, 1 reply; 2+ messages in thread
From: Haiyang Zhao @ 2020-10-20 14:01 UTC (permalink / raw)
To: dts, yuan.peng; +Cc: Haiyang Zhao
*add cvl rss gtpu cases.
Signed-off-by: Haiyang Zhao <haiyangx.zhao@intel.com>
---
| 5305 ++++++++++++++++++++++
1 file changed, 5305 insertions(+)
create mode 100755 tests/TestSuite_cvl_advanced_rss_gtpu.py
--git a/tests/TestSuite_cvl_advanced_rss_gtpu.py b/tests/TestSuite_cvl_advanced_rss_gtpu.py
new file mode 100755
index 0000000..e505dc2
--- /dev/null
+++ b/tests/TestSuite_cvl_advanced_rss_gtpu.py
@@ -0,0 +1,5305 @@
+# BSD LICENSE
+#
+# Copyright(c) 2010-2020 Intel Corporation. All rights reserved.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# * Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+# * Neither the name of Intel Corporation nor the names of its
+# contributors may be used to endorse or promote products derived
+# from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+import re
+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 = {
+ 'ipv4-nonfrag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'ipv4-frag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
+ 'ipv4-icmp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'ipv4-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
+}
+
+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_gtpu_ipv4_unmatched_pkt = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+]
+
+mac_ipv4_gtpu_ipv4_l3dst_only = {
+ 'sub_casename': 'mac_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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'],
+ mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
+ mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
+ mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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['ipv4-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-frag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3dst_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_l3src_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'],
+ mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
+ mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
+ mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv4_gtpu = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv4_gtpu',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-frag'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-frag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_basic['ipv4-udp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_ipv4_basic['ipv4-nonfrag'],
+ mac_ipv4_gtpu_ipv4_basic['ipv4-frag'],
+ mac_ipv4_gtpu_ipv4_basic['ipv4-icmp'],
+ mac_ipv4_gtpu_ipv4_basic['ipv4-udp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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',
+ 'pre-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': {'save_hash': 'nonfrag'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
+ 'action': {'save_hash': 'frag'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'action': {'save_hash': 'icmp'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ { # unmatch MAC_IPV4_GTPU_IPV6 nonfrag
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ { # unmatch MAC_IPV4_GTPU_EH_IPV4
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': 'save_hash',
+ },
+ { # unmatch MAC_IPV4_GTPU_EH_IPV4
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': {'check_no_hash_or_different': 'nonfrag'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': {'check_no_hash_or_different': 'nonfrag'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
+ 'action': {'check_no_hash_or_different': 'frag'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
+ 'action': {'check_no_hash_or_different': 'frag'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'action': {'check_no_hash_or_different': 'icmp'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
+ 'action': {'check_no_hash_or_different': 'icmp'},
+ },
+ ],
+}
+
+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',
+ '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',
+ 'pre-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': {'save_hash': 'basic_with_rule'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/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)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': {'check_hash_different': 'basic_with_rule'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': {'check_hash_different': 'basic_with_rule'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': {'check_hash_different': 'basic_with_rule'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': {'check_hash_different': 'basic_with_rule'},
+ },
+ ],
+}
+
+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_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_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_gtpu_eh_dl_ipv4_symmetric = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_symmetric',
+ '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',
+ 'pre-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': 'save_or_no_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': 'check_no_hash_or_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
+ 'action': 'save_or_no_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1", frag=6)/("X"*480)',
+ 'action': 'check_no_hash_or_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'action': 'save_or_no_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
+ 'action': 'check_no_hash_or_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
+ 'action': 'save_or_no_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP()/("X"*480)',
+ 'action': 'check_no_hash_or_different',
+ },
+ ],
+}
+mac_ipv4_gtpu_eh_ul_ipv4_symmetric = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_symmetric)
+ .replace('pdu_type=1', 'pdu_type=2')
+ .replace('pdu_type=0', 'pdu_type=1')
+ .replace('pdu_type=2', 'pdu_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',
+ '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',
+ 'pre-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=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': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=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="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=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',
+ },
+ ],
+}
+mac_ipv4_gtpu_eh_ul_ipv4_udp_symmetric = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_udp_symmetric)
+ .replace('pdu_type=1', 'pdu_type=2')
+ .replace('pdu_type=0', 'pdu_type=1')
+ .replace('pdu_type=2', 'pdu_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 = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)'
+mac_ipv4_gtpu_ipv4_udp_unmatch = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)'
+]
+mac_ipv4_gtpu_ipv4_udp_l3dst = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3dst',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ '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',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33').replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv4_udp_l3src_l4dst = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3src_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-dst-only end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=32').replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv4_udp_l3dst_l4src = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3dst_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 l4-src-only end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33').replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv4_udp_l3dst_l4dst = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_l3dst_l4dst',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=32').replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+mac_ipv4_gtpu_ipv4_udp_l4dst = {
+ 'sub_casename': 'mac_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 l4-dst-only end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=32')
+ .replace('192.168.0', '192.168.1'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=32')
+ .replace('192.168.0', '192.168.1'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv4_udp_all = {
+ 'sub_casename': 'mac_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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv4_udp_gtpu = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_gtpu',
+ 'port_id': 0,
+ 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types gtpu end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('192.168.0', '192.168.1')
+ .replace('sport=22', 'sport=32')
+ .replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+
+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_gtpu]
+
+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_gtpu_ipv6_basic = {
+ 'ipv6-nonfrag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'ipv6-frag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)',
+ 'ipv6-icmp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)',
+ 'ipv6-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP()/("X"*480)',
+}
+
+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_gtpu_ipv6_unmatched_pkt = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)',
+]
+mac_ipv4_gtpu_ipv6_l3dst_only = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv6_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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-nonfrag'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-frag'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-icmp'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-udp'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'],
+ mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
+ mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
+ mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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['ipv6-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3dst_changed_pkt['ipv6-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_l3src_changed_pkt['ipv6-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'],
+ mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
+ mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
+ mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv6_gtpu = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv6_gtpu',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-frag'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_basic['ipv6-udp'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_ipv6_basic['ipv6-nonfrag'],
+ mac_ipv4_gtpu_ipv6_basic['ipv6-frag'],
+ mac_ipv4_gtpu_ipv6_basic['ipv6-icmp'],
+ mac_ipv4_gtpu_ipv6_basic['ipv6-udp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv6_toeplitz = [mac_ipv4_gtpu_ipv6_l3dst_only, mac_ipv4_gtpu_ipv6_l3src_only,
+ mac_ipv4_gtpu_ipv6_all, mac_ipv4_gtpu_ipv6_gtpu]
+
+mac_ipv4_gtpu_ipv6_udp_basic = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)'
+mac_ipv4_gtpu_ipv6_udp_unmatch = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(src="192.168.0.1", dst="192.168.0.2")/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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB', '1212'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB', '1212'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv6_udp_l3src_l4dst = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l3src_l4dst',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB', '1212'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=32').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv6_udp_l3dst_l4src = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l3dst_l4src',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33').replace('ABAB', '1212'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=32').replace('ABAB', '1212'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=32')
+ .replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+mac_ipv4_gtpu_ipv6_udp_l4src = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_l4src',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=32')
+ .replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB', '1212'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_ipv6_udp_gtpu = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv6_udp_gtpu',
+ 'port_id': 0,
+ 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv6 / udp / end actions rss types gtpu end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('ABAB', '1212').replace('CDCD', '3434')
+ .replace('sport=22', 'sport=32')
+ .replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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_udp_gtpu]
+
+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 = {
+ 'ipv4-nonfrag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'ipv4-frag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
+ 'ipv4-icmp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'ipv4-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("X"*480)',
+ 'ipv4-tcp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP()/("X"*480)',
+
+}
+
+mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt = eval(str(mac_ipv4_gtpu_eh_dl_ipv4_basic).replace('192.168.0.2', '192.168.1.2'))
+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_ipv4_unmatched_pkt = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=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_l3dst_only = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_l3dst',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-tcp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-tcp'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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['ipv4-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3dst_changed_pkt['ipv4-tcp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_l3src_changed_pkt['ipv4-tcp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_eh_dl_ipv4_gtpu = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_gtpu',
+ 'port_id': 0,
+ 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss types gtpu end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_ipv4_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-nonfrag'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-frag'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-icmp'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-udp'],
+ mac_ipv4_gtpu_eh_dl_ipv4_basic['ipv4-tcp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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_dl_ipv4_gtpu]
+
+mac_ipv4_gtpu_eh_ul_ipv4 = [eval(str(element).replace('pdu_type=1', 'pdu_type=2')
+ .replace('pdu_type=0', 'pdu_type=1').replace('pdu_type=2', 'pdu_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 = {
+ 'ipv4-nonfrag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'ipv4-nonfrag_ul': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'ipv4-frag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2", frag=6)/("X"*480)',
+ 'ipv4-icmp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'ipv4-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP()/("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_unmatched_pkt = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)',
+]
+
+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['ipv4-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-nonfrag'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-nonfrag_ul'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-nonfrag_ul'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-frag'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-icmp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-udp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'],
+ ],
+ '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',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-nonfrag_ul'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-nonfrag_ul'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3dst_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_l3src_changed_pkt['ipv4-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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['ipv4-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'].replace('192.168.0.', '192.168.1.'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-nonfrag_ul'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-frag'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-icmp'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_basic['ipv4-udp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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_gtpu]
+
+mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic = {
+ 'dl': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'ul': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+}
+
+mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+]
+
+mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst_only = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_l3dst',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.2', '192.168.1.2')
+ .replace('sport=22, dport=23', 'sport=32, dport=33')
+ .replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+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['dl'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'].replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.1', '192.168.1.1')
+ .replace('dport=23', 'dport=33')
+ .replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'].replace('192.168.0.1', '192.168.1.1')
+ .replace('dport=23', 'dport=33')
+ .replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+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['dl'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'].replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0', '192.168.1')
+ .replace('dport=23', 'dport=33')
+ .replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'].replace('192.168.0', '192.168.1')
+ .replace('dport=23', 'dport=33')
+ .replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
+ ],
+ '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',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_gtpu = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_gtpu',
+ 'port_id': 0,
+ 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / udp / end actions rss types gtpu end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl']
+ .replace('192.168.0.', '192.168.1.')
+ .replace('sport=22, dport=23', 'sport=32, dport=33'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul']
+ .replace('192.168.0.', '192.168.1.')
+ .replace('sport=22, dport=23', 'sport=32, dport=33'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['dl'],
+ mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_basic['ul'],
+ ],
+ '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_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_gtpu,
+]
+
+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('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('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 = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)'
+mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+]
+mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst',
+ 'port_id': 0,
+ 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33').replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32').replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_l4src = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_l3dst_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-dst-only l4-src-only end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33').replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32')
+ .replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32')
+ .replace('192.168.0', '192.168.1'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+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,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=32')
+ .replace('192.168.0', '192.168.1'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_eh_dl_ipv4_udp_all = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.1', '192.168.1.1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0.2', '192.168.1.2'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_eh_dl_ipv4_udp_gtpu = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv4_udp_gtpu',
+ '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 gtpu end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('192.168.0', '192.168.1')
+ .replace('sport=22', 'sport=32')
+ .replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv4_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+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_gtpu]
+
+mac_ipv4_gtpu_eh_ul_ipv4_udp_toeplitz = [eval(str(element).replace('pdu_type=1', 'pdu_type=2')
+ .replace('pdu_type=0', 'pdu_type=1').replace('pdu_type=2', 'pdu_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 = {
+ 'ipv6-nonfrag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'ipv6-frag': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)',
+ 'ipv6-icmp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/ICMP()/("X"*480)',
+ 'ipv6-udp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP()/("X"*480)',
+ 'ipv6-tcp': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP()/("X"*480)',
+}
+
+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_unmatched_pkt = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)',
+]
+mac_ipv4_gtpu_eh_dl_ipv6_l3dst_only = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_l3dst',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-nonfrag'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-frag'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-icmp'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-udp'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-tcp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-tcp'],
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
+ ],
+ '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',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-nonfrag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-frag'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-icmp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-udp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3dst_changed_pkt['ipv6-tcp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_l3src_changed_pkt['ipv6-tcp'],
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'].replace('0x123456', '0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
+ ],
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_eh_dl_ipv6_gtpu = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_gtpu',
+ 'port_id': 0,
+ 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / end actions rss types gtpu end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'].replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'].replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_unmatched_pkt,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': [
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-nonfrag'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-frag'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-icmp'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-udp'],
+ mac_ipv4_gtpu_eh_dl_ipv6_basic['ipv6-tcp'],
+ ],
+ '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_dl_ipv6_gtpu]
+
+mac_ipv4_gtpu_eh_ul_ipv6_toeplitz = [eval(str(element).replace('pdu_type=1', 'pdu_type=2')
+ .replace('pdu_type=0', 'pdu_type=1').replace('pdu_type=2', 'pdu_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_gtpu_eh_dl_ipv6_udp_basic = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)'
+mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=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)',
+]
+mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst',
+ 'port_id': 0,
+ 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB', '1212'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ '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',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB', '1212'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_l4dst = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3src_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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB', '1212'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4src = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33').replace('ABAB', '1212'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_l4dst = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_l3dst_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-dst-only l4-dst-only end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32').replace('ABAB', '1212'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+mac_ipv4_gtpu_eh_dl_ipv6_udp_l4dst = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_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 l4-dst-only end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32')
+ .replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+mac_ipv4_gtpu_eh_dl_ipv6_udp_l4src = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_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 l4-src-only end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=32')
+ .replace('ABAB', '1212').replace('CDCD', '3434'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_eh_dl_ipv6_udp_all = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_all',
+ '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',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('sport=22', 'sport=32'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('CDCD', '3434'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB', '1212'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'check_no_hash',
+ },
+ ]
+}
+
+mac_ipv4_gtpu_eh_dl_ipv6_udp_gtpu = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_dl_ipv6_udp_gtpu',
+ '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 gtpu end key_len 0 queues end / end',
+ 'test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('ABAB', '1212').replace('CDCD', '3434')
+ .replace('sport=22', 'sport=32')
+ .replace('dport=23', 'dport=33'),
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic.replace('teid=0x123456', 'teid=0x12345'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_unmatch,
+ 'action': 'check_no_hash',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': mac_ipv4_gtpu_eh_dl_ipv6_udp_basic,
+ '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_dl_ipv6_udp_gtpu]
+mac_ipv4_gtpu_eh_ul_ipv6_udp_toeplitz = [eval(str(element).replace('pdu_type=1', 'pdu_type=2')
+ .replace('pdu_type=0', 'pdu_type=1').replace('pdu_type=2', 'pdu_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]
+
+default_pattern_ipv4_gtpu_eh_dl_ipv4_src = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1", src="192.168.0.2")/("X"*480)'
+default_pattern_ipv4_gtpu_eh_dl_ipv4_dst = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2", src="192.168.0.1")/("X"*480)'
+default_pattern_ipv4_gtpu_eh_dl_ipv6_src = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)'
+default_pattern_ipv4_gtpu_eh_dl_ipv6_dst = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)'
+default_pattern_support_ipv4 = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_gtpu',
+ 'port_id': 0,
+ 'rule': '',
+ 'test': [
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst,
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src.replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src.replace('/("X"', '/UDP(sport=22,dport=23)/("X"'),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('/("X"', '/UDP(sport=22,dport=23)/("X"'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src
+ .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
+ .replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
+ .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
+ .replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src.replace('/("X"', '/TCP(sport=22,dport=23)/("X"'),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('/("X"', '/TCP(sport=22,dport=23)/("X"'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src
+ .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
+ .replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
+ .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
+ .replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src
+ .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
+ .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_src
+ .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
+ .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src,
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst,
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src.replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src.replace('/("X"', '/UDP(sport=22,dport=23)/("X"'),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('/("X"', '/UDP(sport=22,dport=23)/("X"'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src
+ .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
+ .replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
+ .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
+ .replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src.replace('/("X"', '/TCP(sport=22,dport=23)/("X"'),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst.replace('/("X"', '/TCP(sport=22,dport=23)/("X"'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src
+ .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
+ .replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
+ .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
+ .replace('pdu_type=0', 'pdu_type=1'),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src
+ .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
+ .replace('/("X"', '/UDP(sport=22,dport=23)/("X"')
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv6_src
+ .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': default_pattern_ipv4_gtpu_eh_dl_ipv4_dst
+ .replace('/("X"', '/TCP(sport=22,dport=23)/("X"')
+ .replace('/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)', ''),
+ 'action': 'check_hash_different',
+ },
+ ],
+}
+
+inner_l4_mac_ipv4_gtpu_ipv4_udp_tcp = {
+ 'sub_casename': 'mac_ipv4_gtpu_ipv4_udp_tcp',
+ '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',
+ ],
+ 'test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:ca:a3:28:94")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ ]
+}
+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)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)')
+ .replace('mac_ipv4', 'mac_ipv6'))
+inner_l4_mac_ipv4_gtpu_eh_ipv6_udp_tcp = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_ipv6_udp_tcp',
+ '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',
+ ],
+ 'test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=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',
+ },
+ ]
+}
+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('pdu_type=0', 'pdu_type=1')
+ .replace('IP()', 'IPv6()')
+ .replace('mac_ipv4', 'mac_ipv6'))
+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',
+ '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',
+ 'pre-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2",frag=6)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1",frag=6)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': {'save_hash': 'ipv4-nonfrag'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2",frag=6)/("X"*480)',
+ 'action': {'save_hash': 'ipv4-frag'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1",frag=6)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'action': {'save_hash': 'ipv4-icmp'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/ICMP()/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'action': {'check_no_hash_or_different': 'ipv4-nonfrag'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2",frag=6)/("X"*480)',
+ 'action': {'check_no_hash_or_different': 'ipv4-frag'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/ICMP()/("X"*480)',
+ 'action': {'check_no_hash_or_different': 'ipv4-icmp'},
+ },
+ ],
+}
+
+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_gtpu_eh_ipv4_udp_without_ul_dl_symmetric = {
+ 'sub_casename': 'mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_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',
+ 'pre-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': {'save_hash', 'udp-dl'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': {'save_hash', 'udp-ul'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=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': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': {'check_hash_different', 'udp-dl'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': {'check_hash_different', 'udp-ul'},
+ },
+ ],
+}
+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',
+ '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',
+ 'pre-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': {'save_hash', 'udp-dl'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': {'save_hash', 'udp-ul'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_same',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/UDP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(dst="ABAB:910B:6666:3457:8295:3333:1800:2929",src="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': 'save_hash',
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=23, dport=22)/("X"*480)',
+ 'action': 'check_hash_different',
+ },
+ ],
+ 'post-test': [
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': {'check_hash_different', 'udp-dl'},
+ },
+ {
+ 'send_packet': 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'action': {'check_hash_different', 'udp-ul'},
+ },
+ ],
+}
+
+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"')
+ )
+
+
+class TestCVLAdvancedRSSGTPU(TestCase):
+
+ def set_up_all(self):
+ """
+ Run at the start of each test suite.
+ prerequisites.
+ """
+ # Based on h/w type, choose how many ports to use
+ self.dut_ports = self.dut.get_ports(self.nic)
+ self.verify(len(self.dut_ports) >= 2, "Insufficient ports for testing")
+ # Verify that enough threads are available
+ cores = self.dut.get_core_list("1S/4C/1T")
+ self.verify(cores is not None, "Insufficient cores for speed testing")
+ self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
+ self.tester_port0 = self.tester.get_local_port(self.dut_ports[0])
+ self.tester_port1 = self.tester.get_local_port(self.dut_ports[1])
+ self.tester_iface0 = self.tester.get_interface(self.tester_port0)
+ self.tester_iface1 = self.tester.get_interface(self.tester_port1)
+ self.pci0 = self.dut.ports_info[self.dut_ports[0]]['pci']
+ self.pci1 = self.dut.ports_info[self.dut_ports[1]]['pci']
+ self.pass_flag = 'passed'
+ self.fail_flag = 'failed'
+
+ self.pkt = Packet()
+ self.pmd_output = PmdOutput(self.dut)
+ self.launch_testpmd()
+ self.symmetric = False
+ self.rxq = 64
+ 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))
+ self.logger.info('rssprocess.test_case: {}'.format(self.rssprocess.test_case))
+
+ def set_up(self):
+ """
+ Run before each test case.
+ """
+
+ # check pkg version match
+
+ if self.symmetric:
+ self.pmd_output.execute_cmd("port config all rss all")
+ self.pmd_output.execute_cmd("start")
+
+ def launch_testpmd(self, symmetric=False):
+ if symmetric:
+ param = "--rxq=64 --txq=64"
+ else:
+ param = "--rxq=64 --txq=64 --disable-rss --rxd=384 --txd=384"
+ self.pmd_output.start_testpmd(cores="1S/4C/1T", param=param,
+ eal_param=f"-w {self.pci0}", socket=self.ports_socket)
+ self.symmetric = symmetric
+ if symmetric is True:
+ '''
+ symmetric may be False/True/2(any other not negative value)
+ False: disable rss
+ True: enable rss and execute port config all rss
+ 2: enable rss and do not execute port config all rss
+ '''
+ # Need config rss in setup
+ 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")
+ 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_gtpu_ipv4(self):
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv4_toeplitz)
+
+ def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_ipv6(self):
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_ipv6_toeplitz)
+
+ def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_ipv4(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_ipv4_udp(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_udp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_ipv4_tcp(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_tcp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_ipv6(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_ipv6_udp(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_udp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_ipv6_tcp(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_tcp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_eh_ipv4(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv4_udp(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_udp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv4_tcp(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_tcp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_udp(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_udp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_tcp(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_tcp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_eh_ipv4_without_ul_dl(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv4_udp_without_ul_dl(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_udp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv4_tcp_without_ul_dl(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul_dl_ipv4_tcp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_without_ul_dl(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul_dl_ipv6_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_udp_without_ul_dl(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul_dl_ipv6_udp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_tcp_without_ul_dl(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_without_ul_dl_ipv6_tcp_toeplitz)
+ self.switch_testpmd(symmetric=False)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_ipv4_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_ipv4_udp_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_udp_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_ipv4_tcp_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv4_tcp_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_ipv6_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_ipv6_udp_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_udp_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_ipv6_tcp_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_ipv6_tcp_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv4_gtpu_eh_ipv4_symmetric(self):
+ self.switch_testpmd(symmetric=2)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv4_symmetric)
+
+ def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_eh_ipv6_symmetric(self):
+ self.switch_testpmd(symmetric=2)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_gtpu_eh_ipv6_symmetric)
+
+ def test_mac_ipv4_gtpu_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_gtpu_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_gtpu_eh_ipv4_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_symmetric)
+ self.switch_testpmd(symmetric=2)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv4_udp_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_tcp_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv4_tcp_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_tcp_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_symmetric)
+ self.switch_testpmd(symmetric=2)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_udp_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_udp_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_tcp_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_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_gtpu_eh_ipv4_without_ul_dl_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_without_ul_dl_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv4_udp_without_ul_dl_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_udp_without_ul_dl_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv4_tcp_without_ul_dl_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_without_ul_dl_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_without_ul_dl_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_udp_without_ul_dl_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_udp_without_ul_dl_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_mac_ipv6_gtpu_eh_ipv6_tcp_without_ul_dl_symmetric(self):
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(mac_ipv4_gtpu_eh_ipv6_tcp_without_ul_dl_symmetric)
+ self.switch_testpmd(symmetric=True)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=ipv6_template)
+
+ def test_inner_l4_protocal_hash(self):
+ self.switch_testpmd(2)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=inner_l4_protocal_hash)
+
+ def test_default_pattern_support(self):
+ self.switch_testpmd(symmetric=True)
+ ipv6_template = self.rssprocess.get_ipv6_template_by_ipv4(default_pattern_support_ipv4)
+ self.rssprocess.handle_rss_distribute_cases(cases_info=[default_pattern_support_ipv4] + ipv6_template)
+
+ def test_negative_cases(self):
+ negative_rules = [
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-tcp end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv6-udp end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types ipv4 end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / udp / end actions rss types udp end key_len 0 queues end / end']
+ self.rssprocess.create_rule(rule=negative_rules, check_stats=False, msg="Invalid input pattern: Invalid argument")
+
+ def test_symmetric_negative_cases(self):
+ rules = [
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss func symmetric_toeplitz types gtpu end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 l3-dst-only end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 0 / ipv4 / end actions rss func symmetric_toeplitz types ipv4-udp end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-udp end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv6-tcp end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types tcp end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp l3-src-only end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp l4-dst-only end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp l3-dst-only l4-src-only end key_len 0 queues end / end']
+ self.rssprocess.create_rule(rule=rules, check_stats=False)
+
+ def test_global_simple_xor(self):
+ self.switch_testpmd()
+ rule1 = 'flow create 0 ingress pattern end actions rss func simple_xor key_len 0 queues end / end'
+ rule_li1 = self.rssprocess.create_rule(rule=rule1)
+ pkts1 = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.2",src="192.168.0.1")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/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)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.2",src="192.168.0.1")/TCP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2020",dst="ABAB:910B:6666:3457:8295:3333:1800:2929")/TCP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:ca:a3:28:94")/IP(src="1.1.4.1",dst="2.2.2.3")/("X"*480)',
+ 'Ether(dst="68:05:ca:a3:28:94")/IP(src="2.2.2.3",dst="1.1.4.1")/("X"*480)',
+ 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2020",dst="ABAB:910B:6666:3457:8295:3333:1800:2929")/("X" * 80)',
+ 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X" * 80)',
+ 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2020",dst="ABAB:910B:6666:3457:8295:3333:1800:2929")/UDP(sport=22, dport=23)/("X" * 80)',
+ 'Ether(dst="68:05:ca:a3:28:94")/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" * 80)', ]
+ output = self.rssprocess.send_pkt_get_output(pkts=pkts1)
+ hash_values, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
+ for i in range(0, len(hash_values), 2):
+ self.verify(hash_values[i] == hash_values[i + 1],
+ 'the pair of packets with switched l3 address should have same hash value')
+ rule2 = [
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / ipv4 / tcp / end actions rss types ipv4-tcp end key_len 0 queues end / end',
+ 'flow create 0 ingress pattern eth / ipv6 / udp / end actions rss types ipv6-udp end key_len 0 queues end / end']
+ rule_li2 = self.rssprocess.create_rule(rule=rule2)
+ pkts2 = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/TCP(sport=23, dport=22)/("X"*480)',
+ 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2020",dst="ABAB:910B:6666:3457:8295:3333:1800:2929")/UDP(sport=22, dport=23)/("X" * 80)',
+ 'Ether(dst="68:05:ca:a3:28:94")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2020",dst="ABAB:910B:6666:3457:8295:3333:1800:2929")/UDP(sport=23, dport=22)/("X" * 80)', ]
+ output = self.rssprocess.send_pkt_get_output(pkts=pkts2)
+ hash_values, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
+ for i in range(0, len(hash_values), 2):
+ self.verify(hash_values[i] != hash_values[i + 1],
+ 'the packets with switched l4 port should have different hash values.')
+ self.pmd_output.execute_cmd('flow destroy 0 rule 0')
+ output = self.rssprocess.send_pkt_get_output(pkts=pkts1)
+ hash_values, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
+ for i in range(0, len(hash_values), 2):
+ self.verify(hash_values[i] != hash_values[i + 1],
+ 'the pair of packets with switched l3 address should have defferent hash value')
+ output = self.rssprocess.send_pkt_get_output(pkts=pkts2)
+ hash_values, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
+ for i in range(0, len(hash_values), 2):
+ self.verify(hash_values[i] != hash_values[i + 1],
+ 'the packets with switched l4 port should have different hash values.')
+ self.pmd_output.execute_cmd('flow flush 0')
+ output = self.rssprocess.send_pkt_get_output(pkts=pkts1)
+ hash_values, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
+ for i in range(0, len(hash_values), 2):
+ self.verify(hash_values[i] != hash_values[i + 1],
+ 'the pair of packets with switched l3 address should have defferent hash value')
+ output = self.rssprocess.send_pkt_get_output(pkts=pkts2)
+ hash_values, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
+ for i in range(0, len(hash_values), 2):
+ self.verify(hash_values[i] == hash_values[i + 1],
+ 'the packets with switched l4 port should have same hash values.')
+
+ def test_rss_function_when_disable_rss(self):
+ self.switch_testpmd(False)
+ 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'
+ self.rssprocess.create_rule(rule=rule)
+ pkt = 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst=RandIP(),src=RandIP())/UDP(sport=RandShort(),dport=RandShort())/("X"*480)'
+ output = self.rssprocess.send_pkt_get_output(pkts=pkt, count=1280)
+ hashes, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
+ self.verify(len(hashes) == 1280,
+ 'all the packets should have hash value and distributed to all queues by RSS.')
+ self.verify(rss_distribute, 'the packet do not distribute by rss')
+
+ def test_stress_cases(self):
+ # Subcase: add/delete IPV4_GTPU_UL_IPV4_TCP rules
+ self.switch_testpmd(2)
+ rule1 = 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-src-only end key_len 0 queues end / end'
+ for _ in range(100):
+ self.pmd_output.execute_cmd(rule1)
+ self.pmd_output.execute_cmd('flow destroy 0 rule 0')
+ rule_li = self.rssprocess.create_rule(rule=rule1)
+ out = self.pmd_output.execute_cmd('flow list 0')
+ p = re.compile("^(\d+)\s")
+ li = out.splitlines()
+ res = list(filter(bool, list(map(p.match, li))))
+ result = [i.group(1) for i in res]
+ self.verify(result == rule_li, 'should only rule 0 existed')
+ pkts1 = [
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/TCP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/TCP(sport=32, dport=23)/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/TCP(sport=22, dport=33)/("X"*480)', ]
+ output = self.rssprocess.send_pkt_get_output(pkts=pkts1)
+ hash_values1, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
+ self.verify(hash_values1[1] != hash_values1[0] and hash_values1[2] != hash_values1[0] and hash_values1[3] ==
+ hash_values1[0],
+ 'packet 2 and packet 3 should have different hash value with packet 1, packet 4 should has same hash value with packet 1.')
+ self.pmd_output.execute_cmd('flow flush 0')
+ # Subcase: add/delete IPV4_GTPU_DL_IPV4 rules
+ rule2 = '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'
+ for _ in range(100):
+ self.pmd_output.execute_cmd(rule2)
+ self.pmd_output.execute_cmd('flow destroy 0 rule 0')
+ rule_li = self.rssprocess.create_rule(rule=rule2)
+ out = self.pmd_output.execute_cmd('flow list 0')
+ p = re.compile("^(\d+)\s")
+ li = out.splitlines()
+ res = list(filter(bool, list(map(p.match, li))))
+ result = [i.group(1) for i in res]
+ self.verify(result == rule_li, 'should only rule 0 existed')
+ pkts2 = [
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x12345)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/("X"*480)', ]
+ output = self.rssprocess.send_pkt_get_output(pkts=pkts2)
+ hash_values2, rss_distribute = self.rssprocess.get_hash_verify_rss_distribute(output)
+ self.verify(hash_values2[1] != hash_values2[0] and hash_values2[2] == hash_values2[0],
+ 'packet 2 should has different hash value with packet 1, packet 3 should has same hash value with packet 1.')
+
+ def test_ipv4_gtpu_ipv4_ipv4_gtpu_eh_ipv4(self):
+ self.switch_testpmd(2)
+ rules = [
+ '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',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end'
+ ]
+ pkts1 = [
+ [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ],
+ [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ],
+ [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)', ]
+ ]
+
+ pkts2 = [
+ [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ],
+ [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ],
+ [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ]
+ ]
+ rule_li1 = self.rssprocess.create_rule(rule=rules[0])
+ hash_value1, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1[0])
+ self.verify(hash_value1[0] == hash_value1[1] and hash_value1[0] != hash_value1[2],
+ 'got wrong hash, expect 1st hash equal to 2nd and different with 3rd')
+ hash_value2, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1[1])
+ self.verify(len(set(hash_value2)) == len(pkts1[1]), 'hash wrong, expect all hash value are different')
+ hash_value3, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1[2])
+ self.verify(len(set(hash_value3)) == len(pkts1[2]), 'hash wrong, expect all hash value are different')
+
+ rule_li2 = self.rssprocess.create_rule(rule=rules[1])
+ hash_value1, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[0])
+ self.verify(hash_value1[0] == hash_value1[1] and hash_value1[0] != hash_value1[2],
+ 'got wrong hash, expect 1st hash equal to 2nd and different with 3rd')
+ hash_value2, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[1])
+ self.verify(hash_value2[0] != hash_value2[1] and hash_value2[0] == hash_value2[2],
+ 'got wrong hash, expect 1st hash equal to 3rd and different with 2nd')
+ hash_value3, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[2])
+ self.verify(hash_value3[0] != hash_value3[1] and hash_value3[0] == hash_value3[2],
+ 'got wrong hash, expect 1st hash equal to 3rd and different with 2nd')
+
+ self.rssprocess.destroy_rule(port_id=0, rule_id=rule_li1)
+ hash_value1, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[0])
+ self.verify(all([i == '0' for i in hash_value1]),
+ 'got wrong hash, expect not got rss hash and distribute to queue 0')
+ hash_value2, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[1])
+ self.verify(hash_value2[0] != hash_value2[1] and hash_value2[0] == hash_value2[2],
+ 'got wrong hash, expect 1st hash equal to 3rd and different with 2nd')
+ hash_value3, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[2])
+ self.verify(hash_value3[0] != hash_value3[1] and hash_value3[0] == hash_value3[2],
+ 'got wrong hash, expect 1st hash equal to 3rd and different with 2nd')
+
+ self.rssprocess.create_rule(rule=rules[0])
+ hash_value1, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[0])
+ self.verify(hash_value1[0] == hash_value1[1] and hash_value1[0] != hash_value1[2],
+ 'got wrong hash, expect 1st hash equal to 2nd and different with 3rd')
+ hash_value2, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[1])
+ self.verify(hash_value2[0] != hash_value2[1] and hash_value2[0] == hash_value2[2],
+ 'got wrong hash, expect 1st hash equal to 3rd and different with 2nd')
+ hash_value3, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[2])
+ self.verify(hash_value3[0] != hash_value3[1] and hash_value3[0] == hash_value3[2],
+ 'got wrong hash, expect 1st hash equal to 3rd and different with 2nd')
+
+ self.rssprocess.destroy_rule(port_id=0, rule_id=rule_li2)
+ hash_value1, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[0])
+ self.verify(hash_value1[0] == hash_value1[1] and hash_value1[0] != hash_value1[2],
+ 'got wrong hash, expect 1st hash equal to 2nd and different with 3rd')
+ hash_value2, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[1] + pkts2[2])
+ self.verify(all([i == '0' for i in hash_value2]),
+ 'got wrong hash, expect not got rss hash and distribute to queue 0')
+
+ def test_ipv4_gtpu_eh_ipv4_with_without_ul_dl(self):
+ self.switch_testpmd(2)
+ rules = [
+ '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',
+ 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end']
+ pkts1 = [
+ [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
+ ],
+ [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
+ ]
+ ]
+
+ pkts2 = [
+ [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ],
+ [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ]
+ ]
+ rule_li1 = self.rssprocess.create_rule(rule=rules[0])
+ hash_value1, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1[0])
+ self.verify(hash_value1[0] == hash_value1[1] and hash_value1[0] != hash_value1[2],
+ 'got wrong hash, expect 1st hash equal to 2nd and different with 3rd')
+ hash_value2, queues = self.rssprocess.send_pkt_get_hash_queues(pkts1[1])
+ self.verify(len(set(hash_value2)) == len(pkts1[1]), 'hash wrong, expect all hash value are different')
+
+ rule_li2 = self.rssprocess.create_rule(rule=rules[1])
+ hash_value1, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[0])
+ self.verify(hash_value1[0] != hash_value1[1] and hash_value1[0] == hash_value1[2],
+ 'got wrong hash, expect 1st hash equal to 3rd and different with 2nd')
+ hash_value2, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts2[1])
+ self.verify(hash_value2[0] != hash_value2[1] and hash_value2[0] == hash_value2[2],
+ 'got wrong hash, expect 1st hash equal to 3rd and different with 2nd')
+
+ self.rssprocess.destroy_rule(port_id=0, rule_id=rule_li2)
+ hash_value1, queues = self.rssprocess.send_pkt_get_hash_queues(pkts2[0] + pkts2[1])
+ self.verify(all([i == '0' for i in hash_value1]),
+ 'got wrong hash, expect not got rss hash and distribute to queue 0')
+
+ def test_ipv4_gtpu_eh_ipv4_without_with_ul_dl(self):
+ self.switch_testpmd(2)
+ rules = [
+ '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',
+ 'flow create 0 ingress pattern eth / 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',
+ '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']
+ pkts1 = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ]
+ rule0 = self.rssprocess.create_rule(rules[0])
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0], 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] != hash_values[0], 'packet 3 should has different hash value with packet 1')
+ self.verify(hash_values[4] == hash_values[3], 'packet 5 should has same hash value with packet 4')
+ self.verify(hash_values[5] != hash_values[3], 'packet 6 should has different hash value with packet 4')
+
+ rule1 = self.rssprocess.create_rule(rules[1])
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0], 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] != hash_values[0], 'packet 3 should has different hash value with packet 1')
+ self.verify(hash_values[4] != hash_values[3], 'packet 5 should has different hash value with packet 4')
+ self.verify(hash_values[5] == hash_values[3], 'packet 6 should has same hash value with packet 4')
+
+ self.rssprocess.destroy_rule(port_id=0, rule_id=rule0)
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts1[3:])
+ self.verify(hash_values[1] != hash_values[0], 'should get different hash values')
+ self.verify(hash_values[2] == hash_values[0], 'should get same hash values')
+
+ rule2 = self.rssprocess.create_rule(rules[0])
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts1)
+ self.verify(hash_values[1] == hash_values[0], 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] != hash_values[0], 'packet 3 should has different hash value with packet 1')
+ self.verify(hash_values[4] == hash_values[3], 'packet 5 should has same hash value with packet 4')
+ self.verify(hash_values[5] != hash_values[3], 'packet 6 should has different hash value with packet 4')
+
+ self.rssprocess.destroy_rule(port_id=0, rule_id=rule2)
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts1)
+ self.verify(all([i == '0' for i in hash_values]), 'all pkts should has no hash value and distribute to queue 0')
+
+ def test_ipv4_gtpu_eh_ipv4_and_ipv4_gtpu_eh_ipv4_udp_tcp(self):
+ self.switch_testpmd(2)
+ pkts1 = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport=33)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/UDP(sport=22,dport=33)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ]
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0], 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] != hash_values[0], 'packet 3 should has different hash value with packet 1')
+ self.verify(hash_values[4] == hash_values[3], 'packet 5 should has same hash value with packet 4')
+ self.verify(hash_values[5] != hash_values[3], 'packet 6 should has different hash value with packet 4')
+ self.verify(hash_values[7] != hash_values[6], 'packet 8 should has different hash value to packet 7')
+ self.verify(hash_values[8] != hash_values[6] and hash_values[8] != hash_values[7],
+ 'packet 9 should have different hash value to packet 7 and 8')
+ self.verify(hash_values[10] != hash_values[9], 'packet 11 should has different hash value to packet 10')
+ self.verify(hash_values[11] != hash_values[9] and hash_values[11] != hash_values[10],
+ 'packet 12 have different hash value to packet 10 and 11')
+ rule1 = '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'
+ rule_li1 = self.rssprocess.create_rule(rule=rule1)
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0], 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] != hash_values[0], 'packet 3 should has different hash value with packet 1')
+ self.verify(hash_values[4] != hash_values[3], 'packet 5 should has different hash value with packet 4')
+ self.verify(hash_values[5] == hash_values[3], 'packet 6 should has same hash value with packet 4')
+ self.verify(hash_values[7] != hash_values[6], 'packet 8 should has different hash value to packet 7')
+ self.verify(hash_values[8] != hash_values[6] and hash_values[8] != hash_values[7],
+ 'packet 9 should have different hash value to packet 7 and 8')
+ self.verify(hash_values[10] != hash_values[9], 'packet 11 should has different hash value to packet 10')
+ self.verify(hash_values[11] != hash_values[9] and hash_values[11] != hash_values[10],
+ 'packet 12 have different hash value to packet 10 and 11')
+ rule2 = 'flow create 0 ingress pattern eth / 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'
+ rule_li2 = self.rssprocess.create_rule(rule=rule2)
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0], 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] == hash_values[0], 'packet 3 should has same hash value with packet 1')
+ self.verify(hash_values[4] != hash_values[3], 'packet 5 should has different hash value with packet 4')
+ self.verify(hash_values[5] == hash_values[3], 'packet 6 should has same hash value with packet 4')
+ self.verify(hash_values[7] != hash_values[6], 'packet 8 should has different hash value to packet 7')
+ self.verify(hash_values[8] != hash_values[6] and hash_values[8] != hash_values[7],
+ 'packet 9 should have different hash value to packet 7 and 8')
+ self.verify(hash_values[10] != hash_values[9], 'packet 11 should has different hash value to packet 10')
+ self.verify(hash_values[11] == hash_values[9],
+ 'packet 12 have same hash value to packet 10')
+
+ def test_ipv6_gtpu_eh_ipv6_and_ipv6_gtpu_eh_ipv6_udp_tcp(self):
+ self.switch_testpmd(2)
+ pkts1 = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=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)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=33)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/TCP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=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)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=33)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/TCP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)', ]
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0], 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] != hash_values[0], 'packet 3 should has different hash value with packet 1')
+ self.verify(hash_values[4] == hash_values[3], 'packet 5 should has same hash value with packet 4')
+ self.verify(hash_values[5] != hash_values[3], 'packet 6 should has different hash value with packet 4')
+ self.verify(hash_values[7] != hash_values[6], 'packet 8 should has different hash value to packet 7')
+ self.verify(hash_values[8] != hash_values[6] and hash_values[8] != hash_values[7],
+ 'packet 9 should have different hash value to packet 7 and 8')
+ self.verify(hash_values[10] != hash_values[9], 'packet 11 should has different hash value to packet 10')
+ self.verify(hash_values[11] != hash_values[9] and hash_values[11] != hash_values[10],
+ 'packet 12 have different hash value to packet 10 and 11')
+ rule1 = 'flow create 0 ingress pattern eth / ipv6 / udp / gtpu / gtp_psc pdu_t is 0 / ipv6 / tcp / end actions rss types ipv6-tcp l4-dst-only end key_len 0 queues end / end'
+ rule_li1 = self.rssprocess.create_rule(rule=rule1)
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] != hash_values[0], 'packet 2 should has different hash value with packet 1')
+ self.verify(hash_values[2] == hash_values[0], 'packet 3 should has same hash value with packet 1')
+ self.verify(hash_values[4] == hash_values[3], 'packet 5 should has same hash value with packet 4')
+ self.verify(hash_values[5] != hash_values[3], 'packet 6 should has different hash value with packet 4')
+ self.verify(hash_values[7] != hash_values[6], 'packet 8 should has different hash value to packet 7')
+ self.verify(hash_values[8] != hash_values[6] and hash_values[8] != hash_values[7],
+ 'packet 9 should have different hash value to packet 7 and 8')
+ self.verify(hash_values[10] != hash_values[9], 'packet 11 should has different hash value to packet 10')
+ self.verify(hash_values[11] != hash_values[9] and hash_values[11] != hash_values[10],
+ 'packet 12 have different hash value to packet 10 and 11')
+ rule2 = 'flow create 0 ingress pattern eth / ipv6 / 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_li2 = self.rssprocess.create_rule(rule=rule2)
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0], 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] != hash_values[0], 'packet 3 should has different hash value with packet 1')
+ self.verify(hash_values[4] == hash_values[3], 'packet 5 should has same hash value with packet 4')
+ self.verify(hash_values[5] != hash_values[3], 'packet 6 should has different hash value with packet 4')
+ self.verify(hash_values[7] == hash_values[6], 'packet 8 should has same hash value to packet 7')
+ self.verify(hash_values[8] != hash_values[6],
+ 'packet 9 should have different hash value to packet 7')
+ self.verify(hash_values[10] != hash_values[9], 'packet 11 should has different hash value to packet 10')
+ self.verify(hash_values[11] != hash_values[9] and hash_values[11] != hash_values[10],
+ 'packet 12 have different hash value to packet 10 and 11')
+
+ def test_ipv4_gtpu_eh_ipv6_and_ipv4_gtpu_eh_ipv6_udp_tcp_without_ul_dl(self):
+ self.switch_testpmd(2)
+ pkts1 = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=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)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=33)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/TCP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/("X"*480)', ]
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0], 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] != hash_values[0] and hash_values[3] != hash_values[0],
+ 'packet 3 and packet 4 should have different hash value to packet 1.')
+ self.verify(len({hash_values[4], hash_values[5], hash_values[6]}) == 3,
+ 'packet 5 and packet 6 and packet 7 have different hash value.')
+ rule1 = 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end'
+ self.rssprocess.create_rule(rule=rule1)
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0] and hash_values[2] == hash_values[0],
+ 'packet 2 should has same hash value with packet 1, packet 3 should has same hash value to packet 1')
+ self.verify(hash_values[3] != hash_values[0], 'packet 4 should have different hash value to packet 1.')
+ self.verify(hash_values[5] == hash_values[4], 'packet 6 should has same hash value to packet 5.')
+ self.verify(hash_values[6] != hash_values[4], 'packet 7 should has differnt hash value to packet 5.')
+
+ def test_ipv6_gtpu_ipv4_and_ipv6_gtpu_ipv4_udp_tcp(self):
+ self.switch_testpmd(2)
+ pkts1 = [
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/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)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/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=33)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.1.1",src="192.168.0.2")/UDP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.1.2")/UDP(sport=22,dport=23)/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.0.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.0.1",src="192.168.1.2")/("X"*480)',
+ 'Ether(dst="68:05:CA:BB:26:E0")/IPv6()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/IP(dst="192.168.1.1",src="192.168.0.2")/("X"*480)', ]
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0],
+ 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] != hash_values[0] and hash_values[3] != hash_values[0],
+ 'packet 3 and packet 4 should have different hash value to packet 1.')
+ self.verify(len({hash_values[4], hash_values[5], hash_values[6]}) == 3,
+ 'packet 5 and packet 6 and packet 7 have different hash value.')
+ self.rssprocess.create_rule(
+ rule='flow create 0 ingress pattern eth / ipv6 / udp / gtpu / ipv4 / udp / end actions rss types ipv4-udp l4-dst-only end key_len 0 queues end / end')
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] != hash_values[0],
+ 'packet 2 should has defferent hash value with packet 1')
+ self.verify(hash_values[2] == hash_values[0] and hash_values[3] == hash_values[0],
+ 'packet 3 and packet 4 should have same hash value to packet 1.')
+ self.verify(len({hash_values[4], hash_values[5], hash_values[6]}) == 3,
+ 'packet 5 and packet 6 and packet 7 have different hash value.')
+ self.rssprocess.create_rule(
+ rule='flow create 0 ingress pattern eth / ipv6 / udp / gtpu / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end')
+ hash_values, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts1)
+ self.verify(hash_values[1] == hash_values[0],
+ 'packet 2 should has same hash value with packet 1')
+ self.verify(hash_values[2] != hash_values[0], 'packet 3 should has different hash value to packet 1.')
+ self.verify(hash_values[3] == hash_values[0],
+ 'packet 4 should has same hash value with packet 1')
+ self.verify(hash_values[5] == hash_values[4],
+ 'packet 6 should has same hash value with packet 5')
+ self.verify(hash_values[6] != hash_values[4], 'packet 7 should has different hash value to packet 5.')
+
+ def test_toeplitz_symmetric_combination(self):
+ self.switch_testpmd(False)
+ self.logger.info('Subcase: toeplitz/symmetric with same pattern')
+ # step 1
+ rule_toeplitz = '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_id_toeplitz = self.rssprocess.create_rule(rule=rule_toeplitz)
+ self.rssprocess.check_rule(rule_list=rule_id_toeplitz)
+ pkts_toeplitz = ['Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/("X"*480)']
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(hash_value[1] != hash_value[0], 'second packet should hash value different from the first packet')
+ self.verify(hash_value[2] == hash_value[0], 'third packet should hash value same with the first packet')
+ # step 2
+ rule_symmetric = '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_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
+ pkts_symmetric =['Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.2",dst="192.168.0.1")/("X"*480)']
+ self.rssprocess.check_rule(rule_list=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(hash_value[0] == hash_value[1], 'second packet should hash value same with the first packet')
+ # step 3
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ for temp in range(len(hash_value)):
+ self.verify(len(hash_value[temp]) != 0, 'all the toeplitz packet should have hash value')
+ #step 4
+ self.rssprocess.destroy_rule(rule_id=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(len(hash_value) == 0, 'all the toeplitz packet should have no hash value')
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(len(hash_value) == 0, 'all the symmetric packet should have no hash value')
+ self.pmd_output.execute_cmd('flow flush 0')
+
+ self.logger.info('Subcase: toeplitz/symmetric with same pattern (switched rule order)')
+ # step 1
+ rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
+ self.rssprocess.check_rule(rule_list=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(hash_value[0] == hash_value[1], 'second packet should hash value same with the first packet')
+ rule_id_toeplitz = self.rssprocess.create_rule(rule=rule_toeplitz)
+ self.rssprocess.check_rule(rule_list=rule_id_toeplitz)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(hash_value[1] != hash_value[0], 'second packet should hash value different from the first packet')
+ self.verify(hash_value[2] == hash_value[0], 'third packet should hash value same with the first packet')
+ # step 2
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ for temp in range(len(hash_value)):
+ self.verify(len(hash_value[temp]) != 0, 'all the toeplitz packet should have hash value')
+ # step 3
+ self.rssprocess.destroy_rule(rule_id=rule_id_toeplitz)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(len(hash_value) == 0, 'all the toeplitz packet should have no hash value')
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(len(hash_value) == 0, 'all the symmetric packet should have no hash value')
+ self.pmd_output.execute_cmd('flow flush 0')
+
+ self.logger.info('Subcase: toeplitz/symmetric with different pattern (different UL/DL)')
+ # step 1
+ rule_toeplitz = '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'
+ pkts_toeplitz = [
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/("X"*480)'
+ ]
+ rule_symmetric = 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end'
+ pkts_symmetric = [
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(src="192.168.0.2",dst="192.168.0.1")/("X"*480)'
+ ]
+ rule_id_toeplitz = self.rssprocess.create_rule(rule=rule_toeplitz)
+ self.rssprocess.check_rule(rule_list=rule_id_toeplitz)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(hash_value[1] != hash_value[0], 'second packet should hash value different from the first packet')
+ self.verify(hash_value[2] == hash_value[0], 'third packet should hash value same with the first packet')
+ rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
+ self.rssprocess.check_rule(rule_list=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(hash_value[0] == hash_value[1], 'second packet should hash value same with the first packet')
+ # step 2
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(hash_value[1] != hash_value[0], 'second packet should hash value different from the first packet')
+ self.verify(hash_value[2] == hash_value[0], 'third packet should hash value same with the first packet')
+ # step 3
+ self.rssprocess.destroy_rule(rule_id=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(len(hash_value) == 0, 'all the symmetric packet should have no hash value')
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(hash_value[1] != hash_value[0], 'second packet should hash value different from the first packet')
+ self.verify(hash_value[2] == hash_value[0], 'third packet should hash value same with the first packet')
+ rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
+ self.rssprocess.check_rule(rule_list=rule_id_symmetric)
+ self.rssprocess.destroy_rule(rule_id=rule_id_toeplitz)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(hash_value[0] == hash_value[1], 'second packet should hash value same with the first packet')
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(len(hash_value) == 0, 'third packet should hash value same with the first packet')
+ self.pmd_output.execute_cmd('flow flush 0')
+
+ self.logger.info('Subcase: toeplitz/symmetric with different pattern (with/without UL/DL)')
+ # step 1
+ rule_toeplitz = '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'
+ pkts_toeplitz = [
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/("X"*480)'
+ ]
+ rule_symmetric = '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'
+ pkts_symmetric = [
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.2",dst="192.168.0.1")/("X"*480)'
+ ]
+ rule_id_toeplitz = self.rssprocess.create_rule(rule=rule_toeplitz)
+ self.rssprocess.check_rule(rule_list=rule_id_toeplitz)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(hash_value[1] != hash_value[0], 'hash_value[1] should hash value different from hash_value[0]')
+ self.verify(hash_value[2] == hash_value[0], 'hash_value[2] should hash value same with hash_value[0]')
+ self.verify(hash_value[4] != hash_value[3], 'hash_value[4] should hash value different from hash_value[3]')
+ self.verify(hash_value[5] == hash_value[3], 'hash_value[5] should hash value same with hash_value[3]')
+ rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
+ self.rssprocess.check_rule(rule_list=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(hash_value[0] == hash_value[1], 'second packet should hash value same with the first packet')
+ # step 2
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ for temp in range(len(hash_value)):
+ self.verify(len(hash_value[temp]) != 0, 'all the toeplitz packet should have hash value')
+ # step 3
+ self.rssprocess.destroy_rule(rule_id=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(len(hash_value) == 0, 'all the symmetric packet should have no hash value')
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ for temp in range(len(hash_value)):
+ if temp < 3:
+ self.verify(len(hash_value) == 0, 'all the toeplitz DL packet should have no hash value')
+ else:
+ self.verify(len(hash_value[temp]) != 0, 'all the toeplitz UL packet should have hash value')
+ # step 4
+ rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
+ self.rssprocess.check_rule(rule_list=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(hash_value[0] == hash_value[1], 'second packet should hash value same with the first packet')
+ # step 5
+ self.rssprocess.destroy_rule(rule_id=rule_id_toeplitz)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(hash_value[0] == hash_value[1], 'second packet should hash value same with the first packet')
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ for temp in range(len(hash_value)):
+ if temp > 2:
+ self.verify(len(hash_value) == 0, 'all the toeplitz UL packet should have no hash value')
+ self.pmd_output.execute_cmd('flow flush 0')
+
+ self.logger.info('Subcase: toeplitz/symmetric with different pattern')
+ # step 1
+ rule_toeplitz = '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'
+ pkts_toeplitz = [
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.1.1", dst="192.168.0.2")/UDP(sport=22, dport=23)/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.0.2")/UDP(sport=32, dport=23)/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=0, qos_flow=0x34)/IP(src="192.168.0.1", dst="192.168.1.2")/UDP(sport=22, dport=33)/("X"*480)'
+ ]
+ rule_symmetric = 'flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc pdu_t is 1 / ipv6 / end actions rss func symmetric_toeplitz types ipv6 end key_len 0 queues end / end'
+ pkts_symmetric = [
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888",dst="2222:3333:4444:5555:6666:7777:8888:9999")/("X"*480)',
+ 'Ether(dst="00:11:22:33:44:55")/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTP_PDUSession_ExtensionHeader(pdu_type=1, qos_flow=0x34)/IPv6(src="2222:3333:4444:5555:6666:7777:8888:9999",dst="1111:2222:3333:4444:5555:6666:7777:8888")/("X"*480)'
+ ]
+ rule_id_toeplitz = self.rssprocess.create_rule(rule=rule_toeplitz)
+ self.rssprocess.check_rule(rule_list=rule_id_toeplitz)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(hash_value[1] != hash_value[0], 'hash_value[1] should hash value different from hash_value[0]')
+ self.verify(hash_value[2] != hash_value[0], 'hash_value[2] should hash value different with hash_value[0]')
+ self.verify(hash_value[3] == hash_value[0], 'hash_value[3] should hash value same from hash_value[0]')
+ rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
+ self.rssprocess.check_rule(rule_list=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(hash_value[0] == hash_value[1], 'second packet should hash value same with the first packet')
+ # step 2
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ for temp in range(len(hash_value)):
+ self.verify(len(hash_value[temp]) != 0, 'all the toeplitz packet should have hash value')
+ # step 3
+ self.rssprocess.destroy_rule(rule_id=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(len(hash_value) == 0, 'all the symmetric packet should have no hash value')
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(hash_value[1] != hash_value[0], 'hash_value[1] should hash value different from hash_value[0]')
+ self.verify(hash_value[2] != hash_value[0], 'hash_value[2] should hash value different with hash_value[0]')
+ self.verify(hash_value[3] == hash_value[0], 'hash_value[3] should hash value same from hash_value[0]')
+ # step 4
+ rule_id_symmetric = self.rssprocess.create_rule(rule=rule_symmetric)
+ self.rssprocess.check_rule(rule_list=rule_id_symmetric)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(hash_value[0] == hash_value[1], 'second packet should hash value same with the first packet')
+ self.rssprocess.destroy_rule(rule_id=rule_id_toeplitz)
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_symmetric)
+ self.verify(hash_value[0] == hash_value[1], 'second packet should hash value same with the first packet')
+ hash_value, _ = self.rssprocess.send_pkt_get_hash_queues(pkts=pkts_toeplitz)
+ self.verify(len(hash_value) == 0, 'all the symmetric packet should have no hash value')
+ 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.dut.kill_all()
--
2.17.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-20 6:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-20 14:01 [dts] [PATCH V1] tests: add cvl_advanced_rss_gtpu Haiyang Zhao
2020-10-20 6:15 ` Zhao, HaiyangX
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).