From patchwork Thu Mar 18 05:27:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 89437 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EF0AFA0561; Thu, 18 Mar 2021 06:39:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0FFC141046; Thu, 18 Mar 2021 06:39:56 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id D708F141040 for ; Thu, 18 Mar 2021 06:39:52 +0100 (CET) IronPort-SDR: WItbP2yLHDC8pXSD9f3l3EGT0aMUxQULpPK8sESQQ5PBDGUxInS3UWjsXNF07uLA2kAoCsNdt2 z/zNVXybpPrw== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="176736171" X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="176736171" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:51 -0700 IronPort-SDR: sXubYN448Ty3ob+O2IPwPlsKK5B5CMSnV5qrf+MVjV122jGeaDH4ak0wH0dZmVO/WuvFtaSmSY 0euy5kn8++ew== X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="406214317" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:48 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Thu, 18 Mar 2021 13:27:24 +0800 Message-Id: <1616045251-65532-2-git-send-email-zhiminx.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> References: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 1/8] tests/cvl_advanced_rss_pppoe:rename pppoe suite X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *.rename pppoe suite and pkg check Signed-off-by: Zhimin Huang --- tests/TestSuite_cvl_advanced_rss_pppoe.py | 5667 ++++++++++++++++++++ ...cvl_advanced_rss_pppoe_vlan_esp_ah_l2tp_pfcp.py | 5667 -------------------- 2 files changed, 5667 insertions(+), 5667 deletions(-) create mode 100644 tests/TestSuite_cvl_advanced_rss_pppoe.py delete mode 100644 tests/TestSuite_cvl_advanced_rss_pppoe_vlan_esp_ah_l2tp_pfcp.py diff --git a/tests/TestSuite_cvl_advanced_rss_pppoe.py b/tests/TestSuite_cvl_advanced_rss_pppoe.py new file mode 100644 index 0000000..bf5422d --- /dev/null +++ b/tests/TestSuite_cvl_advanced_rss_pppoe.py @@ -0,0 +1,5667 @@ +# BSD LICENSE +# +# Copyright(c)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 random +import string +from test_case import TestCase +from pmd_output import PmdOutput +from packet import Packet +from rte_flow_common import RssProcessing +from config import UserConf + +mac_ipv4_pfcp_session_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=2)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:54")/IP(src="192.168.0.25",dst="192.168.0.23")/UDP(sport=23,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=25)/Raw("x"*80)'] +} + +mac_ipv4_pfcp_session = { + 'sub_casename': 'mac_ipv4_pfcp_session', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_pfcp_session_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_pfcp_session_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_pfcp_session_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv4_pfcp_session_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv4_pfcp_session_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv6_pfcp_session_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=2)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=23,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=25)/Raw("x"*80)'] +} + +mac_ipv6_pfcp_session = { + 'sub_casename': 'mac_ipv6_pfcp_session', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv6 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv6_pfcp_session_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv6_pfcp_session_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv6_pfcp_session_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv6_pfcp_session_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv6_pfcp_session_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv4_l2tpv3_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.4", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x12\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.5",dst="192.168.0.7", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)' + ], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=25)/Raw("x"*80)' + ] +} + +mac_ipv4_l2tpv3 = { + 'sub_casename': 'mac_ipv4_l2tpv3', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_l2tpv3_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_l2tpv3_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_l2tpv3_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv4_l2tpv3_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv4_l2tpv3_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv6_l2tpv3_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x12\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)' + ], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=25)/Raw("x"*80)' + ] +} + +mac_ipv6_l2tpv3 = { + 'sub_casename': 'mac_ipv6_l2tpv3', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv6 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv6_l2tpv3_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv6_l2tpv3_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv6_l2tpv3_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv6_l2tpv3_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv6_l2tpv3_packets['match']], + 'action': 'check_no_hash', + } + ] +} + +mac_ipv4_esp_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.7",proto=50)/ESP(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=12)/Raw("x"*480)' + ] +} + +mac_ipv4_esp = { + 'sub_casename': 'mac_ipv4_esp', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / esp / end actions rss types esp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_esp_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_esp_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_esp_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [ + i for i in mac_ipv4_esp_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + i for i in mac_ipv4_esp_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv4_udp_esp_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.7")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)'] +} + +mac_ipv4_udp_esp = { + 'sub_casename': 'mac_ipv4_udp_esp', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / esp / end actions rss types esp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_udp_esp_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_udp_esp_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_udp_esp_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv4_udp_esp_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + i for i in mac_ipv4_esp_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv6_esp_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=50)/ESP(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)'] +} + +mac_ipv6_esp = { + 'sub_casename': 'mac_ipv6_esp', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv6 / esp / end actions rss types esp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv6_esp_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv6_esp_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv6_esp_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv6_esp_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv6_esp_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv6_udp_esp_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=11)/Raw("x"*480)'] +} + +mac_ipv6_udp_esp = { + 'sub_casename': 'mac_ipv6_udp_esp', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv6 / udp / esp / end actions rss types esp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv6_udp_esp_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv6_udp_esp_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv6_udp_esp_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv6_udp_esp_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_ipv6_udp_esp_packets['match'], + 'action': 'check_no_hash', + }, + ], + +} + +mac_ipv4_ah_packets = { + 'match': ['Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.8",proto=51)/AH(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=11)/Raw("x"*480)'] +} + +mac_ipv4_ah = { + 'sub_casename': 'mac_ipv4_ah', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / ah / end actions rss types ah end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_ah_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_ah_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_ah_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv4_ah_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv4_ah_packets['match']], + 'action': 'check_no_hash', + }, + ], + +} + +mac_ipv6_ah_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=51)/AH(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=11)/Raw("x"*480)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)'] +} + +mac_ipv6_ah = { + 'sub_casename': 'mac_ipv6_ah', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv6 / ah / end actions rss types ah end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv6_ah_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv6_ah_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv6_ah_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv6_ah_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv6_ah_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_pay_packets = { + 'mismatch': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IP(src="192.168.0.3",dst="192.168.0.5")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'] +} + +mac_pppoe_pay_l2_src_only_packets = { + 'mac_pppoe_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/Raw("x"*80)' + ], + 'mac_pppoe_lcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)' + ], + 'mac_pppoe_ipcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)' + ], +} + +mac_pppoe_pay_l2_src_only = { + 'sub_casename': 'mac_pppoe_pay_l2_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / end actions rss types eth l2-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_pay'][0], + 'action': {'save_hash': 'mac_pppoe_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_lcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_lcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_lcp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_ipcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_ipcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_ipcp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [mac_pppoe_pay_l2_src_only_packets[key][i] for i in range(0, 3) for key in + ['mac_pppoe_pay', 'mac_pppoe_lcp_pay', 'mac_pppoe_ipcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_pay_l2_dst_only_packets = { + 'mac_pppoe_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/Raw("x"*80)'] + +} + +mac_pppoe_pay_l2_dst_only = { + 'sub_casename': 'mac_pppoe_pay_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / end actions rss types eth l2-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_pay_l2_dst_only_packets['mac_pppoe_pay'][0], + 'action': {'save_hash': 'mac_pppoe_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_dst_only_packets['mac_pppoe_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_dst_only_packets['mac_pppoe_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_pay_l2_dst_only_packets['mac_pppoe_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_pay_l2_src_only_l2_dst_only_packets = { + 'mac_pppoe_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/Raw("x"*80)' + ] + +} + +mac_pppoe_pay_l2_src_only_l2_dst_only = { + 'sub_casename': 'mac_pppoe_pay_l2_src_only_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / end actions rss types eth end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay'][0], + 'action': {'save_hash': 'mac_pppoe_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_pay_session_id_packets = { + 'mac_pppoe_lcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + ], + 'mac_pppoe_ipcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)' + ] + +} + +mac_pppoe_pay_session_id = { + 'sub_casename': 'mac_pppoe_pay_session_id', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_lcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_lcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_lcp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_ipcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_ipcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_ipcp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [mac_pppoe_pay_session_id_packets[key][i] for i in range(0, 3) for key in + ['mac_pppoe_lcp_pay', 'mac_pppoe_ipcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_pay_l2_src_only_session_id_packets = { + 'mac_pppoe_lcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)' + ], + 'mac_pppoe_ipcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)' + ] + +} + +mac_pppoe_pay_l2_src_only_session_id = { + 'sub_casename': 'mac_pppoe_pay_l2_src_only_session_id', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / end actions rss types eth l2-src-only pppoe end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_lcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_lcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_lcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_lcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_lcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_lcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_ipcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_ipcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_ipcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_ipcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipcp_pay'}, + }, + { + 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_ipcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipcp_pay'}, + }, + + { + 'send_packet': mac_pppoe_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [mac_pppoe_pay_l2_src_only_session_id_packets[key][i] for i in range(0, 4) for key in + ['mac_pppoe_lcp_pay', 'mac_pppoe_ipcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + + +mac_pppoe_ipv4_pay_packets = { + 'mismatch': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=5)/Raw("x"*80)'] +} + +mac_pppoe_ipv4_pay = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/Raw("x"*80)' +] + +mac_pppoe_ipv4_frag = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5", frag=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5", frag=3)/Raw("x"*80)' +] + +mac_pppoe_ipv4_pay_src_test = [ + { + 'send_packet': mac_pppoe_ipv4_pay[0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay[1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay[2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[0], + 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, +] + +mac_pppoe_ipv4_pay_dst_test = [ + { + 'send_packet': mac_pppoe_ipv4_pay[0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay[2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay[1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[0], + 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, +] + +mac_pppoe_ipv4_pay_src_dst_test = [ + { + 'send_packet': mac_pppoe_ipv4_pay[0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay[1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay[2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay[3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay[-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[0], + 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_frag[-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, +] + +mac_pppoe_ipv4_pay_post_test = [ + { + 'send_packet': [item for item in mac_pppoe_ipv4_pay + mac_pppoe_ipv4_frag], + 'action': 'check_no_hash', + }, + ], + +mac_pppoe_ipv4_pay_l2_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_pay_l2_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types eth l2-src-only end key_len 0 queues end / end', + 'test': mac_pppoe_ipv4_pay_src_test, + 'post-test': mac_pppoe_ipv4_pay_post_test +} + +mac_pppoe_ipv4_pay_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_pay_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types eth l2-dst-only end key_len 0 queues end / end', + 'test': mac_pppoe_ipv4_pay_dst_test, + 'post-test': mac_pppoe_ipv4_pay_post_test +} + +mac_pppoe_ipv4_pay_l2_src_only_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_pay_l2_src_only_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types eth end key_len 0 queues end / end', + 'test': mac_pppoe_ipv4_pay_src_dst_test, + 'post-test': mac_pppoe_ipv4_pay_post_test +} + + +mac_pppoe_ipv4_pay_l3_src_only_packets = { + 'mac_pppoe_ipv4_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:54", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/Raw("x"*80)', + ], + 'mac_pppoe_ipv4_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:54", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7", frag=3)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_pay_l3_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_pay_l2_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_frag'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_frag'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, + }, + + { + 'send_packet': mac_pppoe_ipv4_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_pay'] + + mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_frag'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_pay_l3_dst_only_packets = { + 'mac_pppoe_ipv4_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.3")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.7", dst="192.168.1.2")/Raw("x"*80)', + ], + 'mac_pppoe_ipv4_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.3", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.7", dst="192.168.1.2", frag=3)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_pay_l3_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_pay_l3_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_frag'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_frag'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_pay'] + + mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_frag']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets = { + 'mac_pppoe_ipv4_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)' + ], + 'mac_pppoe_ipv4_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=3)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv4_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'] + + mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_packets = { + 'mismatch': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:' + '910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=25,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l2_src_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l2_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l2_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types eth l2-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_l2_dst_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types eth l2-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + + { + 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], + +} + +mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types eth end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], + +} + +mac_pppoe_ipv4_udp_pay_l3_src_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l3_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + + { + 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_l3_dst_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l3_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_l4_src_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=9,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/UDP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + + { + 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_l4_dst_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/UDP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l4-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + + { + 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.9")/UDP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.3")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)' + + ] +} + +mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets = { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/UDP(sport=19,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_udp_pay'][4], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_udp_pay'][5], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_ipv4_packets = { + 'mac_pppoe_ipv4_udp_pay':[ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=99)/Raw("x"*80)', + ] +} + +mac_pppoe_ipv4_udp_pay_ipv4 = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_ipv4', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_packets = { + 'mismatch': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/' + 'IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=25,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l2_src_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/TCP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l2_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l2_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types eth l2-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_packets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_packets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_packets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l2_src_only_packets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l2_dst_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/TCP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types eth l2-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/TCP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types eth end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l3_src_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l3_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_packets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_packets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_packets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l3_src_only_packets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l3_dst_only_pakets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l3_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_pakets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_pakets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_pakets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l3_dst_only_pakets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l4_src_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/TCP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l4_dst_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/TCP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l4-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.9")/TCP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=9,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=9,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only l4-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=90)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=25,dport=90)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only l4-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.5")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/TCP(sport=19,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)' + + ] +} + +mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_tcp_pay'][4], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_tcp_pay'][5], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv4_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_ipv4_packets = { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=19,dport=99)/Raw("x"*80)', + ] +} + +mac_pppoe_ipv4_tcp_pay_ipv4 = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_ipv4', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets[ + 'mac_pppoe_ipv4_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets['mac_pppoe_ipv4_tcp_pay'], + 'action': 'check_no_hash', + }, + ], +} +mac_pppoe_ipv6_pay_packets = { + 'mismatch': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_pay_l2_src_only_packets = { + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)' + ], + 'mac_pppoe_ipv6_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/Raw("x"*80)', + ] +} + +mac_pppoe_ipv6_pay_l2_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_pay_l2_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types eth l2-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_frag'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_frag'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_frag']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_pay_l2_dst_only_packets = { + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)' + ], + 'mac_pppoe_ipv6_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/Raw("x"*80)' + ] + +} + +mac_pppoe_ipv6_pay_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_pay_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types eth l2-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_pay'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_frag'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_frag'][2], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_frag']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets = { + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)' + ], + 'mac_pppoe_ipv6_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/Raw("x"*80)' + + ] +} + +mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types eth end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_pay_l3_src_only_packets = { + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:54", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)', + ], + 'mac_pppoe_ipv6_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:54", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/Raw("x"*80)', + + ] +} + +mac_pppoe_ipv6_pay_l3_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_pay_l3_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_frag'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_frag'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_frag']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_pay_l3_dst_only_packets = { + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)' + ], + 'mac_pppoe_ipv6_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)' + + ] +} + +mac_pppoe_ipv6_pay_l3_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_pay_l3_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_frag'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_frag'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_frag']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets = { + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)' + ], + 'mac_pppoe_ipv6_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)' + + ] +} + +mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, + }, + + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_packets = { + 'mismatch': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l2_src_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l2_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l2_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types eth l2-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_l2_src_only_packets['mac_pppoe_ipv6_udp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l2_dst_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types eth l2-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types eth end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l3_src_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l3_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6-udp l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_udp_pay_l3_src_only_packets['mac_pppoe_ipv6_udp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l3_dst_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=99)/Raw("x"*80)' + + ] +} + +mac_pppoe_ipv6_udp_pay_l3_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_udp_pay_l3_dst_only_packets['mac_pppoe_ipv6_udp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l4_src_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_udp_pay_l4_src_only_packets['mac_pppoe_ipv6_udp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l4_dst_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6-udp l4-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_udp_pay_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/UDP(sport=19,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6-udp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_udp_pay'][4], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_udp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_udp_pay_ipv6_packets = { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1538", dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=99)/Raw("x"*80)', + ] +} + +mac_pppoe_ipv6_udp_pay_ipv6 = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_ipv6', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_ipv6_packets[ + 'mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_ipv6_packets[ + 'mac_pppoe_ipv6_udp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_ipv6_packets[ + 'mac_pppoe_ipv6_udp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_ipv6_packets[ + 'mac_pppoe_ipv6_udp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_ipv6_packets[ + 'mac_pppoe_ipv6_udp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet':mac_pppoe_ipv6_udp_pay_ipv6_packets['mac_pppoe_ipv6_udp_pay'], + 'action': 'check_no_hash', + }, + ], + +} + +mac_pppoe_ipv6_tcp_pay_packets = { + 'mismatch': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l2_src_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l2_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l2_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types eth l2-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l2_src_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], + +} + +mac_pppoe_ipv6_tcp_pay_l2_dst_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x"*80)', + ] +} + +mac_pppoe_ipv6_tcp_pay_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types eth l2-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types eth end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay_l3_src_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l3_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l3_src_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay_l3_dst_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l3_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l3_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay_l4_src_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l4-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay_l4_dst_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l4-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l4-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l4-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], + +} + +mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only l4-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only l4-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/TCP(sport=19,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)' + ] +} + +mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_tcp_pay'][4], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_tcp_pay'][5], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ + 'mac_pppoe_ipv6_tcp_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay_ipv6_packets = { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1538", dst="CDCD:910A:2222:5498:8475:1111:3900:2024")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=99)/Raw("x"*80)', + ] +} + +mac_pppoe_ipv6_tcp_pay_ipv6 = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_ipv6', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'][2], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'][-1], + 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv6_tcp_pay = [ + mac_pppoe_ipv6_tcp_pay_l2_src_only, + mac_pppoe_ipv6_tcp_pay_l2_dst_only, + mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only, + mac_pppoe_ipv6_tcp_pay_l3_src_only, + mac_pppoe_ipv6_tcp_pay_l3_dst_only, + mac_pppoe_ipv6_tcp_pay_l4_src_only, + mac_pppoe_ipv6_tcp_pay_l4_dst_only, + mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only, + mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only, + mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only, + mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only, + mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only, + mac_pppoe_ipv6_tcp_pay_ipv6 +] + +mac_pppoe_ipv6_udp_pay = [ + mac_pppoe_ipv6_udp_pay_l2_src_only, + mac_pppoe_ipv6_udp_pay_l2_dst_only, + mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only, + mac_pppoe_ipv6_udp_pay_l3_src_only, + mac_pppoe_ipv6_udp_pay_l3_dst_only, + mac_pppoe_ipv6_udp_pay_l4_src_only, + mac_pppoe_ipv6_udp_pay_l4_dst_only, + mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only, + mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only, + mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only, + mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only, + mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only, + mac_pppoe_ipv6_udp_pay_ipv6 + +] + +mac_pppoe_ipv6_pay = [ + mac_pppoe_ipv6_pay_l2_src_only, + mac_pppoe_ipv6_pay_l2_dst_only, + mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only, + mac_pppoe_ipv6_pay_l3_src_only, + mac_pppoe_ipv6_pay_l3_dst_only, + mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only +] + +mac_pppoe_ipv4_tcp_pay = [ + mac_pppoe_ipv4_tcp_pay_l2_src_only, + mac_pppoe_ipv4_tcp_pay_l2_dst_only, + mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only, + mac_pppoe_ipv4_tcp_pay_l3_src_only, + mac_pppoe_ipv4_tcp_pay_l3_dst_only, + mac_pppoe_ipv4_tcp_pay_l4_src_only, + mac_pppoe_ipv4_tcp_pay_l4_dst_only, + mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only, + mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only, + mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only, + mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only, + mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only, + mac_pppoe_ipv4_tcp_pay_ipv4 +] + +mac_pppoe_ipv4_udp_pay = [ + mac_pppoe_ipv4_udp_pay_l2_src_only, + mac_pppoe_ipv4_udp_pay_l2_dst_only, + mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only, + mac_pppoe_ipv4_udp_pay_l3_src_only, + mac_pppoe_ipv4_udp_pay_l3_dst_only, + mac_pppoe_ipv4_udp_pay_l4_src_only, + mac_pppoe_ipv4_udp_pay_l4_dst_only, + mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only, + mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only, + mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only, + mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only, + mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only, + mac_pppoe_ipv4_udp_pay_ipv4, + ] + +mac_pppoe_ipv4_pay_cases = [ + mac_pppoe_ipv4_pay_l2_src_only, + mac_pppoe_ipv4_pay_l2_dst_only, + mac_pppoe_ipv4_pay_l2_src_only_l2_dst_only, + mac_pppoe_ipv4_pay_l3_src_only, + mac_pppoe_ipv4_pay_l3_dst_only, + mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only +] + +mac_pppoe_pay = [ + mac_pppoe_pay_l2_src_only, + mac_pppoe_pay_l2_dst_only, + mac_pppoe_pay_l2_src_only_l2_dst_only, + mac_pppoe_pay_session_id, + mac_pppoe_pay_l2_src_only_session_id +] + +mac_pppoe_ipv6_tcp_pay_symmetric_packets = { + 'match': { + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=23,dport=25)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=23,dport=25)/Raw("x"*80)' + ], + }, + 'mismatch': { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=23,dport=25)/Raw("x"*80)' + ], + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=23,dport=25)/Raw("x"*80)', + ], + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' + ], + 'mac_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=23,dport=25)/Raw("x"*80)' + ] + } + +} + +mac_pppoe_ipv6_tcp_pay_symmetric = { + 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_symmetric', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss func symmetric_toeplitz types ipv6-tcp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][1], + 'action': {'check_hash_same': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][2], + 'action': {'check_hash_same': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][3], + 'action': {'check_hash_same': 'mac_pppoe_ipv6_tcp_pay'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_tcp_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_udp_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_ipv6_tcp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_ipv6_tcp_pay'][1:], + 'action': {'check_hash_different': 'mac_ipv6_tcp_pay_mismatch'}, + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay_match_post'}, + }, + { + 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][3], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay_match_post'}, + }, + ], +} + +mac_pppoe_ipv6_udp_pay_symmetric_packets = { + 'match': { + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=23,dport=25)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=23,dport=25)/Raw("x"*80)' + ] + }, + 'mismatch': { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=23,dport=25)/Raw("x"*80)' + ], + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=23,dport=25)/Raw("x"*80)', + ], + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' + ], + 'mac_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=23,dport=25)/Raw("x"*80)' + ] + } +} + +mac_pppoe_ipv6_udp_pay_symmetric = { + 'sub_casename': 'mac_pppoe_ipv6_udp_pay_symmetric', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss func symmetric_toeplitz types ipv6-udp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][1], + 'action': {'check_hash_same': 'mac_pppoe_ipv6_udp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][2], + 'action': {'check_hash_same': 'mac_pppoe_ipv6_udp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][3], + 'action': {'check_hash_same': 'mac_pppoe_ipv6_udp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_udp_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_tcp_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_ipv6_udp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_ipv6_udp_pay'][1:], + 'action': {'check_hash_different': 'mac_ipv6_udp_pay_mismatch'}, + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay_match_post'}, + }, + { + 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay_match_post'}, + }, + ], +} + +mac_pppoe_ipv6_pay_symmetric_packets = { + 'match': { + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' + ], + 'mac_pppoe_ipv6_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/IPv6ExtHdrFragment()/Raw("x"*80)' + ] + }, + 'mismatch': { + 'mac_pppoe_ipv4_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + ], + 'mac_pppoe_ipv4_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1", frag=5)/Raw("x"*80)' + ], + 'mac_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' + ], + 'mac_ipv6_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/IPv6ExtHdrFragment()/Raw("x"*80)' + ] + } +} + +mac_pppoe_ipv6_pay_symmetric = { + 'sub_casename': 'mac_pppoe_ipv6_pay_symmetric', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss func symmetric_toeplitz types ipv6 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['match']['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['match']['mac_pppoe_ipv6_pay'][1:], + 'action': {'check_hash_same': 'mac_pppoe_ipv6_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['match']['mac_pppoe_ipv6_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_frag_match'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['match']['mac_pppoe_ipv6_frag'][1:], + 'action': {'check_hash_same': 'mac_pppoe_ipv6_frag_match'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_frag_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_frag'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_ipv6_pay'][0], + 'action': {'save_hash': 'mac_ipv6_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_ipv6_pay'][1:], + 'action': {'check_hash_different': 'mac_ipv6_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_ipv6_frag'][0], + 'action': {'save_hash': 'mac_ipv6_frag_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_ipv6_frag'][1:], + 'action': {'check_hash_different': 'mac_ipv6_frag_mismatch'}, + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['match']['mac_pppoe_ipv6_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_pay_symmetric_packets = { + 'match': { + 'mac_pppoe_ipv4_pay': [ + 'Ether(src="00:11:22:33:44:55",dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55",dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/Raw("x"*80)', + ], + 'mac_pppoe_ipv4_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1", frag=5)/Raw("x"*80)', + ] + }, + 'mismatch': { + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' + ], + 'mac_pppoe_ipv6_frag': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/IPv6ExtHdrFragment()/Raw("x"*80)' + ], + 'mac_ipv4_pay': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.21",dst="192.168.0.20")/Raw("x"*80)' + ], + 'mac_ipv4_frag': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=5)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.21",dst="192.168.0.20", frag=5)/Raw("x"*80)' + ] + } +} + +mac_pppoe_ipv4_pay_symmetric = { + 'sub_casename': 'mac_pppoe_ipv4_pay_symmetric', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['match']['mac_pppoe_ipv4_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['match']['mac_pppoe_ipv4_pay'][1], + 'action': {'check_hash_same': 'mac_pppoe_ipv4_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['match']['mac_pppoe_ipv4_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_frag_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['match']['mac_pppoe_ipv4_frag'][1], + 'action': {'check_hash_same': 'mac_pppoe_ipv4_frag_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_frag'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_frag_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_frag'][1], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_ipv4_pay'][0], + 'action': {'save_hash': 'mac_ipv4_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_ipv4_pay'][1], + 'action': {'check_hash_different': 'mac_ipv4_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_ipv4_frag'][0], + 'action': {'save_hash': 'mac_ipv4_frag_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_ipv4_frag'][1], + 'action': {'check_hash_different': 'mac_ipv4_frag_mismatch'}, + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in + mac_pppoe_ipv4_pay_symmetric_packets['match']['mac_pppoe_ipv4_pay']], + 'action': 'check_no_hash', + }, + ], +} + +mac_pppoe_ipv4_udp_pay_symmetric_packets = { + 'match': { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=23,dport=25)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/UDP(sport=23,dport=25)/Raw("x"*80)' + ], + }, + 'mismatch': { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/TCP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=23,dport=19)/Raw("x"*80)', + ], + 'mac_pppoe_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=23,dport=25)/Raw("x"*80)', + + ], + 'mac_pppoe_ipv4_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)' + ], + 'mac_ipv4_udp_pay': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.21",dst="192.168.0.20")/UDP(sport=23,dport=25)/Raw("x"*80)' + ] + } +} + +mac_pppoe_ipv4_udp_pay_symmetric = { + 'sub_casename': 'mac_pppoe_ipv4_udp_pay_symmetric', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][1], + 'action': {'check_hash_same': 'mac_pppoe_ipv4_udp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][2], + 'action': {'check_hash_same': 'mac_pppoe_ipv4_udp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][3], + 'action': {'check_hash_same': 'mac_pppoe_ipv4_udp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_tcp_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_udp_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_ipv4_udp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_ipv4_udp_pay'][1:], + 'action': {'check_hash_different': 'mac_ipv4_udp_pay_mismatch'}, + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_ipv4_udp_pay_match_post'}, + }, + { + 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][1:], + 'action': {'check_hash_different': 'mac_ipv4_udp_pay_match_post'}, + }, + ], +} + +mac_pppoe_ipv4_tcp_pay_symmetric_packets = { + 'match': { + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=23,dport=25)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/TCP(sport=23,dport=25)/Raw("x"*80)' + ] + }, + 'mismatch': { + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=23,dport=25)/Raw("x"*80)', + ], + 'mac_pppoe_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=23,dport=25)/Raw("x"*80)', + ], + 'mac_pppoe_ipv4_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)' + ], + 'mac_ipv4_tcp_pay': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.21",dst="192.168.0.20")/TCP(sport=23,dport=25)/Raw("x"*80)' + ] + } +} + +mac_pppoe_ipv4_tcp_pay_symmetric = { + 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_symmetric', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][1], + 'action': {'check_hash_same': 'mac_pppoe_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][2], + 'action': {'check_hash_same': 'mac_pppoe_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][3], + 'action': {'check_hash_same': 'mac_pppoe_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_udp_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_tcp_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_ipv4_tcp_pay_mismatch'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_ipv4_tcp_pay'][1:], + 'action': {'check_hash_different': 'mac_ipv4_tcp_pay_mismatch'}, + }, + ], + 'post-test': [ + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_match_post'}, + }, + { + 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][3], + 'action': {'check_hash_different', 'mac_pppoe_ipv4_tcp_pay_match_post'} + }, + ], +} + +simple_xor_packets = { + 'match': { + 'mac_pppoe_ipv4_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)' + ], + 'mac_pppoe_ipv4_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/UDP(sport=25,dport=23)/Raw("x"*80)' + ], + 'mac_pppoe_ipv4_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/TCP(sport=25,dport=23)/Raw("x"*80)' + ], + 'mac_pppoe_ipv6_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' + ], + 'mac_ipv6_udp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=25,dport=23)/Raw("x"*80)' + ], + 'mac_ipv6_tcp_pay': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=25,dport=23)/Raw("x"*80)' + ] + + } +} + +simple_xor = { + 'sub_casename': 'simple_xor', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern end actions rss func simple_xor key_len 0 queues end / end', + 'test': [ + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_pay'][1:], + 'action': {'check_hash_same': 'mac_pppoe_ipv4_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_udp_pay'][1:], + 'action': {'check_same': 'mac_pppoe_ipv4_udp_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_tcp_pay'][1:], + 'action': {'check_same': 'mac_pppoe_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv6_pay'][1:], + 'action': {'check_same': 'mac_pppoe_ipv6_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_ipv6_udp_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_ipv6_udp_pay'][1:], + 'action': {'check_same': 'mac_ipv6_udp_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_ipv6_tcp_pay_match'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_ipv6_tcp_pay'][1:], + 'action': {'check_same': 'mac_ipv6_tcp_pay_match'}, + }, + + ], + 'post-test': [ + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_pay'][1:], + 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_udp_pay'][1:], + 'action': {'check_same': 'mac_pppoe_ipv4_udp_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_tcp_pay'][1:], + 'action': {'check_same': 'mac_pppoe_ipv4_tcp_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv6_pay'][0], + 'action': {'save_hash': 'mac_pppoe_ipv6_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv6_pay'][1:], + 'action': {'check_same': 'mac_pppoe_ipv6_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_ipv6_udp_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_ipv6_udp_pay'][1:], + 'action': {'check_same': 'mac_ipv6_udp_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_ipv6_tcp_pay_match_post'}, + }, + { + 'send_packet': simple_xor_packets['match']['mac_ipv6_tcp_pay'][1:], + 'action': {'check_same': 'mac_ipv6_tcp_pay_match_post'}, + }, + ], +} + +mac_vlan_ipv4_pay_packets = { + 'match': { + 'mac_vlan_ipv4_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/Raw("x" * 80)', + ], + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' + ] +} + +mac_vlan_ipv4_pay = { + 'sub_casename': 'mac_vlan_ipv4_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv4_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv4_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv4_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_pay_packets['mismatch'][0], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv4_udp_pay_packets = { + 'match': { + 'mac_vlan_ipv4_udp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/UDP(sport=19,dport=99)/Raw("x" * 80)', + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' + ] +} + +mac_vlan_ipv4_udp_pay = { + 'sub_casename': 'mac_vlan_ipv4_udp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / udp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv4_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv4_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv4_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv4_tcp_pay_packets = { + 'match': { + 'mac_vlan_ipv4_tcp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/TCP(sport=19,dport=99)/Raw("x" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)' + ] +} + +mac_vlan_ipv4_tcp_pay = { + 'sub_casename': 'mac_vlan_ipv4_tcp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / tcp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_tcp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv4_sctp_pay_packets = { + 'match': { + 'mac_vlan_ipv4_sctp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.5")/SCTP(sport=19,dport=99)/Raw("x" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)' + + ] +} + +mac_vlan_ipv4_sctp_pay = { + 'sub_casename': 'mac_vlan_ipv4_sctp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / sctp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv4_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv4_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv4_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_sctp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv6_pay_packets = { + 'match': { + 'mac_vlan_ipv6_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("y" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' + ] +} + +mac_vlan_ipv6_pay = { + 'sub_casename': 'mac_vlan_ipv6_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv6_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv6_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv6_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv6_udp_pay_packets = { + 'match': { + 'mac_vlan_ipv6_udp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=23,dport=99)/Raw("x" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)' + ] +} + +mac_vlan_ipv6_udp_pay = { + 'sub_casename': 'mac_vlan_ipv6_udp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / udp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv6_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv6_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv6_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv6_tcp_pay_packets = { + 'match': { + 'mac_vlan_ipv6_tcp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' + ] +} + +mac_vlan_ipv6_tcp_pay = { + 'sub_casename': 'mac_vlan_ipv6_tcp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / tcp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv6_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv6_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv6_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_tcp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv6_sctp_pay_packets = { + 'match': { + 'mac_vlan_ipv6_sctp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/SCTP(sport=25,dport=99)/Raw("x" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' + ] +} + +mac_vlan_ipv6_sctp_pay = { + 'sub_casename': 'mac_vlan_ipv6_sctp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / sctp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv6_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv6_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv6_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_sctp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_pppoe_pay_l2_src_only_packets = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=7)/Raw("x"*80)' +] + +mac_vlan_pppoe_pay_l2_src_only = { + 'sub_casename': 'mac_vlan_pppoe_pay_l2_src_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / pppoes / end actions rss types eth l2-src-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[0], + 'action': {'save_hash': 'l2_src_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[1], + 'action': {'check_hash_different': 'l2_src_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[2], + 'action': {'check_hash_same': 'l2_src_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[3], + 'action': {'check_hash_same': 'l2_src_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[4], + 'action': {'check_hash_same': 'l2_src_only'}, + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[1], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_pppoe_pay_l2_dst_only_packets = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=7)/Raw("x"*80)' +] + +mac_vlan_pppoe_pay_l2_dst_only = { + 'sub_casename': 'mac_vlan_pppoe_pay_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / pppoes / end actions rss types eth l2-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[0], + 'action': {'save_hash': 'l2_dst_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[1], + 'action': {'check_hash_different': 'l2_dst_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[2], + 'action': {'check_hash_same': 'l2_dst_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[3], + 'action': {'check_hash_same': 'l2_dst_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[4], + 'action': {'check_hash_same': 'l2_dst_only'}, + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[1], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=7)/Raw("x"*80)' +] + +mac_vlan_pppoe_pay_l2_src_only_l2_dst_only = { + 'sub_casename': 'mac_vlan_pppoe_pay_l2_src_only_l2_dst_only', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / pppoes / end actions rss types eth l2-src-only l2-dst-only end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[0], + 'action': {'save_hash': 'l2_src_only_l2_dst_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[1], + 'action': {'check_hash_different': 'l2_src_only_l2_dst_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[2], + 'action': {'check_hash_same': 'l2_src_only_l2_dst_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[3], + 'action': {'check_hash_same': 'l2_src_only_l2_dst_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[4], + 'action': {'check_hash_same': 'l2_src_only_l2_dst_only'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[5], + 'action': {'check_hash_same': 'l2_src_only_l2_dst_only'}, + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[1], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_pppoe_pay_c_vlan_packets = [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=7)/Raw("x" * 80)' +] + +mac_vlan_pppoe_pay_c_vlan = { + 'sub_casename': 'mac_vlan_pppoe_pay_c_vlan', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / pppoes / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[0], + 'action': {'save_hash': 'c_vlan'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[1], + 'action': {'check_hash_different': 'c_vlan'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[2], + 'action': {'check_hash_same': 'c_vlan'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[3], + 'action': {'check_hash_same': 'c_vlan'}, + }, + { + 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[4], + 'action': {'check_hash_same': 'c_vlan'}, + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[1], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_pppoe_pay = [ + mac_vlan_pppoe_pay_l2_src_only, + mac_vlan_pppoe_pay_l2_dst_only, + mac_vlan_pppoe_pay_l2_src_only_l2_dst_only, + mac_vlan_pppoe_pay_c_vlan +] + + +class Advanced_rss_pppoe_vlan_ah_l2tp_pfcp(TestCase): + + def set_up_all(self): + """ + Run at the start of each test suite. + Generic filter Prerequistites + """ + + # 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.pci_list = [] + for port in self.dut.ports_info: + self.pci_list.append(port['pci']) + self.pkt = Packet() + self.pmd_output = PmdOutput(self.dut) + self.ddp_dir = "/lib/firmware/updates/intel/ice/ddp/" + conf_file = 'conf/cvl_advanced_rss_pppoe.cfg' + conf_info = UserConf(conf_file) + conf_section = conf_info.conf._sections['suite'] + self.os_default_package = conf_section['os_default_package_file_location'] + self.comms_package = conf_section['comms_package_file_location'] + self.symmetric = False + self.rxq = 64 + self.rsspro = RssProcessing(self, self.pmd_output, [self.tester_iface0, self.tester_iface1], self.rxq) + self.logger.info('rssprocess.tester_ifaces: {}'.format(self.rsspro.tester_ifaces)) + self.logger.info('rssprocess.test_case: {}'.format(self.rsspro.test_case)) + + def set_up(self): + """ + Run before each test case. + """ + pass + + def tear_down(self): + """ + Run after each test case. + """ + # 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") + self.dut.kill_all() + + def tear_down_all(self): + """ + Run after each test suite. + """ + self.dut.kill_all() + + def replace_package(self, package='comms'): + ice_pkg_path = ''.join([self.ddp_dir,"ice.pkg"]) + self.dut.send_expect("rm -f {}".format(ice_pkg_path), "# ") + if package == 'os_default': + self.dut.send_expect("cp {} {}".format(self.os_default_package,ice_pkg_path), "# ") + elif package == 'comms': + self.dut.send_expect("cp {} {}".format(self.comms_package,ice_pkg_path), "# ") + for pci in self.pci_list: + self.dut.send_expect("echo {0} > /sys/bus/pci/devices/{0}/driver/unbind".format(pci), "# ", 60) + self.dut.send_expect("echo {} > /sys/bus/pci/drivers/ice/bind".format(pci), "# ", 60) + pci_str = ' '.join(self.pci_list) + self.dut.send_expect("./usertools/dpdk-devbind.py --force --bind=vfio-pci {}".format(pci_str), "# ", 60) + + def launch_testpmd(self, symmetric=False, package='comms'): + if symmetric: + param = "--rxq=64 --txq=64" + else: + param = "--rxq=64 --txq=64 --disable-rss --rxd=384 --txd=384" + out = self.pmd_output.start_testpmd(cores="1S/4C/1T", param=param, + eal_param=f"-w {self.pci_list[0]}", socket=self.ports_socket) + self.symmetric = symmetric + package_version = re.search('Active\spackage\sis:\s(.+),', out).group(1) + self.logger.info('DDP package version: %s' % package_version) + if package == 'comms': + self.verify(package_version in self.comms_package.split('/')[-1], + 'package version not match') + elif package == 'os_default': + self.verify(package_version in self.os_default_package.split('/')[-1], + 'package version not match') + if symmetric: + # 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') + return package_version + + def switch_testpmd(self, symmetric=True, pkg='comms'): + self.dut.kill_all() + self.launch_testpmd(symmetric, pkg) + self.pmd_output.execute_cmd("start") + + def _gener_str(self, str_len=6): + return ''.join(random.sample(string.ascii_letters + string.digits, k=str_len)) + + def test_mac_ipv4_pfcp_session(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_pfcp_session) + + def test_mac_ipv6_pfcp_session(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_pfcp_session) + + def test_mac_ipv4_l2tpv3(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_l2tpv3) + + def test_mac_ipv6_l2tpv3(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_l2tpv3) + + def test_mac_ipv4_esp(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_esp) + + def test_mac_ipv4_udp_esp(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_udp_esp) + + def test_mac_ipv6_esp(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_esp) + + def test_mac_ipv6_udp_esp(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_udp_esp) + + def test_mac_ipv4_ah(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_ah) + + def test_mac_ipv6_ah(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_ah) + + def test_mac_pppoe_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_pay) + + def test_mac_pppoe_ipv4_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_pay_cases) + + def test_mac_pppoe_ipv4_udp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_udp_pay) + + def test_mac_pppoe_ipv4_tcp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_tcp_pay) + + def test_mac_pppoe_ipv6_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_pay) + + def test_mac_pppoe_ipv6_udp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_udp_pay) + + def test_mac_pppoe_ipv6_tcp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_tcp_pay) + + def test_mac_pppoe_ipv4_pay_symmetric(self): + self.switch_testpmd(symmetric=True) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_pay_symmetric) + + def test_mac_pppoe_ipv4_udp_pay_symmetric(self): + self.switch_testpmd(symmetric=True) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_udp_pay_symmetric) + + def test_mac_pppoe_ipv4_tcp_pay_symmetric(self): + self.switch_testpmd(symmetric=True) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_tcp_pay_symmetric) + + def test_mac_pppoe_ipv6_pay_symmetric(self): + self.switch_testpmd(symmetric=True) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_pay_symmetric) + + def test_mac_pppoe_ipv6_udp_pay_symmetric(self): + self.switch_testpmd(symmetric=True) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_udp_pay_symmetric) + + def test_mac_pppoe_ipv6_tcp_pay_symmetric(self): + self.switch_testpmd(symmetric=True) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_tcp_pay_symmetric) + + def test_simple_xor(self): + self.switch_testpmd(symmetric=True) + self.rsspro.handle_rss_distribute_cases(cases_info=simple_xor) + + def test_multirules_two_rules_not_hit_default_profile(self): + """ + Subcase 1: two rules with same pattern but different hash input set, not hit default profile + :return: + """ + self.rsspro.error_msgs = [] + self.switch_testpmd(symmetric=True) + rule0 = 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end' + self.rsspro.create_rule(rule0) + self.rsspro.check_rule(0) + pkts_list1 = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)'] + out = self.rsspro.send_pkt_get_output(pkts_list1[0]) + pkt1_first_key = 'l3_src' + self.rsspro.save_hash(out, pkt1_first_key) + res = self.rsspro.send_pkt_get_output(pkts_list1[1]) + self.rsspro.check_hash_different(res, pkt1_first_key) + + rule1 = 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end' + self.rsspro.create_rule(rule1) + pkts_list2 = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + ] + self._send_pkt_action(pkts_list2) + + pkts_list3 = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)'] + + for i in range(1, 3): + self.rsspro.destroy_rule(rule_id=i % 2) + self.rsspro.check_rule(rule_list='rule{}'.format(i % 2), stats=False) + pkt_base = 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)' + res3 = self.rsspro.send_pkt_get_output(pkt_base) + pkt3_key = 'hash_record_{}'.format(i % 2) + self.rsspro.save_hash(res3, pkt3_key) + for each_rule in pkts_list3: + result = self.rsspro.send_pkt_get_output(each_rule) + self.rsspro.check_hash_different(result, pkt3_key) + self.verify(not self.rsspro.error_msgs, 'some subcases failed') + + def test_multirules_two_rules_hit_default_profile(self): + """ + # Subcase 2: two rules with same pattern but different hash input set, hit default profile + :return: + """ + self.rsspro.error_msgs = [] + self.switch_testpmd(symmetric=True) + rule_list = [ + 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end' + + ] + pkt_list = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.5")/Raw("x"*80)', + ] + self._two_rules_operation(rule_list, pkt_list,action_list1=['check_no_hash' for _ in range(0,len(pkt_list))],action_list2=['check_no_hash']) + self.verify(not self.rsspro.error_msgs, 'some subcases failed') + + def _send_pkt_action(self, pkt_list, action_list=None): + if action_list is None: + action_list = ['save_hash', 'check_hash_different', 'check_hash_same'] + hash_key = self._gener_str() + for i in range(0, len(pkt_list)): + out = self.rsspro.send_pkt_get_output(pkt_list[i]) + func = getattr(self.rsspro, action_list[i]) + func(out, hash_key) + + def _two_rules_operation(self, rule_list, pkt_list, action_list1=None, action_list2=None): + for i in range(0, len(rule_list)): + self.rsspro.create_rule(rule_list[i]) + self.rsspro.check_rule(rule_list=['{}'.format(i)]) + if i == 1: + pkt_list[1], pkt_list[2] = pkt_list[2], pkt_list[1] + self._send_pkt_action(pkt_list) + else: + self._send_pkt_action(pkt_list) + # destory rule 1 + self.rsspro.destroy_rule(rule_id=1) + self.rsspro.check_rule(rule_list=['1'], stats=False) + pkt_list[1], pkt_list[2] = pkt_list[2], pkt_list[1] + self._send_pkt_action(pkt_list, action_list=action_list1) + # destory rule 0 + self.rsspro.destroy_rule(rule_id=0) + self.rsspro.check_rule(rule_list=['0'], stats=False) + self._send_pkt_action([pkt_list[0]], action_list=action_list2) + + def test_two_rules_smaller_first_larger_later(self, ): + """ + two rules, scope smaller created first, and the larger one created later + """ + self.rsspro.error_msgs = [] + self.switch_testpmd(symmetric=True) + rule_list = [ + 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end' + ] + pkt_list = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=25,dport=99)/Raw("x"*80)', + ] + self._two_rules_operation(rule_list, pkt_list, action_list2=['check_no_hash']) + self.verify(not self.rsspro.error_msgs, 'some subcases failed') + + def test_two_rules_larger_first_smaller_later(self): + """ + Subcase 4: two rules, scope larger created first, and the smaller one created later + """ + self.rsspro.error_msgs = [] + self.switch_testpmd(symmetric=True) + rule_list = [ + 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end' + ] + pkt_list = [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=25,dport=99)/Raw("x"*80)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', + ] + self._two_rules_operation(rule_list, pkt_list, action_list2=['check_no_hash']) + + def test_wrong_hash_input_set(self): + self.switch_testpmd(symmetric=True) + rule_list = [ + 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types l2-src-only l2-dst-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-tcp end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp l3-src-only end key_len 0 queues end / end'] + + for rule in rule_list: + self.rsspro.validate_rule(rule, check_stats=False, check_msg='Invalid argument') + self.rsspro.create_rule(rule, check_stats=False, msg='Invalid argument') + + def test_void_action(self): + self.switch_testpmd(symmetric=True) + rule = 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions end' + self.rsspro.validate_rule(rule, check_stats=False, check_msg='Invalid argument') + self.rsspro.create_rule(rule, check_stats=False, msg='Invalid argument') + self.rsspro.check_rule(stats=False, rule_list=[rule]) + + def test_delete_nonexisting_rule(self): + self.switch_testpmd(symmetric=True) + self.rsspro.check_rule(stats=False) + out = self.dut.send_command("flow destroy 0 rule 0", timeout=1) + self.verify('error' not in out, 'delete nonexisting rule raise err,expected no err') + self.dut.send_command("flow flush 0", timeout=1) + + def test_unsupported_pattern_with_OS_default_package(self): + self.replace_package('os_default') + self.switch_testpmd(symmetric=True, pkg='os_default') + rule_list = [ + 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / esp / end actions rss types esp end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / ah / end actions rss types ah end key_len 0 queues end / end' + ] + self.rsspro.validate_rule(rule_list, check_stats=False, check_msg='Invalid argument') + self.rsspro.create_rule(rule_list, check_stats=False, msg='Invalid argument') + self.rsspro.check_rule(stats=False) + self.dut.kill_all() + self.replace_package('comms') + self.launch_testpmd() + + def test_invalid_port(self): + self.switch_testpmd(symmetric=True) + rule = 'flow create 1 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end' + self.rsspro.create_rule(rule, check_stats=False, msg='No such device') + self.rsspro.check_rule(stats=False, rule_list=[rule]) + pattern = 'Invalid port 1' + out = self.dut.send_command("flow list 1", timeout=1) + result = re.search(r'%s' % pattern, out) + self.verify(result, 'actual result not match expected,expected result is:{}'.format(pattern)) + + def test_mac_vlan_ipv4_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_pay) + + def test_mac_vlan_ipv4_udp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_udp_pay) + + def test_mac_vlan_ipv4_tcp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_tcp_pay) + + def test_mac_vlan_ipv4_sctp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_sctp_pay) + + def test_mac_vlan_ipv6_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_pay) + + def test_mac_vlan_ipv6_udp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_udp_pay) + + def test_mac_vlan_ipv6_tcp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_tcp_pay) + + def test_mac_vlan_ipv6_sctp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_sctp_pay) + + def test_mac_vlan_pppoe_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_pppoe_pay) diff --git a/tests/TestSuite_cvl_advanced_rss_pppoe_vlan_esp_ah_l2tp_pfcp.py b/tests/TestSuite_cvl_advanced_rss_pppoe_vlan_esp_ah_l2tp_pfcp.py deleted file mode 100644 index bf5422d..0000000 --- a/tests/TestSuite_cvl_advanced_rss_pppoe_vlan_esp_ah_l2tp_pfcp.py +++ /dev/null @@ -1,5667 +0,0 @@ -# BSD LICENSE -# -# Copyright(c)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 random -import string -from test_case import TestCase -from pmd_output import PmdOutput -from packet import Packet -from rte_flow_common import RssProcessing -from config import UserConf - -mac_ipv4_pfcp_session_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=2)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:54")/IP(src="192.168.0.25",dst="192.168.0.23")/UDP(sport=23,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=25)/Raw("x"*80)'] -} - -mac_ipv4_pfcp_session = { - 'sub_casename': 'mac_ipv4_pfcp_session', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv4_pfcp_session_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv4_pfcp_session_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv4_pfcp_session_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv4_pfcp_session_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv4_pfcp_session_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv6_pfcp_session_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=2)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=23,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=25)/Raw("x"*80)'] -} - -mac_ipv6_pfcp_session = { - 'sub_casename': 'mac_ipv6_pfcp_session', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv6 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv6_pfcp_session_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv6_pfcp_session_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv6_pfcp_session_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv6_pfcp_session_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv6_pfcp_session_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv4_l2tpv3_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.4", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x12\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.5",dst="192.168.0.7", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)' - ], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=25)/Raw("x"*80)' - ] -} - -mac_ipv4_l2tpv3 = { - 'sub_casename': 'mac_ipv4_l2tpv3', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv4_l2tpv3_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv4_l2tpv3_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv4_l2tpv3_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv4_l2tpv3_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv4_l2tpv3_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv6_l2tpv3_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x12\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)' - ], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=25)/Raw("x"*80)' - ] -} - -mac_ipv6_l2tpv3 = { - 'sub_casename': 'mac_ipv6_l2tpv3', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv6 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv6_l2tpv3_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv6_l2tpv3_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv6_l2tpv3_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv6_l2tpv3_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv6_l2tpv3_packets['match']], - 'action': 'check_no_hash', - } - ] -} - -mac_ipv4_esp_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.7",proto=50)/ESP(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=12)/Raw("x"*480)' - ] -} - -mac_ipv4_esp = { - 'sub_casename': 'mac_ipv4_esp', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / esp / end actions rss types esp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv4_esp_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv4_esp_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv4_esp_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [ - i for i in mac_ipv4_esp_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [ - i for i in mac_ipv4_esp_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv4_udp_esp_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.7")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)'] -} - -mac_ipv4_udp_esp = { - 'sub_casename': 'mac_ipv4_udp_esp', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / esp / end actions rss types esp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv4_udp_esp_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv4_udp_esp_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv4_udp_esp_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv4_udp_esp_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [ - i for i in mac_ipv4_esp_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv6_esp_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=50)/ESP(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)'] -} - -mac_ipv6_esp = { - 'sub_casename': 'mac_ipv6_esp', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv6 / esp / end actions rss types esp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv6_esp_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv6_esp_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv6_esp_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv6_esp_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv6_esp_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv6_udp_esp_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=11)/Raw("x"*480)'] -} - -mac_ipv6_udp_esp = { - 'sub_casename': 'mac_ipv6_udp_esp', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv6 / udp / esp / end actions rss types esp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv6_udp_esp_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv6_udp_esp_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv6_udp_esp_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': mac_ipv6_udp_esp_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_ipv6_udp_esp_packets['match'], - 'action': 'check_no_hash', - }, - ], - -} - -mac_ipv4_ah_packets = { - 'match': ['Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.8",proto=51)/AH(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=11)/Raw("x"*480)'] -} - -mac_ipv4_ah = { - 'sub_casename': 'mac_ipv4_ah', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / ah / end actions rss types ah end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv4_ah_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv4_ah_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv4_ah_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv4_ah_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv4_ah_packets['match']], - 'action': 'check_no_hash', - }, - ], - -} - -mac_ipv6_ah_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=51)/AH(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=11)/Raw("x"*480)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)'] -} - -mac_ipv6_ah = { - 'sub_casename': 'mac_ipv6_ah', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv6 / ah / end actions rss types ah end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv6_ah_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv6_ah_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv6_ah_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv6_ah_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv6_ah_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_pay_packets = { - 'mismatch': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IP(src="192.168.0.3",dst="192.168.0.5")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'] -} - -mac_pppoe_pay_l2_src_only_packets = { - 'mac_pppoe_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/Raw("x"*80)' - ], - 'mac_pppoe_lcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)' - ], - 'mac_pppoe_ipcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)' - ], -} - -mac_pppoe_pay_l2_src_only = { - 'sub_casename': 'mac_pppoe_pay_l2_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / end actions rss types eth l2-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_pay'][0], - 'action': {'save_hash': 'mac_pppoe_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_lcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_lcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_lcp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_ipcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_ipcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_packets['mac_pppoe_ipcp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [mac_pppoe_pay_l2_src_only_packets[key][i] for i in range(0, 3) for key in - ['mac_pppoe_pay', 'mac_pppoe_lcp_pay', 'mac_pppoe_ipcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_pay_l2_dst_only_packets = { - 'mac_pppoe_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/Raw("x"*80)'] - -} - -mac_pppoe_pay_l2_dst_only = { - 'sub_casename': 'mac_pppoe_pay_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / end actions rss types eth l2-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_pay_l2_dst_only_packets['mac_pppoe_pay'][0], - 'action': {'save_hash': 'mac_pppoe_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_dst_only_packets['mac_pppoe_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_dst_only_packets['mac_pppoe_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_pay_l2_dst_only_packets['mac_pppoe_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_pay_l2_src_only_l2_dst_only_packets = { - 'mac_pppoe_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/Raw("x"*80)' - ] - -} - -mac_pppoe_pay_l2_src_only_l2_dst_only = { - 'sub_casename': 'mac_pppoe_pay_l2_src_only_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / end actions rss types eth end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay'][0], - 'action': {'save_hash': 'mac_pppoe_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_pay_session_id_packets = { - 'mac_pppoe_lcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - ], - 'mac_pppoe_ipcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)' - ] - -} - -mac_pppoe_pay_session_id = { - 'sub_casename': 'mac_pppoe_pay_session_id', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_lcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_lcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_lcp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_ipcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_ipcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_session_id_packets['mac_pppoe_ipcp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [mac_pppoe_pay_session_id_packets[key][i] for i in range(0, 3) for key in - ['mac_pppoe_lcp_pay', 'mac_pppoe_ipcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_pay_l2_src_only_session_id_packets = { - 'mac_pppoe_lcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)' - ], - 'mac_pppoe_ipcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66",type=0x8864)/PPPoE(sessionid=7)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)' - ] - -} - -mac_pppoe_pay_l2_src_only_session_id = { - 'sub_casename': 'mac_pppoe_pay_l2_src_only_session_id', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / end actions rss types eth l2-src-only pppoe end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_lcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_lcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_lcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_lcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_lcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_lcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_ipcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_ipcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_ipcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_ipcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipcp_pay'}, - }, - { - 'send_packet': mac_pppoe_pay_l2_src_only_session_id_packets['mac_pppoe_ipcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipcp_pay'}, - }, - - { - 'send_packet': mac_pppoe_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [mac_pppoe_pay_l2_src_only_session_id_packets[key][i] for i in range(0, 4) for key in - ['mac_pppoe_lcp_pay', 'mac_pppoe_ipcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - - -mac_pppoe_ipv4_pay_packets = { - 'mismatch': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=5)/Raw("x"*80)'] -} - -mac_pppoe_ipv4_pay = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/Raw("x"*80)' -] - -mac_pppoe_ipv4_frag = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5", frag=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5", frag=3)/Raw("x"*80)' -] - -mac_pppoe_ipv4_pay_src_test = [ - { - 'send_packet': mac_pppoe_ipv4_pay[0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay[1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay[2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[0], - 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, -] - -mac_pppoe_ipv4_pay_dst_test = [ - { - 'send_packet': mac_pppoe_ipv4_pay[0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay[2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay[1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[0], - 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, -] - -mac_pppoe_ipv4_pay_src_dst_test = [ - { - 'send_packet': mac_pppoe_ipv4_pay[0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay[1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay[2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay[3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay[-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[0], - 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_frag[-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, -] - -mac_pppoe_ipv4_pay_post_test = [ - { - 'send_packet': [item for item in mac_pppoe_ipv4_pay + mac_pppoe_ipv4_frag], - 'action': 'check_no_hash', - }, - ], - -mac_pppoe_ipv4_pay_l2_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_pay_l2_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types eth l2-src-only end key_len 0 queues end / end', - 'test': mac_pppoe_ipv4_pay_src_test, - 'post-test': mac_pppoe_ipv4_pay_post_test -} - -mac_pppoe_ipv4_pay_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_pay_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types eth l2-dst-only end key_len 0 queues end / end', - 'test': mac_pppoe_ipv4_pay_dst_test, - 'post-test': mac_pppoe_ipv4_pay_post_test -} - -mac_pppoe_ipv4_pay_l2_src_only_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_pay_l2_src_only_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types eth end key_len 0 queues end / end', - 'test': mac_pppoe_ipv4_pay_src_dst_test, - 'post-test': mac_pppoe_ipv4_pay_post_test -} - - -mac_pppoe_ipv4_pay_l3_src_only_packets = { - 'mac_pppoe_ipv4_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:54", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/Raw("x"*80)', - ], - 'mac_pppoe_ipv4_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:54", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7", frag=3)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_pay_l3_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_pay_l2_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_frag'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_frag'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, - }, - - { - 'send_packet': mac_pppoe_ipv4_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_pay'] + - mac_pppoe_ipv4_pay_l3_src_only_packets['mac_pppoe_ipv4_frag'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_pay_l3_dst_only_packets = { - 'mac_pppoe_ipv4_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.3")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.7", dst="192.168.1.2")/Raw("x"*80)', - ], - 'mac_pppoe_ipv4_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.3", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.7", dst="192.168.1.2", frag=3)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_pay_l3_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_pay_l3_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_frag'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_frag'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_pay'] + - mac_pppoe_ipv4_pay_l3_dst_only_packets['mac_pppoe_ipv4_frag']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets = { - 'mac_pppoe_ipv4_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)' - ], - 'mac_pppoe_ipv4_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=3)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_frag'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv4_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_pay'] + - mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv4_frag']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_packets = { - 'mismatch': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:' - '910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=25,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l2_src_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l2_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l2_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types eth l2-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_l2_dst_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types eth l2-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - - { - 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], - -} - -mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types eth end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], - -} - -mac_pppoe_ipv4_udp_pay_l3_src_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l3_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - - { - 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_l3_dst_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l3_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_l4_src_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=9,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/UDP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - - { - 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_l4_dst_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/UDP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l4-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - - { - 'send_packet': mac_pppoe_ipv4_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.9")/UDP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.3")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)' - - ] -} - -mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets = { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/UDP(sport=19,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_udp_pay'][4], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_udp_pay'][5], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_ipv4_packets = { - 'mac_pppoe_ipv4_udp_pay':[ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=99)/Raw("x"*80)', - ] -} - -mac_pppoe_ipv4_udp_pay_ipv4 = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_ipv4', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv4_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_packets = { - 'mismatch': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/' - 'IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=25,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l2_src_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/TCP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l2_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l2_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types eth l2-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_packets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_packets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_packets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l2_src_only_packets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l2_dst_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/TCP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types eth l2-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/TCP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types eth end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l3_src_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l3_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_packets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_packets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_packets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l3_src_only_packets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l3_dst_only_pakets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l3_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_pakets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_pakets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_pakets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l3_dst_only_pakets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l4_src_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/TCP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l4-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l4_dst_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/TCP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l4-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.9")/TCP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=9,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=9,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only l4-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=90)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=25,dport=90)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp l3-dst-only l4-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.5")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/TCP(sport=19,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)' - - ] -} - -mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4-tcp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_tcp_pay'][4], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_tcp_pay'][5], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv4_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv4_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_ipv4_packets = { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=19,dport=99)/Raw("x"*80)', - ] -} - -mac_pppoe_ipv4_tcp_pay_ipv4 = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_ipv4', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss types ipv4 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets[ - 'mac_pppoe_ipv4_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv4_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_ipv4_packets['mac_pppoe_ipv4_tcp_pay'], - 'action': 'check_no_hash', - }, - ], -} -mac_pppoe_ipv6_pay_packets = { - 'mismatch': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_pay_l2_src_only_packets = { - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)' - ], - 'mac_pppoe_ipv6_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/Raw("x"*80)', - ] -} - -mac_pppoe_ipv6_pay_l2_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_pay_l2_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types eth l2-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_frag'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_frag'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_l2_src_only_packets['mac_pppoe_ipv6_frag']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_pay_l2_dst_only_packets = { - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)' - ], - 'mac_pppoe_ipv6_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/Raw("x"*80)' - ] - -} - -mac_pppoe_ipv6_pay_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_pay_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types eth l2-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_pay'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_frag'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_frag'][2], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_l2_dst_only_packets['mac_pppoe_ipv6_frag']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets = { - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)' - ], - 'mac_pppoe_ipv6_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/Raw("x"*80)' - - ] -} - -mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types eth end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_frag']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_pay_l3_src_only_packets = { - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:54", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)', - ], - 'mac_pppoe_ipv6_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:54", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/Raw("x"*80)', - - ] -} - -mac_pppoe_ipv6_pay_l3_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_pay_l3_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_frag'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_frag'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_l3_src_only_packets['mac_pppoe_ipv6_frag']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_pay_l3_dst_only_packets = { - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)' - ], - 'mac_pppoe_ipv6_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)' - - ] -} - -mac_pppoe_ipv6_pay_l3_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_pay_l3_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_frag'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_frag'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_l3_dst_only_packets['mac_pppoe_ipv6_frag']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets = { - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)' - ], - 'mac_pppoe_ipv6_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)' - - ] -} - -mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_frag'}, - }, - - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only_packets['mac_pppoe_ipv6_frag']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_packets = { - 'mismatch': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l2_src_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l2_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l2_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types eth l2-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_l2_src_only_packets['mac_pppoe_ipv6_udp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l2_dst_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types eth l2-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types eth end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_udp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l3_src_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l3_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6-udp l3-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_udp_pay_l3_src_only_packets['mac_pppoe_ipv6_udp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l3_dst_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=99)/Raw("x"*80)' - - ] -} - -mac_pppoe_ipv6_udp_pay_l3_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6-udp l3-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_udp_pay_l3_dst_only_packets['mac_pppoe_ipv6_udp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l4_src_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_udp_pay_l4_src_only_packets['mac_pppoe_ipv6_udp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l4_dst_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6-udp l4-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_udp_pay_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / 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_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/UDP(sport=19,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6-udp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_udp_pay'][4], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_udp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_udp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_udp_pay_ipv6_packets = { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1538", dst="CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=19,dport=99)/Raw("x"*80)', - ] -} - -mac_pppoe_ipv6_udp_pay_ipv6 = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_ipv6', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss types ipv6 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_ipv6_packets[ - 'mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_ipv6_packets[ - 'mac_pppoe_ipv6_udp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_ipv6_packets[ - 'mac_pppoe_ipv6_udp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_ipv6_packets[ - 'mac_pppoe_ipv6_udp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_ipv6_packets[ - 'mac_pppoe_ipv6_udp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_udp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet':mac_pppoe_ipv6_udp_pay_ipv6_packets['mac_pppoe_ipv6_udp_pay'], - 'action': 'check_no_hash', - }, - ], - -} - -mac_pppoe_ipv6_tcp_pay_packets = { - 'mismatch': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l2_src_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l2_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l2_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types eth l2-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l2_src_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], - -} - -mac_pppoe_ipv6_tcp_pay_l2_dst_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x"*80)', - ] -} - -mac_pppoe_ipv6_tcp_pay_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types eth l2-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types eth end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay_l3_src_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l3_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l3_src_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay_l3_dst_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l3_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l3_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay_l4_src_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l4-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay_l4_dst_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l4-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1:-1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l4-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-src-only l4-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], - -} - -mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only l4-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only l4-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only_packets['mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/TCP(sport=19,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)' - ] -} - -mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6-tcp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_tcp_pay'][4], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_tcp_pay'][5], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': [i for i in mac_pppoe_ipv6_tcp_pay_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only_packets[ - 'mac_pppoe_ipv6_tcp_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay_ipv6_packets = { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2025")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1538", dst="CDCD:910A:2222:5498:8475:1111:3900:2024")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=19,dport=99)/Raw("x"*80)', - ] -} - -mac_pppoe_ipv6_tcp_pay_ipv6 = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_ipv6', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss types ipv6 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'][2], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'][-1], - 'action': {'check_hash_same', 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_ipv6_packets['mac_pppoe_ipv6_tcp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv6_tcp_pay = [ - mac_pppoe_ipv6_tcp_pay_l2_src_only, - mac_pppoe_ipv6_tcp_pay_l2_dst_only, - mac_pppoe_ipv6_tcp_pay_l2_src_only_l2_dst_only, - mac_pppoe_ipv6_tcp_pay_l3_src_only, - mac_pppoe_ipv6_tcp_pay_l3_dst_only, - mac_pppoe_ipv6_tcp_pay_l4_src_only, - mac_pppoe_ipv6_tcp_pay_l4_dst_only, - mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_src_only, - mac_pppoe_ipv6_tcp_pay_l3_src_only_l4_dst_only, - mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_src_only, - mac_pppoe_ipv6_tcp_pay_l3_dst_only_l4_dst_only, - mac_pppoe_ipv6_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only, - mac_pppoe_ipv6_tcp_pay_ipv6 -] - -mac_pppoe_ipv6_udp_pay = [ - mac_pppoe_ipv6_udp_pay_l2_src_only, - mac_pppoe_ipv6_udp_pay_l2_dst_only, - mac_pppoe_ipv6_udp_pay_l2_src_only_l2_dst_only, - mac_pppoe_ipv6_udp_pay_l3_src_only, - mac_pppoe_ipv6_udp_pay_l3_dst_only, - mac_pppoe_ipv6_udp_pay_l4_src_only, - mac_pppoe_ipv6_udp_pay_l4_dst_only, - mac_pppoe_ipv6_udp_pay_l3_src_only_l4_src_only, - mac_pppoe_ipv6_udp_pay_l3_src_only_l4_dst_only, - mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_src_only, - mac_pppoe_ipv6_udp_pay_l3_dst_only_l4_dst_only, - mac_pppoe_ipv6_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only, - mac_pppoe_ipv6_udp_pay_ipv6 - -] - -mac_pppoe_ipv6_pay = [ - mac_pppoe_ipv6_pay_l2_src_only, - mac_pppoe_ipv6_pay_l2_dst_only, - mac_pppoe_ipv6_pay_l2_src_only_l2_dst_only, - mac_pppoe_ipv6_pay_l3_src_only, - mac_pppoe_ipv6_pay_l3_dst_only, - mac_pppoe_ipv6_pay_l3_src_only_l3_dst_only -] - -mac_pppoe_ipv4_tcp_pay = [ - mac_pppoe_ipv4_tcp_pay_l2_src_only, - mac_pppoe_ipv4_tcp_pay_l2_dst_only, - mac_pppoe_ipv4_tcp_pay_l2_src_only_l2_dst_only, - mac_pppoe_ipv4_tcp_pay_l3_src_only, - mac_pppoe_ipv4_tcp_pay_l3_dst_only, - mac_pppoe_ipv4_tcp_pay_l4_src_only, - mac_pppoe_ipv4_tcp_pay_l4_dst_only, - mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_src_only, - mac_pppoe_ipv4_tcp_pay_l3_src_only_l4_dst_only, - mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_src_only, - mac_pppoe_ipv4_tcp_pay_l3_dst_only_l4_dst_only, - mac_pppoe_ipv4_tcp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only, - mac_pppoe_ipv4_tcp_pay_ipv4 -] - -mac_pppoe_ipv4_udp_pay = [ - mac_pppoe_ipv4_udp_pay_l2_src_only, - mac_pppoe_ipv4_udp_pay_l2_dst_only, - mac_pppoe_ipv4_udp_pay_l2_src_only_l2_dst_only, - mac_pppoe_ipv4_udp_pay_l3_src_only, - mac_pppoe_ipv4_udp_pay_l3_dst_only, - mac_pppoe_ipv4_udp_pay_l4_src_only, - mac_pppoe_ipv4_udp_pay_l4_dst_only, - mac_pppoe_ipv4_udp_pay_l3_src_only_l4_src_only, - mac_pppoe_ipv4_udp_pay_l3_src_only_l4_dst_only, - mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_src_only, - mac_pppoe_ipv4_udp_pay_l3_dst_only_l4_dst_only, - mac_pppoe_ipv4_udp_pay_l3_src_only_l3_dst_only_l4_src_only_l4_dst_only, - mac_pppoe_ipv4_udp_pay_ipv4, - ] - -mac_pppoe_ipv4_pay_cases = [ - mac_pppoe_ipv4_pay_l2_src_only, - mac_pppoe_ipv4_pay_l2_dst_only, - mac_pppoe_ipv4_pay_l2_src_only_l2_dst_only, - mac_pppoe_ipv4_pay_l3_src_only, - mac_pppoe_ipv4_pay_l3_dst_only, - mac_pppoe_ipv4_pay_l3_src_only_l3_dst_only -] - -mac_pppoe_pay = [ - mac_pppoe_pay_l2_src_only, - mac_pppoe_pay_l2_dst_only, - mac_pppoe_pay_l2_src_only_l2_dst_only, - mac_pppoe_pay_session_id, - mac_pppoe_pay_l2_src_only_session_id -] - -mac_pppoe_ipv6_tcp_pay_symmetric_packets = { - 'match': { - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=23,dport=25)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=23,dport=25)/Raw("x"*80)' - ], - }, - 'mismatch': { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=23,dport=25)/Raw("x"*80)' - ], - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=23,dport=25)/Raw("x"*80)', - ], - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' - ], - 'mac_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=23,dport=25)/Raw("x"*80)' - ] - } - -} - -mac_pppoe_ipv6_tcp_pay_symmetric = { - 'sub_casename': 'mac_pppoe_ipv6_tcp_pay_symmetric', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / tcp / end actions rss func symmetric_toeplitz types ipv6-tcp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][1], - 'action': {'check_hash_same': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][2], - 'action': {'check_hash_same': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][3], - 'action': {'check_hash_same': 'mac_pppoe_ipv6_tcp_pay'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_tcp_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_udp_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_ipv6_tcp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['mismatch']['mac_ipv6_tcp_pay'][1:], - 'action': {'check_hash_different': 'mac_ipv6_tcp_pay_mismatch'}, - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay_match_post'}, - }, - { - 'send_packet': mac_pppoe_ipv6_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv6_tcp_pay'][3], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay_match_post'}, - }, - ], -} - -mac_pppoe_ipv6_udp_pay_symmetric_packets = { - 'match': { - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=23,dport=25)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=23,dport=25)/Raw("x"*80)' - ] - }, - 'mismatch': { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=23,dport=25)/Raw("x"*80)' - ], - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=23,dport=25)/Raw("x"*80)', - ], - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' - ], - 'mac_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=23,dport=25)/Raw("x"*80)' - ] - } -} - -mac_pppoe_ipv6_udp_pay_symmetric = { - 'sub_casename': 'mac_pppoe_ipv6_udp_pay_symmetric', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / udp / end actions rss func symmetric_toeplitz types ipv6-udp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][1], - 'action': {'check_hash_same': 'mac_pppoe_ipv6_udp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][2], - 'action': {'check_hash_same': 'mac_pppoe_ipv6_udp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][3], - 'action': {'check_hash_same': 'mac_pppoe_ipv6_udp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_udp_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_tcp_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_ipv6_udp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['mismatch']['mac_ipv6_udp_pay'][1:], - 'action': {'check_hash_different': 'mac_ipv6_udp_pay_mismatch'}, - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay_match_post'}, - }, - { - 'send_packet': mac_pppoe_ipv6_udp_pay_symmetric_packets['match']['mac_pppoe_ipv6_udp_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay_match_post'}, - }, - ], -} - -mac_pppoe_ipv6_pay_symmetric_packets = { - 'match': { - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' - ], - 'mac_pppoe_ipv6_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/IPv6ExtHdrFragment()/Raw("x"*80)' - ] - }, - 'mismatch': { - 'mac_pppoe_ipv4_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - ], - 'mac_pppoe_ipv4_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1", frag=5)/Raw("x"*80)' - ], - 'mac_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' - ], - 'mac_ipv6_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/IPv6ExtHdrFragment()/Raw("x"*80)' - ] - } -} - -mac_pppoe_ipv6_pay_symmetric = { - 'sub_casename': 'mac_pppoe_ipv6_pay_symmetric', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv6 / end actions rss func symmetric_toeplitz types ipv6 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['match']['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['match']['mac_pppoe_ipv6_pay'][1:], - 'action': {'check_hash_same': 'mac_pppoe_ipv6_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['match']['mac_pppoe_ipv6_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_frag_match'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['match']['mac_pppoe_ipv6_frag'][1:], - 'action': {'check_hash_same': 'mac_pppoe_ipv6_frag_match'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_frag_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_frag'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_frag_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_ipv6_pay'][0], - 'action': {'save_hash': 'mac_ipv6_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_ipv6_pay'][1:], - 'action': {'check_hash_different': 'mac_ipv6_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_ipv6_frag'][0], - 'action': {'save_hash': 'mac_ipv6_frag_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['mismatch']['mac_ipv6_frag'][1:], - 'action': {'check_hash_different': 'mac_ipv6_frag_mismatch'}, - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv6_pay_symmetric_packets['match']['mac_pppoe_ipv6_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_pay_symmetric_packets = { - 'match': { - 'mac_pppoe_ipv4_pay': [ - 'Ether(src="00:11:22:33:44:55",dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55",dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/Raw("x"*80)', - ], - 'mac_pppoe_ipv4_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2", frag=5)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1", frag=5)/Raw("x"*80)', - ] - }, - 'mismatch': { - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' - ], - 'mac_pppoe_ipv6_frag': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/IPv6ExtHdrFragment()/Raw("x"*80)' - ], - 'mac_ipv4_pay': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.21",dst="192.168.0.20")/Raw("x"*80)' - ], - 'mac_ipv4_frag': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", frag=5)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.21",dst="192.168.0.20", frag=5)/Raw("x"*80)' - ] - } -} - -mac_pppoe_ipv4_pay_symmetric = { - 'sub_casename': 'mac_pppoe_ipv4_pay_symmetric', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss func symmetric_toeplitz types ipv4 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['match']['mac_pppoe_ipv4_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['match']['mac_pppoe_ipv4_pay'][1], - 'action': {'check_hash_same': 'mac_pppoe_ipv4_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['match']['mac_pppoe_ipv4_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_frag_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['match']['mac_pppoe_ipv4_frag'][1], - 'action': {'check_hash_same': 'mac_pppoe_ipv4_frag_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_pay'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_frag'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_frag_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_frag'][1], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_frag_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_ipv4_pay'][0], - 'action': {'save_hash': 'mac_ipv4_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_ipv4_pay'][1], - 'action': {'check_hash_different': 'mac_ipv4_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_ipv4_frag'][0], - 'action': {'save_hash': 'mac_ipv4_frag_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_pay_symmetric_packets['mismatch']['mac_ipv4_frag'][1], - 'action': {'check_hash_different': 'mac_ipv4_frag_mismatch'}, - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in - mac_pppoe_ipv4_pay_symmetric_packets['match']['mac_pppoe_ipv4_pay']], - 'action': 'check_no_hash', - }, - ], -} - -mac_pppoe_ipv4_udp_pay_symmetric_packets = { - 'match': { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=23,dport=25)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/UDP(sport=23,dport=25)/Raw("x"*80)' - ], - }, - 'mismatch': { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/TCP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=23,dport=19)/Raw("x"*80)', - ], - 'mac_pppoe_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=23,dport=25)/Raw("x"*80)', - - ], - 'mac_pppoe_ipv4_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)' - ], - 'mac_ipv4_udp_pay': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.21",dst="192.168.0.20")/UDP(sport=23,dport=25)/Raw("x"*80)' - ] - } -} - -mac_pppoe_ipv4_udp_pay_symmetric = { - 'sub_casename': 'mac_pppoe_ipv4_udp_pay_symmetric', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][1], - 'action': {'check_hash_same': 'mac_pppoe_ipv4_udp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][2], - 'action': {'check_hash_same': 'mac_pppoe_ipv4_udp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][3], - 'action': {'check_hash_same': 'mac_pppoe_ipv4_udp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_tcp_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_tcp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_udp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_udp_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_udp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_ipv4_udp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['mismatch']['mac_ipv4_udp_pay'][1:], - 'action': {'check_hash_different': 'mac_ipv4_udp_pay_mismatch'}, - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_ipv4_udp_pay_match_post'}, - }, - { - 'send_packet': mac_pppoe_ipv4_udp_pay_symmetric_packets['match']['mac_pppoe_ipv4_udp_pay'][1:], - 'action': {'check_hash_different': 'mac_ipv4_udp_pay_match_post'}, - }, - ], -} - -mac_pppoe_ipv4_tcp_pay_symmetric_packets = { - 'match': { - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=23,dport=25)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/TCP(sport=23,dport=25)/Raw("x"*80)' - ] - }, - 'mismatch': { - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=23,dport=25)/Raw("x"*80)', - ], - 'mac_pppoe_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=23,dport=25)/Raw("x"*80)', - ], - 'mac_pppoe_ipv4_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)' - ], - 'mac_ipv4_tcp_pay': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.21",dst="192.168.0.20")/TCP(sport=23,dport=25)/Raw("x"*80)' - ] - } -} - -mac_pppoe_ipv4_tcp_pay_symmetric = { - 'sub_casename': 'mac_pppoe_ipv4_tcp_pay_symmetric', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / pppoes / ipv4 / tcp / end actions rss func symmetric_toeplitz types ipv4-tcp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][1], - 'action': {'check_hash_same': 'mac_pppoe_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][2], - 'action': {'check_hash_same': 'mac_pppoe_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][3], - 'action': {'check_hash_same': 'mac_pppoe_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_udp_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_udp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_tcp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv6_tcp_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv6_tcp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_pppoe_ipv4_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_ipv4_tcp_pay_mismatch'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['mismatch']['mac_ipv4_tcp_pay'][1:], - 'action': {'check_hash_different': 'mac_ipv4_tcp_pay_mismatch'}, - }, - ], - 'post-test': [ - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_match_post'}, - }, - { - 'send_packet': mac_pppoe_ipv4_tcp_pay_symmetric_packets['match']['mac_pppoe_ipv4_tcp_pay'][3], - 'action': {'check_hash_different', 'mac_pppoe_ipv4_tcp_pay_match_post'} - }, - ], -} - -simple_xor_packets = { - 'match': { - 'mac_pppoe_ipv4_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)' - ], - 'mac_pppoe_ipv4_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/UDP(sport=25,dport=23)/Raw("x"*80)' - ], - 'mac_pppoe_ipv4_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.2", dst="192.168.1.1")/TCP(sport=25,dport=23)/Raw("x"*80)' - ], - 'mac_pppoe_ipv6_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/Raw("x"*80)' - ], - 'mac_ipv6_udp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/UDP(sport=25,dport=23)/Raw("x"*80)' - ], - 'mac_ipv6_tcp_pay': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2022", dst="CDCD:910A:2222:5498:8475:1111:3900:1536")/TCP(sport=25,dport=23)/Raw("x"*80)' - ] - - } -} - -simple_xor = { - 'sub_casename': 'simple_xor', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern end actions rss func simple_xor key_len 0 queues end / end', - 'test': [ - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_pay'][1:], - 'action': {'check_hash_same': 'mac_pppoe_ipv4_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_udp_pay'][1:], - 'action': {'check_same': 'mac_pppoe_ipv4_udp_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_tcp_pay'][1:], - 'action': {'check_same': 'mac_pppoe_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv6_pay'][1:], - 'action': {'check_same': 'mac_pppoe_ipv6_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_ipv6_udp_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_ipv6_udp_pay'][1:], - 'action': {'check_same': 'mac_ipv6_udp_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_ipv6_tcp_pay_match'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_ipv6_tcp_pay'][1:], - 'action': {'check_same': 'mac_ipv6_tcp_pay_match'}, - }, - - ], - 'post-test': [ - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_pay'][1:], - 'action': {'check_hash_different': 'mac_pppoe_ipv4_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_udp_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_udp_pay'][1:], - 'action': {'check_same': 'mac_pppoe_ipv4_udp_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv4_tcp_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv4_tcp_pay'][1:], - 'action': {'check_same': 'mac_pppoe_ipv4_tcp_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv6_pay'][0], - 'action': {'save_hash': 'mac_pppoe_ipv6_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_pppoe_ipv6_pay'][1:], - 'action': {'check_same': 'mac_pppoe_ipv6_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_ipv6_udp_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_ipv6_udp_pay'][1:], - 'action': {'check_same': 'mac_ipv6_udp_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_ipv6_tcp_pay_match_post'}, - }, - { - 'send_packet': simple_xor_packets['match']['mac_ipv6_tcp_pay'][1:], - 'action': {'check_same': 'mac_ipv6_tcp_pay_match_post'}, - }, - ], -} - -mac_vlan_ipv4_pay_packets = { - 'match': { - 'mac_vlan_ipv4_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/Raw("x" * 80)', - ], - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' - ] -} - -mac_vlan_ipv4_pay = { - 'sub_casename': 'mac_vlan_ipv4_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv4_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv4_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv4_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_pay_packets['mismatch'][0], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv4_udp_pay_packets = { - 'match': { - 'mac_vlan_ipv4_udp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/UDP(sport=19,dport=99)/Raw("x" * 80)', - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' - ] -} - -mac_vlan_ipv4_udp_pay = { - 'sub_casename': 'mac_vlan_ipv4_udp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / udp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv4_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv4_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv4_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv4_tcp_pay_packets = { - 'match': { - 'mac_vlan_ipv4_tcp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/TCP(sport=19,dport=99)/Raw("x" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)' - ] -} - -mac_vlan_ipv4_tcp_pay = { - 'sub_casename': 'mac_vlan_ipv4_tcp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / tcp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_tcp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv4_sctp_pay_packets = { - 'match': { - 'mac_vlan_ipv4_sctp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.5")/SCTP(sport=19,dport=99)/Raw("x" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)' - - ] -} - -mac_vlan_ipv4_sctp_pay = { - 'sub_casename': 'mac_vlan_ipv4_sctp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / sctp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv4_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv4_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv4_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_sctp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv6_pay_packets = { - 'match': { - 'mac_vlan_ipv6_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("y" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' - ] -} - -mac_vlan_ipv6_pay = { - 'sub_casename': 'mac_vlan_ipv6_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv6_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv6_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv6_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv6_udp_pay_packets = { - 'match': { - 'mac_vlan_ipv6_udp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=23,dport=99)/Raw("x" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)' - ] -} - -mac_vlan_ipv6_udp_pay = { - 'sub_casename': 'mac_vlan_ipv6_udp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / udp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv6_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv6_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv6_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv6_tcp_pay_packets = { - 'match': { - 'mac_vlan_ipv6_tcp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' - ] -} - -mac_vlan_ipv6_tcp_pay = { - 'sub_casename': 'mac_vlan_ipv6_tcp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / tcp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv6_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv6_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv6_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_tcp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv6_sctp_pay_packets = { - 'match': { - 'mac_vlan_ipv6_sctp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/SCTP(sport=25,dport=99)/Raw("x" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' - ] -} - -mac_vlan_ipv6_sctp_pay = { - 'sub_casename': 'mac_vlan_ipv6_sctp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / sctp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv6_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv6_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv6_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_sctp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_pppoe_pay_l2_src_only_packets = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=7)/Raw("x"*80)' -] - -mac_vlan_pppoe_pay_l2_src_only = { - 'sub_casename': 'mac_vlan_pppoe_pay_l2_src_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / pppoes / end actions rss types eth l2-src-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[0], - 'action': {'save_hash': 'l2_src_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[1], - 'action': {'check_hash_different': 'l2_src_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[2], - 'action': {'check_hash_same': 'l2_src_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[3], - 'action': {'check_hash_same': 'l2_src_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[4], - 'action': {'check_hash_same': 'l2_src_only'}, - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_packets[1], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_pppoe_pay_l2_dst_only_packets = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=7)/Raw("x"*80)' -] - -mac_vlan_pppoe_pay_l2_dst_only = { - 'sub_casename': 'mac_vlan_pppoe_pay_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / pppoes / end actions rss types eth l2-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[0], - 'action': {'save_hash': 'l2_dst_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[1], - 'action': {'check_hash_different': 'l2_dst_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[2], - 'action': {'check_hash_same': 'l2_dst_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[3], - 'action': {'check_hash_same': 'l2_dst_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[4], - 'action': {'check_hash_same': 'l2_dst_only'}, - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_pppoe_pay_l2_dst_only_packets[1], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:99")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=7)/Raw("x"*80)' -] - -mac_vlan_pppoe_pay_l2_src_only_l2_dst_only = { - 'sub_casename': 'mac_vlan_pppoe_pay_l2_src_only_l2_dst_only', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / pppoes / end actions rss types eth l2-src-only l2-dst-only end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[0], - 'action': {'save_hash': 'l2_src_only_l2_dst_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[1], - 'action': {'check_hash_different': 'l2_src_only_l2_dst_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[2], - 'action': {'check_hash_same': 'l2_src_only_l2_dst_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[3], - 'action': {'check_hash_same': 'l2_src_only_l2_dst_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[4], - 'action': {'check_hash_same': 'l2_src_only_l2_dst_only'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[5], - 'action': {'check_hash_same': 'l2_src_only_l2_dst_only'}, - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_pppoe_pay_l2_src_only_l2_dst_only_packets[1], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_pppoe_pay_c_vlan_packets = [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=7)/Raw("x" * 80)' -] - -mac_vlan_pppoe_pay_c_vlan = { - 'sub_casename': 'mac_vlan_pppoe_pay_c_vlan', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / pppoes / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[0], - 'action': {'save_hash': 'c_vlan'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[1], - 'action': {'check_hash_different': 'c_vlan'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[2], - 'action': {'check_hash_same': 'c_vlan'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[3], - 'action': {'check_hash_same': 'c_vlan'}, - }, - { - 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[4], - 'action': {'check_hash_same': 'c_vlan'}, - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_pppoe_pay_c_vlan_packets[1], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_pppoe_pay = [ - mac_vlan_pppoe_pay_l2_src_only, - mac_vlan_pppoe_pay_l2_dst_only, - mac_vlan_pppoe_pay_l2_src_only_l2_dst_only, - mac_vlan_pppoe_pay_c_vlan -] - - -class Advanced_rss_pppoe_vlan_ah_l2tp_pfcp(TestCase): - - def set_up_all(self): - """ - Run at the start of each test suite. - Generic filter Prerequistites - """ - - # 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.pci_list = [] - for port in self.dut.ports_info: - self.pci_list.append(port['pci']) - self.pkt = Packet() - self.pmd_output = PmdOutput(self.dut) - self.ddp_dir = "/lib/firmware/updates/intel/ice/ddp/" - conf_file = 'conf/cvl_advanced_rss_pppoe.cfg' - conf_info = UserConf(conf_file) - conf_section = conf_info.conf._sections['suite'] - self.os_default_package = conf_section['os_default_package_file_location'] - self.comms_package = conf_section['comms_package_file_location'] - self.symmetric = False - self.rxq = 64 - self.rsspro = RssProcessing(self, self.pmd_output, [self.tester_iface0, self.tester_iface1], self.rxq) - self.logger.info('rssprocess.tester_ifaces: {}'.format(self.rsspro.tester_ifaces)) - self.logger.info('rssprocess.test_case: {}'.format(self.rsspro.test_case)) - - def set_up(self): - """ - Run before each test case. - """ - pass - - def tear_down(self): - """ - Run after each test case. - """ - # 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") - self.dut.kill_all() - - def tear_down_all(self): - """ - Run after each test suite. - """ - self.dut.kill_all() - - def replace_package(self, package='comms'): - ice_pkg_path = ''.join([self.ddp_dir,"ice.pkg"]) - self.dut.send_expect("rm -f {}".format(ice_pkg_path), "# ") - if package == 'os_default': - self.dut.send_expect("cp {} {}".format(self.os_default_package,ice_pkg_path), "# ") - elif package == 'comms': - self.dut.send_expect("cp {} {}".format(self.comms_package,ice_pkg_path), "# ") - for pci in self.pci_list: - self.dut.send_expect("echo {0} > /sys/bus/pci/devices/{0}/driver/unbind".format(pci), "# ", 60) - self.dut.send_expect("echo {} > /sys/bus/pci/drivers/ice/bind".format(pci), "# ", 60) - pci_str = ' '.join(self.pci_list) - self.dut.send_expect("./usertools/dpdk-devbind.py --force --bind=vfio-pci {}".format(pci_str), "# ", 60) - - def launch_testpmd(self, symmetric=False, package='comms'): - if symmetric: - param = "--rxq=64 --txq=64" - else: - param = "--rxq=64 --txq=64 --disable-rss --rxd=384 --txd=384" - out = self.pmd_output.start_testpmd(cores="1S/4C/1T", param=param, - eal_param=f"-w {self.pci_list[0]}", socket=self.ports_socket) - self.symmetric = symmetric - package_version = re.search('Active\spackage\sis:\s(.+),', out).group(1) - self.logger.info('DDP package version: %s' % package_version) - if package == 'comms': - self.verify(package_version in self.comms_package.split('/')[-1], - 'package version not match') - elif package == 'os_default': - self.verify(package_version in self.os_default_package.split('/')[-1], - 'package version not match') - if symmetric: - # 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') - return package_version - - def switch_testpmd(self, symmetric=True, pkg='comms'): - self.dut.kill_all() - self.launch_testpmd(symmetric, pkg) - self.pmd_output.execute_cmd("start") - - def _gener_str(self, str_len=6): - return ''.join(random.sample(string.ascii_letters + string.digits, k=str_len)) - - def test_mac_ipv4_pfcp_session(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_pfcp_session) - - def test_mac_ipv6_pfcp_session(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_pfcp_session) - - def test_mac_ipv4_l2tpv3(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_l2tpv3) - - def test_mac_ipv6_l2tpv3(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_l2tpv3) - - def test_mac_ipv4_esp(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_esp) - - def test_mac_ipv4_udp_esp(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_udp_esp) - - def test_mac_ipv6_esp(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_esp) - - def test_mac_ipv6_udp_esp(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_udp_esp) - - def test_mac_ipv4_ah(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_ah) - - def test_mac_ipv6_ah(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_ah) - - def test_mac_pppoe_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_pay) - - def test_mac_pppoe_ipv4_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_pay_cases) - - def test_mac_pppoe_ipv4_udp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_udp_pay) - - def test_mac_pppoe_ipv4_tcp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_tcp_pay) - - def test_mac_pppoe_ipv6_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_pay) - - def test_mac_pppoe_ipv6_udp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_udp_pay) - - def test_mac_pppoe_ipv6_tcp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_tcp_pay) - - def test_mac_pppoe_ipv4_pay_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_pay_symmetric) - - def test_mac_pppoe_ipv4_udp_pay_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_udp_pay_symmetric) - - def test_mac_pppoe_ipv4_tcp_pay_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_tcp_pay_symmetric) - - def test_mac_pppoe_ipv6_pay_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_pay_symmetric) - - def test_mac_pppoe_ipv6_udp_pay_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_udp_pay_symmetric) - - def test_mac_pppoe_ipv6_tcp_pay_symmetric(self): - self.switch_testpmd(symmetric=True) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_tcp_pay_symmetric) - - def test_simple_xor(self): - self.switch_testpmd(symmetric=True) - self.rsspro.handle_rss_distribute_cases(cases_info=simple_xor) - - def test_multirules_two_rules_not_hit_default_profile(self): - """ - Subcase 1: two rules with same pattern but different hash input set, not hit default profile - :return: - """ - self.rsspro.error_msgs = [] - self.switch_testpmd(symmetric=True) - rule0 = 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l3-src-only end key_len 0 queues end / end' - self.rsspro.create_rule(rule0) - self.rsspro.check_rule(0) - pkts_list1 = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)'] - out = self.rsspro.send_pkt_get_output(pkts_list1[0]) - pkt1_first_key = 'l3_src' - self.rsspro.save_hash(out, pkt1_first_key) - res = self.rsspro.send_pkt_get_output(pkts_list1[1]) - self.rsspro.check_hash_different(res, pkt1_first_key) - - rule1 = 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l3-dst-only end key_len 0 queues end / end' - self.rsspro.create_rule(rule1) - pkts_list2 = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - ] - self._send_pkt_action(pkts_list2) - - pkts_list3 = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)'] - - for i in range(1, 3): - self.rsspro.destroy_rule(rule_id=i % 2) - self.rsspro.check_rule(rule_list='rule{}'.format(i % 2), stats=False) - pkt_base = 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)' - res3 = self.rsspro.send_pkt_get_output(pkt_base) - pkt3_key = 'hash_record_{}'.format(i % 2) - self.rsspro.save_hash(res3, pkt3_key) - for each_rule in pkts_list3: - result = self.rsspro.send_pkt_get_output(each_rule) - self.rsspro.check_hash_different(result, pkt3_key) - self.verify(not self.rsspro.error_msgs, 'some subcases failed') - - def test_multirules_two_rules_hit_default_profile(self): - """ - # Subcase 2: two rules with same pattern but different hash input set, hit default profile - :return: - """ - self.rsspro.error_msgs = [] - self.switch_testpmd(symmetric=True) - rule_list = [ - 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end' - - ] - pkt_list = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.5")/Raw("x"*80)', - ] - self._two_rules_operation(rule_list, pkt_list,action_list1=['check_no_hash' for _ in range(0,len(pkt_list))],action_list2=['check_no_hash']) - self.verify(not self.rsspro.error_msgs, 'some subcases failed') - - def _send_pkt_action(self, pkt_list, action_list=None): - if action_list is None: - action_list = ['save_hash', 'check_hash_different', 'check_hash_same'] - hash_key = self._gener_str() - for i in range(0, len(pkt_list)): - out = self.rsspro.send_pkt_get_output(pkt_list[i]) - func = getattr(self.rsspro, action_list[i]) - func(out, hash_key) - - def _two_rules_operation(self, rule_list, pkt_list, action_list1=None, action_list2=None): - for i in range(0, len(rule_list)): - self.rsspro.create_rule(rule_list[i]) - self.rsspro.check_rule(rule_list=['{}'.format(i)]) - if i == 1: - pkt_list[1], pkt_list[2] = pkt_list[2], pkt_list[1] - self._send_pkt_action(pkt_list) - else: - self._send_pkt_action(pkt_list) - # destory rule 1 - self.rsspro.destroy_rule(rule_id=1) - self.rsspro.check_rule(rule_list=['1'], stats=False) - pkt_list[1], pkt_list[2] = pkt_list[2], pkt_list[1] - self._send_pkt_action(pkt_list, action_list=action_list1) - # destory rule 0 - self.rsspro.destroy_rule(rule_id=0) - self.rsspro.check_rule(rule_list=['0'], stats=False) - self._send_pkt_action([pkt_list[0]], action_list=action_list2) - - def test_two_rules_smaller_first_larger_later(self, ): - """ - two rules, scope smaller created first, and the larger one created later - """ - self.rsspro.error_msgs = [] - self.switch_testpmd(symmetric=True) - rule_list = [ - 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end' - ] - pkt_list = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=25,dport=99)/Raw("x"*80)', - ] - self._two_rules_operation(rule_list, pkt_list, action_list2=['check_no_hash']) - self.verify(not self.rsspro.error_msgs, 'some subcases failed') - - def test_two_rules_larger_first_smaller_later(self): - """ - Subcase 4: two rules, scope larger created first, and the smaller one created later - """ - self.rsspro.error_msgs = [] - self.switch_testpmd(symmetric=True) - rule_list = [ - 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-udp l4-src-only end key_len 0 queues end / end' - ] - pkt_list = [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:99")/PPPoE(sessionid=7)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.5")/UDP(sport=25,dport=99)/Raw("x"*80)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=19,dport=23)/Raw("x"*80)', - ] - self._two_rules_operation(rule_list, pkt_list, action_list2=['check_no_hash']) - - def test_wrong_hash_input_set(self): - self.switch_testpmd(symmetric=True) - rule_list = [ - 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types l2-src-only l2-dst-only end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-tcp end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp l3-src-only end key_len 0 queues end / end'] - - for rule in rule_list: - self.rsspro.validate_rule(rule, check_stats=False, check_msg='Invalid argument') - self.rsspro.create_rule(rule, check_stats=False, msg='Invalid argument') - - def test_void_action(self): - self.switch_testpmd(symmetric=True) - rule = 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions end' - self.rsspro.validate_rule(rule, check_stats=False, check_msg='Invalid argument') - self.rsspro.create_rule(rule, check_stats=False, msg='Invalid argument') - self.rsspro.check_rule(stats=False, rule_list=[rule]) - - def test_delete_nonexisting_rule(self): - self.switch_testpmd(symmetric=True) - self.rsspro.check_rule(stats=False) - out = self.dut.send_command("flow destroy 0 rule 0", timeout=1) - self.verify('error' not in out, 'delete nonexisting rule raise err,expected no err') - self.dut.send_command("flow flush 0", timeout=1) - - def test_unsupported_pattern_with_OS_default_package(self): - self.replace_package('os_default') - self.switch_testpmd(symmetric=True, pkg='os_default') - rule_list = [ - 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / ipv4 / esp / end actions rss types esp end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / ipv4 / ah / end actions rss types ah end key_len 0 queues end / end' - ] - self.rsspro.validate_rule(rule_list, check_stats=False, check_msg='Invalid argument') - self.rsspro.create_rule(rule_list, check_stats=False, msg='Invalid argument') - self.rsspro.check_rule(stats=False) - self.dut.kill_all() - self.replace_package('comms') - self.launch_testpmd() - - def test_invalid_port(self): - self.switch_testpmd(symmetric=True) - rule = 'flow create 1 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end' - self.rsspro.create_rule(rule, check_stats=False, msg='No such device') - self.rsspro.check_rule(stats=False, rule_list=[rule]) - pattern = 'Invalid port 1' - out = self.dut.send_command("flow list 1", timeout=1) - result = re.search(r'%s' % pattern, out) - self.verify(result, 'actual result not match expected,expected result is:{}'.format(pattern)) - - def test_mac_vlan_ipv4_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_pay) - - def test_mac_vlan_ipv4_udp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_udp_pay) - - def test_mac_vlan_ipv4_tcp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_tcp_pay) - - def test_mac_vlan_ipv4_sctp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_sctp_pay) - - def test_mac_vlan_ipv6_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_pay) - - def test_mac_vlan_ipv6_udp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_udp_pay) - - def test_mac_vlan_ipv6_tcp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_tcp_pay) - - def test_mac_vlan_ipv6_sctp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_sctp_pay) - - def test_mac_vlan_pppoe_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_pppoe_pay) From patchwork Thu Mar 18 05:27:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 89436 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B2117A0561; Thu, 18 Mar 2021 06:39:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A66F7141044; Thu, 18 Mar 2021 06:39:55 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6EE9E141043 for ; Thu, 18 Mar 2021 06:39:53 +0100 (CET) IronPort-SDR: T0xTbK99dun1giExnMq0qb8BWx048wlFzg5JoH4oSG4EsKKgjAfB4513Gr5ZA1d/pYi56Syx/P J+AekAX4PVxQ== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="176736173" X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="176736173" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:52 -0700 IronPort-SDR: AnQRT6EvxbnCvzCCOyB1+/fV0y2jEN10sNXZZfdXBCzXkS7zdjsqXdI5w8dVEFl53kfw20Acge xeIu9UtqwRmg== X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="406214321" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:51 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Thu, 18 Mar 2021 13:27:25 +0800 Message-Id: <1616045251-65532-3-git-send-email-zhiminx.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> References: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 2/8] add decorator to support nic and pkg check X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *.remove replace pkg step and add pkg check Signed-off-by: Zhimin Huang --- ..._cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py | 82 ++++++++-------------- tests/TestSuite_cvl_fdir.py | 8 ++- tests/TestSuite_iavf_fdir.py | 53 +++++++------- tests/TestSuite_l2tp_esp_coverage.py | 50 ++++++------- 4 files changed, 85 insertions(+), 108 deletions(-) diff --git a/tests/TestSuite_cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py b/tests/TestSuite_cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py index a54dcf5..f7236ee 100644 --- a/tests/TestSuite_cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py +++ b/tests/TestSuite_cvl_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py @@ -32,7 +32,7 @@ import re import random import string import time -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg, check_supported_nic from pmd_output import PmdOutput from packet import Packet from rte_flow_common import RssProcessing @@ -831,28 +831,32 @@ class Cvl_advance_iavf_rss_vlan_ah_l2tp_pfcp(TestCase): self.pkt = Packet() self.pmd_output = PmdOutput(self.dut) - self.ddp_dir = "/lib/firmware/updates/intel/ice/ddp/" - conf_file = 'conf/cvl_advanced_rss_pppoe.cfg' - conf_info = UserConf(conf_file) - conf_section = conf_info.conf._sections['suite'] - self.os_default_package = conf_section['os_default_package_file_location'] - self.comms_package = conf_section['comms_package_file_location'] - self.ice_driver = conf_section['ice_driver_file_location'] self.symmetric = False self.rxq = 16 self.rsspro = RssProcessing(self, self.pmd_output, [self.tester_iface0, self.tester_iface1], self.rxq) self.logger.info('rssprocess.tester_ifaces: {}'.format(self.rsspro.tester_ifaces)) self.logger.info('rssprocess.test_case: {}'.format(self.rsspro.test_case)) + self.switch_testpmd(symmetric=self.symmetric) + self.dut_session = self.dut.new_session() def set_up(self): """ Run before each test case. """ - pass + # check testpmd process status + cmd = "ps -aux | grep testpmd | grep -v grep" + out = self.dut_session.send_expect(cmd, "#", 15) + if "testpmd" not in out: + self.switch_testpmd(symmetric=False) + + if self.running_case == "test_unsupported_pattern_with_OS_default_package": + self.dut.kill_all() + self.switch_testpmd(symmetric=True) def create_iavf(self): if self.vf_flag is False: self.dut.bind_interfaces_linux('ice') + self.dut.send_expect("ethtool --set-priv-flags %s vf-vlan-prune-disable on" % self.pf_interface, "# ") self.dut.generate_sriov_vfs_by_port(self.used_dut_port, 1) self.sriov_vfs_port = self.dut.ports_info[self.used_dut_port]['vfs_port'] self.vf_flag = True @@ -876,10 +880,10 @@ class Cvl_advance_iavf_rss_vlan_ah_l2tp_pfcp(TestCase): Run after each test case. """ # 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("flow flush 0", timeout=1) + self.pmd_output.execute_cmd("clear port stats all", timeout=1) self.pmd_output.execute_cmd("stop") - self.dut.kill_all() + self.pmd_output.execute_cmd("start") def tear_down_all(self): """ @@ -887,16 +891,7 @@ class Cvl_advance_iavf_rss_vlan_ah_l2tp_pfcp(TestCase): """ self.dut.kill_all() self.destroy_iavf() - - def replace_package(self, package='comms'): - ice_pkg_path = ''.join([self.ddp_dir,"ice.pkg"]) - self.dut.send_expect("rm -f {}".format(ice_pkg_path), "# ") - if package == 'os_default': - self.dut.send_expect("cp {} {}".format(self.os_default_package,ice_pkg_path), "# ") - elif package == 'comms': - self.dut.send_expect("cp {} {}".format(self.comms_package,ice_pkg_path), "# ") - self.dut.send_expect("rmmod ice", "# ", 15) - self.dut.send_expect("insmod {}".format(self.ice_driver), "# ",) + self.dut.send_expect("ethtool --set-priv-flags %s vf-vlan-prune-disable off" % self.pf_interface, "# ") def launch_testpmd(self, symmetric=False): param = "--rxq=16 --txq=16" @@ -919,48 +914,47 @@ class Cvl_advance_iavf_rss_vlan_ah_l2tp_pfcp(TestCase): def _gener_str(self, str_len=6): return ''.join(random.sample(string.ascii_letters + string.digits, k=str_len)) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv4_pfcp_session(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_pfcp_session) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv6_pfcp_session(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_pfcp_session) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv4_l2tpv3(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_l2tpv3) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv6_l2tpv3(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_l2tpv3) + @skip_unsupported_pkg("os default") def test_mac_ipv4_esp(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_esp) + @skip_unsupported_pkg('os default') def test_mac_ipv4_udp_esp(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_udp_esp) + @skip_unsupported_pkg('os default') def test_mac_ipv6_esp(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_esp) + @skip_unsupported_pkg('os default') def test_mac_ipv6_udp_esp(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_udp_esp) + @skip_unsupported_pkg("os default") def test_mac_ipv4_ah(self): - self.switch_testpmd() self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_ah) + @skip_unsupported_pkg('os default') def test_mac_ipv6_ah(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_ah) def test_wrong_hash_input_set(self): - self.switch_testpmd(symmetric=False) rule_list = [ 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types l2-src-only l2-dst-only end key_len 0 queues end / end', 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-tcp end key_len 0 queues end / end', @@ -971,23 +965,18 @@ class Cvl_advance_iavf_rss_vlan_ah_l2tp_pfcp(TestCase): self.rsspro.create_rule(rule, check_stats=False, msg='Invalid argument') def test_void_action(self): - self.switch_testpmd(symmetric=False) rule = 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions end' self.rsspro.create_rule(rule, check_stats=False, msg='Invalid argument') self.rsspro.check_rule(stats=False, rule_list=[rule]) def test_delete_nonexisting_rule(self): - self.switch_testpmd(symmetric=False) self.rsspro.check_rule(stats=False) out = self.dut.send_command("flow destroy 0 rule 0", timeout=1) self.verify('error' not in out, 'delete nonexisting rule raise err,expected no err') self.dut.send_command("flow flush 0", timeout=1) + @skip_unsupported_pkg(['comms', 'wireless']) def test_unsupported_pattern_with_OS_default_package(self): - self.destroy_iavf() - self.replace_package('os_default') - self.create_iavf() - self.switch_testpmd(symmetric=True) rule_list = [ 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', @@ -997,14 +986,9 @@ class Cvl_advance_iavf_rss_vlan_ah_l2tp_pfcp(TestCase): self.rsspro.create_rule(rule_list, check_stats=False, msg='Invalid argument') self.rsspro.check_rule(stats=False) self.dut.kill_all() - self.destroy_iavf() - self.replace_package('comms') - self.create_iavf() - self.switch_testpmd(symmetric=True) - self.rsspro.create_rule(rule_list, check_stats=True) + self.switch_testpmd(symmetric=False) def test_invalid_port(self): - self.switch_testpmd(symmetric=False) rule = 'flow create 1 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end' self.rsspro.create_rule(rule, check_stats=False, msg='No such device') self.rsspro.check_rule(stats=False, rule_list=[rule]) @@ -1014,33 +998,25 @@ class Cvl_advance_iavf_rss_vlan_ah_l2tp_pfcp(TestCase): self.verify(result, 'actual result not match expected,expected result is:{}'.format(pattern)) def test_mac_vlan_ipv4_pay(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_pay) def test_mac_vlan_ipv4_udp_pay(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_udp_pay) def test_mac_vlan_ipv4_tcp_pay(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_tcp_pay) def test_mac_vlan_ipv4_sctp_pay(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_sctp_pay) def test_mac_vlan_ipv6_pay(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_pay) def test_mac_vlan_ipv6_udp_pay(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_udp_pay) def test_mac_vlan_ipv6_tcp_pay(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_tcp_pay) def test_mac_vlan_ipv6_sctp_pay(self): - self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_sctp_pay) diff --git a/tests/TestSuite_cvl_fdir.py b/tests/TestSuite_cvl_fdir.py index 549256b..1d41944 100644 --- a/tests/TestSuite_cvl_fdir.py +++ b/tests/TestSuite_cvl_fdir.py @@ -37,7 +37,7 @@ import os from packet import Packet from pmd_output import PmdOutput -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg import rte_flow_common as rfc from utils import GREEN, RED @@ -2825,6 +2825,7 @@ class TestCVLFdir(TestCase): out = self.pmd_output.execute_cmd("flow query 0 0 count") self.verify("Flow rule #0 not found" in out, "query should failed") + @skip_unsupported_pkg('os default') def test_multi_patterns_mark_count_query(self): rule1 = 'flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / tcp src is 22 dst is 23 / end actions queue index 1 / mark id 0 / count / end' rule2 = 'flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.21 / udp src is 22 dst is 23 / end actions drop / mark id 1 / count / end' @@ -2943,6 +2944,7 @@ class TestCVLFdir(TestCase): out2 = self.send_pkts_getouput(pkts=pkt, port_id=1) rfc.check_mark(out2, pkt_num=1, check_param={"port_id": 1, "queue": [2, 3], "rss": True}, stats=False) + @skip_unsupported_pkg('os default') def test_two_ports_multi_patterns_count_query(self): rules = [ 'flow create 1 ingress pattern eth / ipv4 dst is 192.168.0.21 proto is 255 tos is 4 / end actions queue index 1 / mark id 1 / count identifier 0x1234 shared on / end', @@ -3161,15 +3163,19 @@ class TestCVLFdir(TestCase): def test_mac_ipv4_tun_mac_ipv4_sctp(self): self._rte_flow_validate(vectors_mac_ipv4_tun_mac_ipv4_sctp) + @skip_unsupported_pkg('os default') def test_mac_ipv4_gtpu_eh(self): self._rte_flow_validate(vectors_mac_ipv4_gtpu_eh) + @skip_unsupported_pkg('os default') def test_mac_ipv4_gtpu(self): self._rte_flow_validate(vectors_mac_ipv4_gtpu) + @skip_unsupported_pkg('os default') def test_mac_ipv6_gtpu_eh(self): self._rte_flow_validate(vectors_mac_ipv6_gtpu_eh) + @skip_unsupported_pkg('os default') def test_mac_ipv6_gtpu(self): self._rte_flow_validate(vectors_mac_ipv6_gtpu) diff --git a/tests/TestSuite_iavf_fdir.py b/tests/TestSuite_iavf_fdir.py index e83855d..a404814 100644 --- a/tests/TestSuite_iavf_fdir.py +++ b/tests/TestSuite_iavf_fdir.py @@ -35,7 +35,7 @@ import time from packet import Packet from pmd_output import PmdOutput -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg import rte_flow_common as rfc from rte_flow_common import CVL_TXQ_RXQ_NUMBER from multiprocessing import Process @@ -2234,8 +2234,6 @@ class TestIAVFFdir(TestCase): """ Run before each test case. """ - self.re_load_ice_driver() - time.sleep(1) self.setup_2pf_4vf_env() time.sleep(1) self.launch_testpmd() @@ -2308,16 +2306,6 @@ class TestIAVFFdir(TestCase): self.dut.destroy_sriov_vfs_by_port(self.dut_ports[0]) self.dut.destroy_sriov_vfs_by_port(self.dut_ports[1]) - def re_load_ice_driver(self): - """ - remove and reload the ice driver - """ - self.dut.send_expect("rmmod ice", "# ", 40) - ice_driver_file_location = self.suite_config["ice_driver_file_location"] - self.dut.send_expect("insmod %s" % ice_driver_file_location, "# ") - self.dut.send_expect("ifconfig %s up" % self.pf0_intf, "# ", 15) - self.dut.send_expect("ifconfig %s up" % self.pf1_intf, "# ", 15) - def config_testpmd(self): self.pmd_output.execute_cmd("set fwd rxonly") self.pmd_output.execute_cmd("set verbose 1") @@ -2474,39 +2462,51 @@ class TestIAVFFdir(TestCase): def test_mac_ipv6_sctp(self): self.rte_flow_process(vectors_ipv6_sctp) + @skip_unsupported_pkg('os default') def test_mac_ipv4_gtpu_eh(self): self.rte_flow_process(vectors_ipv4_gtpu_eh) + @skip_unsupported_pkg('os default') def test_mac_ipv4_gtpu(self): self.rte_flow_process(vectors_ipv4_gtpu) + @skip_unsupported_pkg('os default') def test_mac_ipv6_gtpu_eh(self): self.rte_flow_process(vectors_ipv6_gtpu_eh) + @skip_unsupported_pkg('os default') def test_mac_ipv6_gtpu(self): self.rte_flow_process(vectors_ipv6_gtpu) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv4_l2tpv3(self): self.rte_flow_process(vectors_ipv4_l2tpv3) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv6_l2tpv3(self): self.rte_flow_process(vectors_ipv6_l2tpv3) + @skip_unsupported_pkg('os default') def test_mac_ipv4_esp(self): self.rte_flow_process(vectors_ipv4_esp) + @skip_unsupported_pkg('os default') def test_mac_ipv6_esp(self): self.rte_flow_process(vectors_ipv6_esp) + @skip_unsupported_pkg('os default') def test_mac_ipv4_ah(self): self.rte_flow_process(vectors_ipv4_ah) + @skip_unsupported_pkg('os default') def test_mac_ipv6_ah(self): self.rte_flow_process(vectors_ipv6_ah) + @skip_unsupported_pkg('os default') def test_mac_ipv4_nat_t_esp(self): self.rte_flow_process(vectors_ipv4_nat_t_esp) + @skip_unsupported_pkg('os default') def test_mac_ipv6_nat_t_esp(self): self.rte_flow_process(vectors_ipv6_nat_t_esp) @@ -2586,6 +2586,7 @@ class TestIAVFFdir(TestCase): out4 = self.send_pkts_getouput(MAC_IPV6_PAY_protocol["match"]) rfc.check_iavf_fdir_mark(out4, pkt_num=6, check_param={"port_id": 0, "passthru": 1}, stats=False) + @skip_unsupported_pkg('os default') def test_mac_ipv4_gtpu_eh_without_teid(self): rules = ["flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end", \ "flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc qfi is 0x34 / end actions queue index 1 / mark id 3 / end"] @@ -2621,6 +2622,7 @@ class TestIAVFFdir(TestCase): out3 = self.send_pkts_getouput(MAC_IPV4_GTPU_EH_WITHOUT_TEID["match"]) rfc.check_iavf_fdir_mark(out3, pkt_num=1, check_param={"port_id": 0, "passthru": 1}, stats=False) + @skip_unsupported_pkg('os default') def test_mac_ipv4_gtpu_eh_without_qfi(self): rules = ["flow create 0 ingress pattern eth / ipv4 / udp / gtpu / gtp_psc / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end", \ "flow create 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc / end actions rss queues 2 3 end / mark id 1 / end"] @@ -2702,6 +2704,7 @@ class TestIAVFFdir(TestCase): out7 = self.send_pkts_getouput(pkts["mismatch"][7]) rfc.check_iavf_fdir_mark(out7, pkt_num=1, check_param={"port_id": 0, "drop": True}, stats=False) + @skip_unsupported_pkg('os default') def test_mac_outer_co_exist_gtpu_eh_dst(self): rules = ["flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.31 / udp / gtpu / gtp_psc / end actions rss queues 1 2 end / mark id 1 / end", \ "flow create 0 ingress pattern eth / ipv6 dst is ::32 / udp / gtpu / gtp_psc / end actions rss queues 3 4 5 6 end / mark id 2 / end",\ @@ -2733,6 +2736,7 @@ class TestIAVFFdir(TestCase): } self.run_coexist_outer_gtpu(rules, MAC_GTPU_EH) + @skip_unsupported_pkg('os default') def test_mac_outer_co_exist_gtpu_dst(self): rules = ["flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.31 / udp / gtpu / end actions rss queues 1 2 end / mark id 1 / end", \ "flow create 0 ingress pattern eth / ipv6 dst is ::32 / udp / gtpu / end actions rss queues 3 4 5 6 end / mark id 2 / end",\ @@ -2764,6 +2768,7 @@ class TestIAVFFdir(TestCase): } self.run_coexist_outer_gtpu(rules, MAC_GTPU) + @skip_unsupported_pkg('os default') def test_mac_outer_co_exist_gtpu_eh_src(self): rules = ["flow create 0 ingress pattern eth / ipv4 src is 192.168.0.21 / udp / gtpu / gtp_psc / end actions rss queues 1 2 end / mark id 1 / end", \ "flow create 0 ingress pattern eth / ipv6 src is ::12 / udp / gtpu / gtp_psc / end actions rss queues 3 4 5 6 end / mark id 2 / end",\ @@ -2795,6 +2800,7 @@ class TestIAVFFdir(TestCase): } self.run_coexist_outer_gtpu(rules, MAC_GTPU_EH) + @skip_unsupported_pkg('os default') def test_mac_outer_co_exist_gtpu_src(self): rules = ["flow create 0 ingress pattern eth / ipv4 src is 192.168.0.21 / udp / gtpu / end actions rss queues 1 2 end / mark id 1 / end", \ "flow create 0 ingress pattern eth / ipv6 src is ::12 / udp / gtpu / end actions rss queues 3 4 5 6 end / mark id 2 / end",\ @@ -2826,6 +2832,7 @@ class TestIAVFFdir(TestCase): } self.run_coexist_outer_gtpu(rules, MAC_GTPU) + @skip_unsupported_pkg('os default') def test_mac_outer_co_exist_gtpu_mix(self): rules = ["flow create 0 ingress pattern eth / ipv4 src is 192.168.0.21 dst is 192.168.0.31 / udp / gtpu / gtp_psc / end actions rss queues 1 2 end / mark id 1 / end", \ "flow create 0 ingress pattern eth / ipv6 src is ::12 dst is ::32 / udp / gtpu / gtp_psc / end actions rss queues 3 4 5 6 end / mark id 2 / end",\ @@ -2858,6 +2865,7 @@ class TestIAVFFdir(TestCase): self.run_coexist_outer_gtpu(rules, MAC_GTPU_MIX) + @skip_unsupported_pkg(['os default', 'wireless']) def test_pfcp(self): # open the RSS function for PFCP session packet. out = self.pmd_output.execute_cmd("flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end") @@ -2866,6 +2874,7 @@ class TestIAVFFdir(TestCase): self.verify("Flow rule #1 created" in out, "failed to enable RSS function for MAC_IPV6_PFCP session packet") self.multirules_process(vectors_pfcp) + @skip_unsupported_pkg('os default') def test_l2_ethertype(self): self.multirules_process(vectors_l2_ethertype) @@ -2955,6 +2964,7 @@ class TestIAVFFdir(TestCase): self.check_fdir_rule(port_id=0, stats=False) self.check_fdir_rule(port_id=1, stats=False) + @skip_unsupported_pkg(['comms', 'wireless']) def test_unsupported_pattern_with_OS_package(self): """ Create GTPU rule, PFCP rule, L2 Ethertype rule, l2tpv3 rule and esp rule with OS default package @@ -2964,24 +2974,11 @@ class TestIAVFFdir(TestCase): "flow create 0 ingress pattern eth type is 0x8863 / end actions queue index 1 / mark id 1 / end", "flow create 0 ingress pattern eth / ipv4 / l2tpv3oip session_id is 17 / end actions rss queues 1 2 end / mark id 6 / end", "flow create 0 ingress pattern eth / ipv6 / udp / esp spi is 6 / end actions rss queues 1 2 end / mark id 6 / end"] - self.destroy_env() - os_package_location = self.suite_config["os_default_package_file_location"] - comms_package_location = self.suite_config["comms_package_file_location"] - package_location = self.suite_config["package_file_location"] - self.dut.send_expect("cp %s %s" % (os_package_location, package_location), "# ") - self.re_load_ice_driver() - self.setup_2pf_4vf_env() self.launch_testpmd() - self.validate_fdir_rule(rule, check_stats=False) self.create_fdir_rule(rule, check_stats=False) self.check_fdir_rule(port_id=0, stats=False) - self.destroy_env() - self.dut.send_expect("cp %s %s" % (comms_package_location, package_location), "# ") - self.re_load_ice_driver() - self.setup_2pf_4vf_env() - def test_create_same_rule_on_pf_vf(self): """ create same rules on pf and vf, no conflict @@ -3441,6 +3438,7 @@ class TestIAVFFdir(TestCase): self.dut.close_session(self.session_secondary) self.dut.close_session(self.session_third) + @skip_unsupported_pkg(['os default', 'wireless']) def test_maxnum_128_profiles(self): """ There are 128 profiles in total. @@ -3883,6 +3881,7 @@ class TestIAVFFdir(TestCase): vlans.append(vlan) return vlans + @skip_unsupported_pkg(['os default', 'wireless']) def test_pfcp_vlan_strip_on_hw_checksum(self): """ Set PFCP FDIR rules @@ -3979,6 +3978,7 @@ class TestIAVFFdir(TestCase): self.verify(bad_ipcsum == 2, "Bad-ipcsum check error") self.verify(bad_l4csum == 4, "Bad-l4csum check error") + @skip_unsupported_pkg(['os default', 'wireless']) def test_pfcp_vlan_strip_off_sw_checksum(self): """ Set PFCP FDIR rules @@ -4073,6 +4073,7 @@ class TestIAVFFdir(TestCase): self.verify(bad_ipcsum == 2, "Bad-ipcsum check error") self.verify(bad_l4csum == 4, "Bad-l4csum check error") + @skip_unsupported_pkg(['os default', 'wireless']) def test_pfcp_vlan_insert_on(self): """ Set PFCP FDIR rules diff --git a/tests/TestSuite_l2tp_esp_coverage.py b/tests/TestSuite_l2tp_esp_coverage.py index 89f7cae..10520c8 100644 --- a/tests/TestSuite_l2tp_esp_coverage.py +++ b/tests/TestSuite_l2tp_esp_coverage.py @@ -33,7 +33,7 @@ import re import time from packet import Packet from pmd_output import PmdOutput -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg, check_supported_nic import rte_flow_common as rfc vf0_mac = "00:11:22:33:44:55" @@ -76,9 +76,10 @@ tv_MAC_IPV6_NAT_T_ESP_vlan = {'matched vlan': "Ether(dst='%s')/Dot1Q(vlan=1)/IPv 'dismatched vlan': "Ether(dst='%s')/Dot1Q(vlan=2)/IPv6()/UDP(dport=4500)/ESP(spi=1)/Raw('x'*480)" % vf0_mac, 'no vlan': "Ether(dst='%s')/IPv6()/UDP(dport=4500)/ESP(spi=1)/Raw('x'*480)" % vf0_mac} - class L2tpEspCoverage(TestCase): + supported_nic = ['columbiaville_100g', 'columbiaville_25g', 'columbiaville_25gx2'] + @check_supported_nic(supported_nic) def set_up_all(self): """ Run at the start of each test suite. @@ -95,7 +96,6 @@ class L2tpEspCoverage(TestCase): self.pf_interface = self.dut.ports_info[self.dut_ports[0]]['intf'] self.pf_mac = self.dut.get_mac_address(0) self.pf_pci = self.dut.ports_info[self.dut_ports[0]]['pci'] - self.verify(self.nic in ["columbiaville_25g", "columbiaville_100g"], "%s nic not support ethertype filter" % self.nic) self.vf_flag = False self.create_iavf() self.pkt = Packet() @@ -104,6 +104,7 @@ class L2tpEspCoverage(TestCase): """ Run before each test case. """ + cases_list = ["test_MAC_IPV4_L2TPv3_HW_checksum_vlan_strip", "test_MAC_IPV4_L2TPv3_SW_checksum_vlan_insertion"] self.dut.kill_all() def tear_down(self): @@ -156,21 +157,12 @@ class L2tpEspCoverage(TestCase): self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) self.dut.send_expect("set verbose 1", "testpmd> ", 15) - def enable_hw_checksum(self): - self.dut.send_expect("stop","testpmd> ") - self.dut.send_expect("port stop all","testpmd> ") - self.dut.send_expect("csum set ip hw 0","testpmd> ") - self.dut.send_expect("csum set udp hw 0","testpmd> ") - self.dut.send_expect("port start all","testpmd> ") - self.dut.send_expect("set fwd csum","testpmd> ") - self.dut.send_expect("set verbose 1","testpmd> ") - self.dut.send_expect("start","testpmd> ") - - def enable_sw_checksum(self): + def enable_checksum(self, param_type="hw"): + self.dut.send_expect("stop","testpmd> ") self.dut.send_expect("port stop all","testpmd> ") - self.dut.send_expect("csum set ip sw 0","testpmd> ") - self.dut.send_expect("csum set udp sw 0","testpmd> ") + self.dut.send_expect("csum set ip %s 0" % param_type,"testpmd> ") + self.dut.send_expect("csum set udp %s 0" % param_type,"testpmd> ") self.dut.send_expect("port start all","testpmd> ") self.dut.send_expect("set fwd csum","testpmd> ") self.dut.send_expect("set verbose 1","testpmd> ") @@ -221,30 +213,29 @@ class L2tpEspCoverage(TestCase): def test_MAC_IPV4_L2TPv3_HW_checksum(self): self.create_testpmd_command(self.vf0_prop,rx_checksum=1) - self.enable_hw_checksum() + self.enable_checksum() self.checksum_verify(tv_MAC_IPV4_L2TPv3_chksum) def test_MAC_IPV4_ESP_HW_checksum(self): self.create_testpmd_command(self.vf0_prop,rx_checksum=1) - self.enable_hw_checksum() + self.enable_checksum() self.checksum_verify(tv_MAC_IPV4_ESP_chksum) def test_MAC_IPV4_AH_HW_checksum(self): self.create_testpmd_command(self.vf0_prop,rx_checksum=1) - self.enable_hw_checksum() + self.enable_checksum() self.checksum_verify(tv_MAC_IPV4_AH_chksum) def test_MAC_IPV4_NAT_T_ESP_HW_checksum(self): self.create_testpmd_command(self.vf0_prop,rx_checksum=1) - self.enable_hw_checksum() + self.enable_checksum() self.checksum_verify(tv_MAC_IPV4_NAT_T_ESP_chksum) def test_MAC_IPV6_NAT_T_ESP_HW_checksum(self): self.create_testpmd_command(self.vf0_prop,rx_checksum=1) - self.enable_hw_checksum() + self.enable_checksum() self.checksum_verify(tv_MAC_IPV6_NAT_T_ESP_chksum) - - + def start_tcpdump(self, rxItf): self.tester.send_expect("rm -rf getPackageByTcpdump.cap", "#") self.tester.send_expect("tcpdump -A -nn -e -vv -w getPackageByTcpdump.cap -i %s 2> /dev/null& " % rxItf, "#") @@ -358,6 +349,7 @@ class L2tpEspCoverage(TestCase): tx_port = self.tx_iface self.pkt.send_pkt(crb=self.tester, tx_port=tx_port) + @skip_unsupported_pkg(['os default', 'wireless']) def test_MAC_IPV4_L2TPv3_HW_checksum_vlan_strip(self): self.create_testpmd_command(self.vf0_prop,rx_checksum=1) @@ -366,7 +358,7 @@ class L2tpEspCoverage(TestCase): self.dut.send_expect("vlan set strip on 0","testpmd> ") self.dut.send_expect("rx_vlan add 1 0","testpmd> ") - self.enable_hw_checksum() + self.enable_checksum() #create rule self.dut.send_expect("flow create 0 ingress pattern eth / ipv4 / l2tpv3oip session_id is 1 / end actions queue index 1 / mark id 4 / end","testpmd> ") self.dut.send_expect("flow create 0 ingress pattern eth / ipv4 / l2tpv3oip session_id is 2 / end actions queue index 2 / mark id 3 / end","testpmd> ") @@ -415,6 +407,7 @@ class L2tpEspCoverage(TestCase): receive_pkt = re.findall('vlan 1', tcpdump_out) self.verify(len(receive_pkt) == 1, 'vlan id strip on failed') + @skip_unsupported_pkg(['os default', 'wireless']) def test_MAC_IPV4_L2TPv3_SW_checksum_vlan_insertion(self): self.create_testpmd_command(self.vf0_prop,rx_checksum=1) @@ -446,7 +439,7 @@ class L2tpEspCoverage(TestCase): receive_pkt = re.findall('vlan 1', tcpdump_out) self.verify(len(receive_pkt) == 1, 'vlan insertion failed') - self.enable_sw_checksum() + self.enable_checksum("sw") # bad checksum + mismatched session id pkts="Ether(dst='00:11:22:33:44:55')/IP(proto=115,chksum=0x123)/L2TP(b'\\x00\\x00\\x00\\x11')/Raw('x'*480)" self.start_tcpdump(self.tx_iface) @@ -468,8 +461,8 @@ class L2tpEspCoverage(TestCase): # check the rx checksum bad_ipcsum = self.pmd_output.get_pmd_value("Bad-ipcsum:", out) self.verify(bad_ipcsum == 1, "bad ip csum check error") - + @skip_unsupported_pkg('os default') def test_MAC_IPV4_ESP_HW_checksum_vlan_strip(self): self.create_testpmd_command(self.vf0_prop,rx_checksum=1) @@ -478,7 +471,7 @@ class L2tpEspCoverage(TestCase): self.dut.send_expect("vlan set strip on 0","testpmd> ") self.dut.send_expect("rx_vlan add 1 0","testpmd> ") - self.enable_hw_checksum() + self.enable_checksum() #create rule self.dut.send_expect("flow create 0 ingress pattern eth / ipv4 / esp spi is 1 / end actions queue index 1 / mark id 4 / end","testpmd> ") self.dut.send_expect("flow create 0 ingress pattern eth / ipv4 / esp spi is 2 / end actions queue index 2 / mark id 3 / end","testpmd> ") @@ -527,6 +520,7 @@ class L2tpEspCoverage(TestCase): receive_pkt = re.findall('vlan 1', tcpdump_out) self.verify(len(receive_pkt) == 1, 'vlan id strip on failed') + @skip_unsupported_pkg('os default') def test_MAC_IPV4_NAT_T_ESP_SW_checksum_vlan_insertion(self): self.create_testpmd_command(self.vf0_prop,rx_checksum=1) @@ -557,7 +551,7 @@ class L2tpEspCoverage(TestCase): receive_pkt = re.findall('vlan 1', tcpdump_out) self.verify(len(receive_pkt) == 1, 'vlan insertion failed') - self.enable_sw_checksum() + self.enable_checksum("sw") # bad checksum + mismatched session id pkts="Ether(dst='00:11:22:33:44:55')/IP(chksum=0x123)/UDP(dport=4500)/ESP(spi=11)/Raw('x'*480)" self.start_tcpdump(self.tx_iface) From patchwork Thu Mar 18 05:27:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 89438 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 60621A0562; Thu, 18 Mar 2021 06:39:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 33A4114104A; Thu, 18 Mar 2021 06:39:57 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id B14FA141043 for ; Thu, 18 Mar 2021 06:39:54 +0100 (CET) IronPort-SDR: 0ZQpQc3TOfFlDVJUTPOBk30G2YjEoWbrKdme/nbiEHSCjSvrSG1Kmq/hNlBJT/qZDCCxwTkdc+ rKsuyPub+l2w== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="176736174" X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="176736174" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:53 -0700 IronPort-SDR: B6IH2eD5jRWOeX6L893na05CfpsNS3cKQuEVdXDLFDv66wOQ6HiE6OSJuQrY8lCcCcpNEXsc2y pA3qLYNZK+9Q== X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="406214326" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:52 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Thu, 18 Mar 2021 13:27:26 +0800 Message-Id: <1616045251-65532-4-git-send-email-zhiminx.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> References: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 3/8] tests/cvl_advanced_rss_pppoe:support nic and pkg check X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *.add nic and pkg check and remove other protocol case Signed-off-by: Zhimin Huang --- tests/TestSuite_cvl_advanced_rss_pppoe.py | 937 +----------------------------- 1 file changed, 12 insertions(+), 925 deletions(-) diff --git a/tests/TestSuite_cvl_advanced_rss_pppoe.py b/tests/TestSuite_cvl_advanced_rss_pppoe.py index bf5422d..0529165 100644 --- a/tests/TestSuite_cvl_advanced_rss_pppoe.py +++ b/tests/TestSuite_cvl_advanced_rss_pppoe.py @@ -28,425 +28,14 @@ # 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 random import string -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg from pmd_output import PmdOutput from packet import Packet from rte_flow_common import RssProcessing -from config import UserConf - -mac_ipv4_pfcp_session_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=2)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:54")/IP(src="192.168.0.25",dst="192.168.0.23")/UDP(sport=23,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=25)/Raw("x"*80)'] -} - -mac_ipv4_pfcp_session = { - 'sub_casename': 'mac_ipv4_pfcp_session', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv4_pfcp_session_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv4_pfcp_session_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv4_pfcp_session_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv4_pfcp_session_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv4_pfcp_session_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv6_pfcp_session_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=2)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=23,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=25)/Raw("x"*80)'] -} - -mac_ipv6_pfcp_session = { - 'sub_casename': 'mac_ipv6_pfcp_session', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv6 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv6_pfcp_session_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv6_pfcp_session_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv6_pfcp_session_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv6_pfcp_session_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv6_pfcp_session_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv4_l2tpv3_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.4", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x12\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.5",dst="192.168.0.7", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)' - ], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=25)/Raw("x"*80)' - ] -} - -mac_ipv4_l2tpv3 = { - 'sub_casename': 'mac_ipv4_l2tpv3', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv4_l2tpv3_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv4_l2tpv3_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv4_l2tpv3_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv4_l2tpv3_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv4_l2tpv3_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv6_l2tpv3_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x12\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)' - ], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=25)/Raw("x"*80)' - ] -} - -mac_ipv6_l2tpv3 = { - 'sub_casename': 'mac_ipv6_l2tpv3', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv6 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv6_l2tpv3_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv6_l2tpv3_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv6_l2tpv3_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv6_l2tpv3_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv6_l2tpv3_packets['match']], - 'action': 'check_no_hash', - } - ] -} - -mac_ipv4_esp_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.7",proto=50)/ESP(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=12)/Raw("x"*480)' - ] -} - -mac_ipv4_esp = { - 'sub_casename': 'mac_ipv4_esp', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / esp / end actions rss types esp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv4_esp_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv4_esp_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv4_esp_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [ - i for i in mac_ipv4_esp_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [ - i for i in mac_ipv4_esp_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv4_udp_esp_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.7")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)'] -} - -mac_ipv4_udp_esp = { - 'sub_casename': 'mac_ipv4_udp_esp', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / esp / end actions rss types esp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv4_udp_esp_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv4_udp_esp_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv4_udp_esp_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv4_udp_esp_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [ - i for i in mac_ipv4_esp_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv6_esp_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=50)/ESP(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)'] -} - -mac_ipv6_esp = { - 'sub_casename': 'mac_ipv6_esp', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv6 / esp / end actions rss types esp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv6_esp_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv6_esp_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv6_esp_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv6_esp_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv6_esp_packets['match']], - 'action': 'check_no_hash', - }, - ], -} - -mac_ipv6_udp_esp_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=11)/Raw("x"*480)'] -} - -mac_ipv6_udp_esp = { - 'sub_casename': 'mac_ipv6_udp_esp', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv6 / udp / esp / end actions rss types esp end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv6_udp_esp_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv6_udp_esp_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv6_udp_esp_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': mac_ipv6_udp_esp_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_ipv6_udp_esp_packets['match'], - 'action': 'check_no_hash', - }, - ], - -} - -mac_ipv4_ah_packets = { - 'match': ['Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.8",proto=51)/AH(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=25,dport=23)/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=11)/Raw("x"*480)'] -} - -mac_ipv4_ah = { - 'sub_casename': 'mac_ipv4_ah', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv4 / ah / end actions rss types ah end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv4_ah_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv4_ah_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv4_ah_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv4_ah_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv4_ah_packets['match']], - 'action': 'check_no_hash', - }, - ], - -} - -mac_ipv6_ah_packets = { - 'match': [ - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=11)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=12)/Raw("x"*480)', - 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=51)/AH(spi=11)/Raw("x"*480)'], - 'mismatch': [ - 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=11)/Raw("x"*480)', - 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)'] -} - -mac_ipv6_ah = { - 'sub_casename': 'mac_ipv6_ah', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / ipv6 / ah / end actions rss types ah end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_ipv6_ah_packets['match'][0], - 'action': 'save_hash', - }, - { - 'send_packet': mac_ipv6_ah_packets['match'][1], - 'action': 'check_hash_different', - }, - { - 'send_packet': mac_ipv6_ah_packets['match'][2], - 'action': 'check_hash_same', - }, - { - 'send_packet': [i for i in mac_ipv6_ah_packets['mismatch']], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': [i for i in mac_ipv6_ah_packets['match']], - 'action': 'check_no_hash', - }, - ], -} mac_pppoe_pay_packets = { 'mismatch': [ @@ -750,7 +339,6 @@ mac_pppoe_pay_l2_src_only_session_id = { ], } - mac_pppoe_ipv4_pay_packets = { 'mismatch': [ 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', @@ -918,7 +506,6 @@ mac_pppoe_ipv4_pay_l2_src_only_l2_dst_only = { 'post-test': mac_pppoe_ipv4_pay_post_test } - mac_pppoe_ipv4_pay_l3_src_only_packets = { 'mac_pppoe_ipv4_pay': [ 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', @@ -2329,6 +1916,7 @@ mac_pppoe_ipv4_tcp_pay_ipv4 = { }, ], } + mac_pppoe_ipv6_pay_packets = { 'mismatch': [ 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', @@ -4719,357 +4307,6 @@ simple_xor = { ], } -mac_vlan_ipv4_pay_packets = { - 'match': { - 'mac_vlan_ipv4_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/Raw("x" * 80)', - ], - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' - ] -} - -mac_vlan_ipv4_pay = { - 'sub_casename': 'mac_vlan_ipv4_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv4_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv4_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv4_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_pay_packets['mismatch'][0], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv4_udp_pay_packets = { - 'match': { - 'mac_vlan_ipv4_udp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/UDP(sport=19,dport=99)/Raw("x" * 80)', - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' - ] -} - -mac_vlan_ipv4_udp_pay = { - 'sub_casename': 'mac_vlan_ipv4_udp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / udp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv4_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv4_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv4_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv4_tcp_pay_packets = { - 'match': { - 'mac_vlan_ipv4_tcp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/TCP(sport=19,dport=99)/Raw("x" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)' - ] -} - -mac_vlan_ipv4_tcp_pay = { - 'sub_casename': 'mac_vlan_ipv4_tcp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / tcp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv4_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_tcp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv4_sctp_pay_packets = { - 'match': { - 'mac_vlan_ipv4_sctp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.5")/SCTP(sport=19,dport=99)/Raw("x" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)' - - ] -} - -mac_vlan_ipv4_sctp_pay = { - 'sub_casename': 'mac_vlan_ipv4_sctp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / sctp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv4_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv4_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv4_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv4_sctp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv6_pay_packets = { - 'match': { - 'mac_vlan_ipv6_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("y" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' - ] -} - -mac_vlan_ipv6_pay = { - 'sub_casename': 'mac_vlan_ipv6_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv6_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv6_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv6_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv6_udp_pay_packets = { - 'match': { - 'mac_vlan_ipv6_udp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=23,dport=99)/Raw("x" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)' - ] -} - -mac_vlan_ipv6_udp_pay = { - 'sub_casename': 'mac_vlan_ipv6_udp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / udp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv6_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv6_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv6_udp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_udp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv6_tcp_pay_packets = { - 'match': { - 'mac_vlan_ipv6_tcp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' - ] -} - -mac_vlan_ipv6_tcp_pay = { - 'sub_casename': 'mac_vlan_ipv6_tcp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / tcp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv6_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv6_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv6_tcp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_tcp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'], - 'action': 'check_no_hash', - }, - ], -} - -mac_vlan_ipv6_sctp_pay_packets = { - 'match': { - 'mac_vlan_ipv6_sctp_pay': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/SCTP(sport=25,dport=99)/Raw("x" * 80)' - ] - }, - 'mismatch': [ - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' - ] -} - -mac_vlan_ipv6_sctp_pay = { - 'sub_casename': 'mac_vlan_ipv6_sctp_pay', - 'port_id': 0, - 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / sctp / end actions rss types c-vlan end key_len 0 queues end / end', - 'test': [ - { - 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][0], - 'action': {'save_hash': 'mac_vlan_ipv6_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][1], - 'action': {'check_hash_different': 'mac_vlan_ipv6_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][2], - 'action': {'check_hash_same': 'mac_vlan_ipv6_sctp_pay_match'}, - }, - { - 'send_packet': mac_vlan_ipv6_sctp_pay_packets['mismatch'], - 'action': 'check_no_hash', - }, - ], - 'post-test': [ - { - 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'], - 'action': 'check_no_hash', - }, - ], -} - mac_vlan_pppoe_pay_l2_src_only_packets = [ 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', 'Ether(src="00:11:22:33:44:53", dst="10:22:33:44:55:66")/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/Raw("x"*80)', @@ -5251,14 +4488,14 @@ mac_vlan_pppoe_pay = [ ] -class Advanced_rss_pppoe_vlan_ah_l2tp_pfcp(TestCase): +class Advanced_rss_pppoe(TestCase): + @skip_unsupported_pkg(['os default', 'wireless']) def set_up_all(self): """ Run at the start of each test suite. Generic filter Prerequistites """ - # 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") @@ -5275,12 +4512,6 @@ class Advanced_rss_pppoe_vlan_ah_l2tp_pfcp(TestCase): self.pci_list.append(port['pci']) self.pkt = Packet() self.pmd_output = PmdOutput(self.dut) - self.ddp_dir = "/lib/firmware/updates/intel/ice/ddp/" - conf_file = 'conf/cvl_advanced_rss_pppoe.cfg' - conf_info = UserConf(conf_file) - conf_section = conf_info.conf._sections['suite'] - self.os_default_package = conf_section['os_default_package_file_location'] - self.comms_package = conf_section['comms_package_file_location'] self.symmetric = False self.rxq = 64 self.rsspro = RssProcessing(self, self.pmd_output, [self.tester_iface0, self.tester_iface1], self.rxq) @@ -5309,20 +4540,7 @@ class Advanced_rss_pppoe_vlan_ah_l2tp_pfcp(TestCase): """ self.dut.kill_all() - def replace_package(self, package='comms'): - ice_pkg_path = ''.join([self.ddp_dir,"ice.pkg"]) - self.dut.send_expect("rm -f {}".format(ice_pkg_path), "# ") - if package == 'os_default': - self.dut.send_expect("cp {} {}".format(self.os_default_package,ice_pkg_path), "# ") - elif package == 'comms': - self.dut.send_expect("cp {} {}".format(self.comms_package,ice_pkg_path), "# ") - for pci in self.pci_list: - self.dut.send_expect("echo {0} > /sys/bus/pci/devices/{0}/driver/unbind".format(pci), "# ", 60) - self.dut.send_expect("echo {} > /sys/bus/pci/drivers/ice/bind".format(pci), "# ", 60) - pci_str = ' '.join(self.pci_list) - self.dut.send_expect("./usertools/dpdk-devbind.py --force --bind=vfio-pci {}".format(pci_str), "# ", 60) - - def launch_testpmd(self, symmetric=False, package='comms'): + def launch_testpmd(self, symmetric=False): if symmetric: param = "--rxq=64 --txq=64" else: @@ -5330,14 +4548,6 @@ class Advanced_rss_pppoe_vlan_ah_l2tp_pfcp(TestCase): out = self.pmd_output.start_testpmd(cores="1S/4C/1T", param=param, eal_param=f"-w {self.pci_list[0]}", socket=self.ports_socket) self.symmetric = symmetric - package_version = re.search('Active\spackage\sis:\s(.+),', out).group(1) - self.logger.info('DDP package version: %s' % package_version) - if package == 'comms': - self.verify(package_version in self.comms_package.split('/')[-1], - 'package version not match') - elif package == 'os_default': - self.verify(package_version in self.os_default_package.split('/')[-1], - 'package version not match') if symmetric: # Need config rss in setup self.pmd_output.execute_cmd("port config all rss all") @@ -5345,56 +4555,15 @@ class Advanced_rss_pppoe_vlan_ah_l2tp_pfcp(TestCase): 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') - return package_version - def switch_testpmd(self, symmetric=True, pkg='comms'): + def switch_testpmd(self, symmetric=True): self.dut.kill_all() - self.launch_testpmd(symmetric, pkg) + self.launch_testpmd(symmetric) self.pmd_output.execute_cmd("start") def _gener_str(self, str_len=6): return ''.join(random.sample(string.ascii_letters + string.digits, k=str_len)) - def test_mac_ipv4_pfcp_session(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_pfcp_session) - - def test_mac_ipv6_pfcp_session(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_pfcp_session) - - def test_mac_ipv4_l2tpv3(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_l2tpv3) - - def test_mac_ipv6_l2tpv3(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_l2tpv3) - - def test_mac_ipv4_esp(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_esp) - - def test_mac_ipv4_udp_esp(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_udp_esp) - - def test_mac_ipv6_esp(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_esp) - - def test_mac_ipv6_udp_esp(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_udp_esp) - - def test_mac_ipv4_ah(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_ah) - - def test_mac_ipv6_ah(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_ah) - def test_mac_pppoe_pay(self): self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_pay) @@ -5423,6 +4592,10 @@ class Advanced_rss_pppoe_vlan_ah_l2tp_pfcp(TestCase): self.switch_testpmd(symmetric=False) self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv6_tcp_pay) + def test_mac_vlan_pppoe_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_pppoe_pay) + def test_mac_pppoe_ipv4_pay_symmetric(self): self.switch_testpmd(symmetric=True) self.rsspro.handle_rss_distribute_cases(cases_info=mac_pppoe_ipv4_pay_symmetric) @@ -5579,89 +4752,3 @@ class Advanced_rss_pppoe_vlan_ah_l2tp_pfcp(TestCase): ] self._two_rules_operation(rule_list, pkt_list, action_list2=['check_no_hash']) - def test_wrong_hash_input_set(self): - self.switch_testpmd(symmetric=True) - rule_list = [ - 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types l2-src-only l2-dst-only end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-tcp end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp l3-src-only end key_len 0 queues end / end'] - - for rule in rule_list: - self.rsspro.validate_rule(rule, check_stats=False, check_msg='Invalid argument') - self.rsspro.create_rule(rule, check_stats=False, msg='Invalid argument') - - def test_void_action(self): - self.switch_testpmd(symmetric=True) - rule = 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions end' - self.rsspro.validate_rule(rule, check_stats=False, check_msg='Invalid argument') - self.rsspro.create_rule(rule, check_stats=False, msg='Invalid argument') - self.rsspro.check_rule(stats=False, rule_list=[rule]) - - def test_delete_nonexisting_rule(self): - self.switch_testpmd(symmetric=True) - self.rsspro.check_rule(stats=False) - out = self.dut.send_command("flow destroy 0 rule 0", timeout=1) - self.verify('error' not in out, 'delete nonexisting rule raise err,expected no err') - self.dut.send_command("flow flush 0", timeout=1) - - def test_unsupported_pattern_with_OS_default_package(self): - self.replace_package('os_default') - self.switch_testpmd(symmetric=True, pkg='os_default') - rule_list = [ - 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / ipv4 / esp / end actions rss types esp end key_len 0 queues end / end', - 'flow create 0 ingress pattern eth / ipv4 / ah / end actions rss types ah end key_len 0 queues end / end' - ] - self.rsspro.validate_rule(rule_list, check_stats=False, check_msg='Invalid argument') - self.rsspro.create_rule(rule_list, check_stats=False, msg='Invalid argument') - self.rsspro.check_rule(stats=False) - self.dut.kill_all() - self.replace_package('comms') - self.launch_testpmd() - - def test_invalid_port(self): - self.switch_testpmd(symmetric=True) - rule = 'flow create 1 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end' - self.rsspro.create_rule(rule, check_stats=False, msg='No such device') - self.rsspro.check_rule(stats=False, rule_list=[rule]) - pattern = 'Invalid port 1' - out = self.dut.send_command("flow list 1", timeout=1) - result = re.search(r'%s' % pattern, out) - self.verify(result, 'actual result not match expected,expected result is:{}'.format(pattern)) - - def test_mac_vlan_ipv4_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_pay) - - def test_mac_vlan_ipv4_udp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_udp_pay) - - def test_mac_vlan_ipv4_tcp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_tcp_pay) - - def test_mac_vlan_ipv4_sctp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_sctp_pay) - - def test_mac_vlan_ipv6_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_pay) - - def test_mac_vlan_ipv6_udp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_udp_pay) - - def test_mac_vlan_ipv6_tcp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_tcp_pay) - - def test_mac_vlan_ipv6_sctp_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_sctp_pay) - - def test_mac_vlan_pppoe_pay(self): - self.switch_testpmd(symmetric=False) - self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_pppoe_pay) From patchwork Thu Mar 18 05:27:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 89439 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B9FB7A0564; Thu, 18 Mar 2021 06:39:57 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6593014104E; Thu, 18 Mar 2021 06:39:57 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 34969141040 for ; Thu, 18 Mar 2021 06:39:55 +0100 (CET) IronPort-SDR: 8KQwHi9A2Ijs25PytRSkfDtG0x5JTbguaKP8uD70I1Bs7/y2DqZxNgXLGl/gZ7vlrHJMmphmPL Jt4CQrEETLwg== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="176736176" X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="176736176" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:54 -0700 IronPort-SDR: zx8G7II9uxAb9Nmp+E4lRNSSGzP+z3b17tseQAsucRlW9pxcXAw1UliraKK3/jGCVBW3fbCzV0 U4G0QUQRviEw== X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="406214338" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:53 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Thu, 18 Mar 2021 13:27:27 +0800 Message-Id: <1616045251-65532-5-git-send-email-zhiminx.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> References: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 4/8] tests/cvl_dcf_switch_filter:support nic and pkg check X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *.split pppoe into new suite and pkg check Signed-off-by: Zhimin Huang --- tests/TestSuite_cvl_dcf_switch_filter.py | 542 ++----------------------------- 1 file changed, 21 insertions(+), 521 deletions(-) mode change 100644 => 100755 tests/TestSuite_cvl_dcf_switch_filter.py diff --git a/tests/TestSuite_cvl_dcf_switch_filter.py b/tests/TestSuite_cvl_dcf_switch_filter.py old mode 100644 new mode 100755 index 1904ef4..b9b6d3b --- a/tests/TestSuite_cvl_dcf_switch_filter.py +++ b/tests/TestSuite_cvl_dcf_switch_filter.py @@ -34,7 +34,7 @@ import time import re import copy -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg, check_supported_nic from pmd_output import PmdOutput from packet import Packet from utils import BLUE, RED, GREEN @@ -838,384 +838,6 @@ tv_add_two_rules_with_different_input_set_different_vf_id = { "expect_results":{"expect_pkts":[0, 0]}} } -tv_mac_pppoe_ipv4_pay_ip_address = { - "name":"tv_mac_pppoe_ipv4_pay_ip_address", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_ipv4_udp_pay = { - "name":"tv_mac_pppoe_ipv4_udp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port = { - "name":"tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_ipv4_tcp_pay = { - "name":"tv_mac_pppoe_ipv4_tcp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port = { - "name":"tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_ipv6_pay_ip_address = { - "name":"tv_mac_pppoe_ipv6_pay_ip_address", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_ipv6_udp_pay = { - "name":"tv_mac_pppoe_ipv6_udp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port = { - "name":"tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_ipv6_tcp_pay = { - "name":"tv_mac_pppoe_ipv6_tcp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port = { - "name":"tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipv4_pay_ip_address = { - "name":"tv_mac_vlan_pppoe_ipv4_pay_ip_address", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipv4_udp_pay = { - "name":"tv_mac_vlan_pppoe_ipv4_udp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port = { - "name":"tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipv4_tcp_pay = { - "name":"tv_mac_vlan_pppoe_ipv4_tcp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port = { - "name":"tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipv6_pay_ip_address = { - "name":"tv_mac_vlan_pppoe_ipv6_pay_ip_address", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipv6_udp_pay = { - "name":"tv_mac_vlan_pppoe_ipv6_udp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port = { - "name":"tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipv6_tcp_pay = { - "name":"tv_mac_vlan_pppoe_ipv6_tcp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port = { - "name":"tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_lcp_pay = { - "name":"tv_mac_pppoe_lcp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_pppoe_ipcp_pay = { - "name":"tv_mac_pppoe_ipcp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_lcp_pay = { - "name":"tv_mac_vlan_pppoe_lcp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_vlan_pppoe_ipcp_pay = { - "name":"tv_mac_vlan_pppoe_ipcp_pay", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - tv_mac_ipv4_drop = { "name": "tv_mac_ipv4_drop", "rte_flow_pattern": "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end actions drop / end", @@ -1367,6 +989,7 @@ sv_mac_test_drop_action = [ ] class CVLDCFSwitchFilterTest(TestCase): + supported_nic = ['columbiaville_100g', 'columbiaville_25g', 'columbiaville_25gx2'] def bind_nics_driver(self, ports, driver=""): # modprobe vfio driver @@ -1393,27 +1016,20 @@ class CVLDCFSwitchFilterTest(TestCase): if driver != driver_now: netdev.bind_driver(driver=driver) + @check_supported_nic(supported_nic) def set_up_all(self): """ Run at the start of each test suite. """ - self.verify(self.nic in ["columbiaville_25g","columbiaville_100g"], "nic is not CVL") self.dut_ports = self.dut.get_ports(self.nic) # Verify that enough ports are available self.verify(len(self.dut_ports) >= 1, "Insufficient ports") localPort = self.tester.get_local_port(self.dut_ports[0]) self.__tx_iface = self.tester.get_interface(localPort) - self.dut.send_expect("ifconfig %s up" % self.__tx_iface, "# ") self.pkt = Packet() self.testpmd_status = "close" #bind pf to kernel self.bind_nics_driver(self.dut_ports, driver="ice") - #move comms package to package folder - self.suite_config = rfc.get_suite_config(self) - comms_package_location = self.suite_config["comms_package_file_location"] - package_location = self.suite_config["package_file_location"] - self.dut.send_expect("cp %s %s" % (comms_package_location, package_location), "# ") - self.re_load_ice_driver() #set vf driver self.vf_driver = 'vfio-pci' @@ -1436,20 +1052,11 @@ class CVLDCFSwitchFilterTest(TestCase): port.bind_driver(self.vf_driver) time.sleep(5) - def re_load_ice_driver(self): - """ - remove and reload the ice driver - """ - ice_driver_file_location = self.suite_config["ice_driver_file_location"] - self.dut.send_expect("rmmod ice", "# ", 15) - self.dut.send_expect("insmod %s" % ice_driver_file_location, "# ", 60) - time.sleep(5) - def set_up(self): """ Run before each test case. """ - self.re_load_ice_driver() + pass def create_testpmd_command(self): """ @@ -1736,22 +1343,6 @@ class CVLDCFSwitchFilterTest(TestCase): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_mac_ipv4_tcp) - def test_mac_vlan_pppoe_ipv4_pay_session_id_proto_id(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id) - - def test_mac_vlan_pppoe_ipv6_pay_session_id_proto_id(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id) - - def test_mac_pppoe_ipv4_pay_session_id_proto_id(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_pay_session_id_proto_id) - - def test_mac_pppoe_ipv6_pay_session_id_proto_id(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_pay_session_id_proto_id) - def test_ip_multicast(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_ip_multicast) @@ -1792,34 +1383,42 @@ class CVLDCFSwitchFilterTest(TestCase): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_vlan_filter) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv4_l2tpv3(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_l2tpv3) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv6_l2tpv3(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv6_l2tpv3) + @skip_unsupported_pkg('os default') def test_mac_ipv4_esp(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_esp) + @skip_unsupported_pkg('os default') def test_mac_ipv6_esp(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv6_esp) + @skip_unsupported_pkg('os default') def test_mac_ipv4_ah(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_ah) + @skip_unsupported_pkg('os default') def test_mac_ipv6_ah(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv6_ah) + @skip_unsupported_pkg('os default') def test_mac_ipv4_nat_t_esp(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_nat_t_esp) + @skip_unsupported_pkg('os default') def test_mac_ipv6_nat_t_esp(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv6_nat_t_esp) @@ -1896,16 +1495,12 @@ class CVLDCFSwitchFilterTest(TestCase): #create MAC_IPV6_UDP_PAY rule, and check the rule will not be affected by the long rule failure self._rte_flow_validate_pattern(tv_mac_ipv6_udp_pay, launch_testpmd=False) + @skip_unsupported_pkg(['comms', 'wireless']) def test_unsupported_pattern_in_os_default(self): """ test with os default package """ #set up 4 vfs on 1 pf environment - os_package_location = self.suite_config["os_default_package_file_location"] - comms_package_location = self.suite_config["comms_package_file_location"] - package_location = self.suite_config["package_file_location"] - self.dut.send_expect("cp %s %s" % (os_package_location, package_location), "# ") - self.re_load_ice_driver() self.setup_1pf_vfs_env() #launch testpmd self.launch_testpmd() @@ -1928,8 +1523,6 @@ class CVLDCFSwitchFilterTest(TestCase): # destroy vfs for port_id in self.dut_ports: self.dut.destroy_sriov_vfs_by_port(port_id) - self.dut.send_expect("cp %s %s" % (comms_package_location, package_location), "# ") - self.re_load_ice_driver() def test_add_existing_rules_but_with_different_vfs(self): #set up 4 vfs on 1 pf environment @@ -2082,11 +1675,7 @@ class CVLDCFSwitchFilterTest(TestCase): #generate max_vf_number VFs on PF0 self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, max_vf_number, driver='default') self.sriov_vfs_port = self.dut.ports_info[self.used_dut_port_0]['vfs_port'] - #bind max_vf_number vfs to iavf - iavf_driver_file_location = self.suite_config["iavf_driver_file_location"] - self.dut.send_expect("rmmod iavf", "# ", 15) - self.dut.send_expect("insmod %s" % iavf_driver_file_location, "# ", 60) - time.sleep(2) + for port in self.sriov_vfs_port: port.bind_driver('iavf') #sort the vf interfaces and pcis by pcis @@ -2193,26 +1782,32 @@ class CVLDCFSwitchFilterTest(TestCase): matched_dic['expect_results'] = {"expect_pkts":0} self.send_and_check_packets(matched_dic) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv4_pfcp_node(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_pfcp_node) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv4_pfcp_session(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_pfcp_session) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv6_pfcp_node(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv6_pfcp_node) + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_ipv6_pfcp_session(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv6_pfcp_session) + @skip_unsupported_pkg(['os default', 'wireless']) def test_add_two_rules_with_different_input_set_same_vf_id(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_add_two_rules_with_different_input_set_same_vf_id) + @skip_unsupported_pkg(['os default', 'wireless']) def test_add_two_rules_with_different_input_set_different_vf_id(self): #set up 4 vfs on 1 pf environment self.setup_1pf_vfs_env() @@ -2229,102 +1824,7 @@ class CVLDCFSwitchFilterTest(TestCase): self.dut.send_expect("set verbose 1", "testpmd> ", 15) self._rte_flow_validate_pattern(tv_add_two_rules_with_different_input_set_different_vf_id, False) - def test_mac_pppoe_ipv4_pay_ip_address(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_pay_ip_address) - - def test_mac_pppoe_ipv4_udp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_udp_pay) - - def test_mac_pppoe_ipv4_udp_pay_non_src_dst_port(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port) - - def test_mac_pppoe_ipv4_tcp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_tcp_pay) - - def test_mac_pppoe_ipv4_tcp_pay_non_src_dst_port(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port) - - def test_mac_pppoe_ipv6_pay_ip_address(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_pay_ip_address) - - def test_mac_pppoe_ipv6_udp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_udp_pay) - - def test_mac_pppoe_ipv6_udp_pay_non_src_dst_port(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port) - - def test_mac_pppoe_ipv6_tcp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_tcp_pay) - - def test_mac_pppoe_ipv6_tcp_pay_non_src_dst_port(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port) - - def test_mac_vlan_pppoe_ipv4_pay_ip_address(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_pay_ip_address) - - def test_mac_vlan_pppoe_ipv4_udp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_udp_pay) - - def test_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port) - - def test_mac_vlan_pppoe_ipv4_tcp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_tcp_pay) - - def test_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port) - - def test_mac_vlan_pppoe_ipv6_pay_ip_address(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_pay_ip_address) - - def test_mac_vlan_pppoe_ipv6_udp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_udp_pay) - - def test_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port) - - def test_mac_vlan_pppoe_ipv6_tcp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_tcp_pay) - - def test_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port) - - def test_mac_pppoe_lcp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_lcp_pay) - - def test_mac_pppoe_ipcp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipcp_pay) - - def test_mac_vlan_pppoe_lcp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_lcp_pay) - - def test_mac_vlan_pppoe_ipcp_pay(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipcp_pay) - + @skip_unsupported_pkg(['os default', 'wireless']) def test_mac_drop_action(self): self.setup_1pf_vfs_env() self.dut.send_expect('ip link set %s vf 1 mac "00:11:22:33:44:55"' % self.pf0_intf, '# ') From patchwork Thu Mar 18 05:27:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 89440 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 98F33A0561; Thu, 18 Mar 2021 06:40:02 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 930EF14104D; Thu, 18 Mar 2021 06:40:02 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 163D8141049 for ; Thu, 18 Mar 2021 06:39:59 +0100 (CET) IronPort-SDR: U/1eSRizHiryfbg6iEVjg9HYMCAbAIhB+ncer2zqbg0A77awVFZt+nOxWpZ/hS5QNuDhEIFj9d 9tVOZFNuJBtA== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="176736181" X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="176736181" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:58 -0700 IronPort-SDR: zPHdDh1AZwvKDcNGb8kO5QVN5m+iDrDy11fj1gjVGAtapLlIDYMvgOWy1RrWuWgxf6Vtcjtkpr NJDlVIub/JKw== X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="406214342" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:54 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Thu, 18 Mar 2021 13:27:28 +0800 Message-Id: <1616045251-65532-6-git-send-email-zhiminx.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> References: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 5/8] tests/cvl_switch_filter:support nic and pkg check X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *.split pppoe into new suite and add pkg check Signed-off-by: Zhimin Huang --- tests/TestSuite_cvl_switch_filter.py | 2761 ++-------------------------------- 1 file changed, 134 insertions(+), 2627 deletions(-) diff --git a/tests/TestSuite_cvl_switch_filter.py b/tests/TestSuite_cvl_switch_filter.py index cc0283b..dcf9a57 100644 --- a/tests/TestSuite_cvl_switch_filter.py +++ b/tests/TestSuite_cvl_switch_filter.py @@ -37,7 +37,7 @@ import copy import random from itertools import groupby -from test_case import TestCase +from test_case import TestCase, skip_unsupported_pkg from pmd_output import PmdOutput from packet import Packet from utils import BLUE, RED, GREEN @@ -1618,69 +1618,6 @@ tvs_ethertype_filter_pppoed = [ tv_ethertype_filter_pppoed_drop_02 ] -#test vector ethertype_filter_pppoes -ethertype_filter_pppoes_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55", type=0x8864)/PPPoE(sessionid=3)/Raw("x" *80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55", type=0x8863)/PPPoED()/Raw("x" *80)' - ] -} - -tv_ethertype_filter_pppoes_in_queue_01 = { - "name":"tv_ethertype_filter_pppoes_in_queue_01", - "rte_flow_pattern":"flow create 0 ingress pattern eth type is 0x8864 / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":ethertype_filter_pppoes_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":ethertype_filter_pppoes_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}} -} - -tv_ethertype_filter_pppoes_queue_region_02 = { - "name":"tv_ethertype_filter_pppoes_queue_region_02", - "rte_flow_pattern":"flow create 0 ingress pattern eth type is 0x8864 / end actions rss queues 4 5 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":ethertype_filter_pppoes_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":ethertype_filter_pppoes_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":1}} -} - -tv_ethertype_filter_pppoes_drop_03 = { - "name":"tv_ethertype_filter_pppoes_drop_03", - "rte_flow_pattern":"flow create 0 ingress pattern eth type is 0x8864 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":ethertype_filter_pppoes_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":ethertype_filter_pppoes_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}} -} - -tvs_ethertype_filter_pppoes = [ - tv_ethertype_filter_pppoes_in_queue_01, - tv_ethertype_filter_pppoes_queue_region_02, - tv_ethertype_filter_pppoes_drop_03 - ] - #non-tunnel pipeline mode #test vector mac_ipv4_frag_pipeline_mode mac_ipv4_frag_pipeline_mode_scapy_str = { @@ -2583,2056 +2520,146 @@ tvs_mac_ipv6_tcp_non_pipeline_mode = [ tv_mac_ipv6_tcp_drop_queue_02 ] -#20.08 -mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x"*80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv4_pay_session_id_proto_id_in_queue_01", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":4}} -} +test_results = OrderedDict() -tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv4_pay_session_id_proto_id_queue_region_02", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions rss queues 4 5 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":4}} -} +class CVLSwitchFilterTest(TestCase): -tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_drop_03 = { - "name":"tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_drop_03", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} + def bind_nics_driver(self, ports, driver=""): + # modprobe vfio driver + if driver == "vfio-pci": + for port in ports: + netdev = self.dut.ports_info[port]['port'] + driver = netdev.get_nic_driver() + if driver != 'vfio-pci': + netdev.bind_driver(driver='vfio-pci') -tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id = [ - tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_in_queue_01, - tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_queue_region_02, - tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_drop_03 - ] + elif driver == "igb_uio": + # igb_uio should insmod as default, no need to check + for port in ports: + netdev = self.dut.ports_info[port]['port'] + driver = netdev.get_nic_driver() + if driver != 'igb_uio': + netdev.bind_driver(driver='igb_uio') + else: + for port in ports: + netdev = self.dut.ports_info[port]['port'] + driver_now = netdev.get_nic_driver() + if driver == "": + driver = netdev.default_driver + if driver != driver_now: + netdev.bind_driver(driver=driver) + def set_up_all(self): + """ + Run at the start of each test suite. + """ + self.verify(self.nic in ["columbiaville_25g","columbiaville_100g"], "%s nic not support CVL switch filter" % self.nic) + self.dut_ports = self.dut.get_ports(self.nic) + # Verify that enough ports are available + self.verify(len(self.dut_ports) >= 1, "Insufficient ports") + localPort = self.tester.get_local_port(self.dut_ports[0]) + self.__tx_iface = self.tester.get_interface(localPort) + self.dut.send_expect("ifconfig %s up" % self.__tx_iface, "# ") + self.pkt = Packet() + self.pmd = PmdOutput(self.dut) -mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' - ] -} + self.generate_file_with_fdir_rules() + self.path = self.dut.apps_name['test-pmd'] -tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv6_pay_session_id_proto_id_in_queue_01", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":4}} -} + def set_up(self): + """ + Run before each test case. + """ -tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv6_pay_session_id_proto_id_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions rss queues 4 5 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions rss queues 4 5 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":4}} -} + def generate_file_with_fdir_rules(self): + """ + generate file with fdir rules to make fdir table full, then test switch filter + """ + pf_pci = self.dut.ports_info[0]['pci'] + out = self.pmd.start_testpmd('default', eal_param='-a %s --log-level=ice,7'%pf_pci) + self.dut.send_expect("quit", "# ") + self.fdir_rule_number = self.pmd.get_max_rule_number(self,out) + src_file = 'dep/testpmd_cmds_rte_flow_fdir_rules' + flows = open(src_file, mode='w') + rule_count = 1 + for i in range(0,255): + for j in range(0,255): + if not rule_count > self.fdir_rule_number: + flows.write('flow create 0 ingress pattern eth / ipv4 src is 192.168.%d.%d dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end \n' % (i, j)) + rule_count += 1 + else: + break + if rule_count > self.fdir_rule_number: + break + flows.close() + self.dut_file_dir = '/tmp' + self.dut.session.copy_file_to(src_file, self.dut_file_dir) + self.fdir_file = "/tmp/testpmd_cmds_rte_flow_fdir_rules" -tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_drop_03 = { - "name":"mac_vlan_pppoe_ipv6_pay_session_id_proto_id_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} + def create_testpmd_command(self): + """ + Create testpmd command for non-pipeline mode + """ + #Prepare testpmd EAL and parameters + all_eal_param = self.dut.create_eal_parameters(cores='1S/4C/1T', ports=[0]) + command = self.path + all_eal_param + " --log-level=\"ice,8\" -- -i --rxq=16 --txq=16 --cmdline-file=%s" % self.fdir_file + # command = "./%s/app/testpmd %s --log-level=\"ice,8\" -- -i %s" % (self.dut.target, all_eal_param, "--rxq=16 --txq=16") + return command -tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id = [ - tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_in_queue_01, - tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_queue_region_02, - tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_drop_03 - ] + def create_testpmd_command_pipeline_mode(self): + """ + Create testpmd command for pipeline mode + """ + #Prepare testpmd EAL and parameters + all_eal_param = self.dut.create_eal_parameters(cores='1S/4C/1T', ports=[0], port_options={0:"pipeline-mode-support=1"}) + command = self.path + all_eal_param + " --log-level=\"ice,8\" -- -i --rxq=16 --txq=16" + return command -mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)' - ] -} + def launch_testpmd(self, is_non_pipeline): + """ + launch testpmd with the command + """ + if is_non_pipeline: + command = self.create_testpmd_command() + else: + command = self.create_testpmd_command_pipeline_mode() + out = self.dut.send_expect(command, "testpmd> ", 300) + self.dut.send_expect("port config all rss all", "testpmd> ", 15) + self.dut.send_expect("port config 0 rss-hash-key ipv4 1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd", "testpmd> ", 15) + self.dut.send_expect("rx_vxlan_port add 4789 0", "testpmd> ", 15) + self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) + self.dut.send_expect("set verbose 1", "testpmd> ", 15) -tv_mac_pppoe_ipv4_pay_session_id_proto_id_in_queue_01 = { - "name":"mac_pppoe_ipv4_pay_session_id_proto_id_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions queue index 2 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":3}} -} + def send_and_check_packets(self, dic, port): + """ + general packets processing workflow. + """ + #Specify the port to use + dic["check_func"]["param"]["expect_port"] = port + self.dut.send_expect("start", "testpmd> ", 15) + time.sleep(2) + #send packets + self.pkt.update_pkt(dic["scapy_str"]) + self.pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1, timeout=370) + time.sleep(3) + out = self.dut.send_expect("stop", "testpmd> ", 15) + result_flag, log_msg = dic["check_func"]["func"](out, dic["check_func"]["param"], dic["expect_results"]) + return result_flag, log_msg -tv_mac_pppoe_ipv4_pay_session_id_proto_id_queue_region_02 = { - "name":"mac_pppoe_ipv4_pay_session_id_proto_id_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions rss queues 4 5 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions rss queues 4 5 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_ipv4_pay_session_id_proto_id_drop_03 = { - "name":"mac_pppoe_ipv4_pay_session_id_proto_id_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":3}} -} - -tvs_mac_pppoe_ipv4_pay_session_id_proto_id = [ - tv_mac_pppoe_ipv4_pay_session_id_proto_id_in_queue_01, - tv_mac_pppoe_ipv4_pay_session_id_proto_id_queue_region_02, - tv_mac_pppoe_ipv4_pay_session_id_proto_id_drop_03 - ] - -mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_ipv6_pay_session_id_proto_id_in_queue_01 = { - "name":"mac_pppoe_ipv6_pay_session_id_proto_id_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions queue index 2 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_ipv6_pay_session_id_proto_id_queue_region_02 = { - "name":"mac_pppoe_ipv6_pay_session_id_proto_id_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions rss queues 4 5 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions rss queues 4 5 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_ipv6_pay_session_id_proto_id_drop_03 = { - "name":"mac_pppoe_ipv6_pay_session_id_proto_id_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":3}} -} - -tvs_mac_pppoe_ipv6_pay_session_id_proto_id = [ - tv_mac_pppoe_ipv6_pay_session_id_proto_id_in_queue_01, - tv_mac_pppoe_ipv6_pay_session_id_proto_id_queue_region_02, - tv_mac_pppoe_ipv6_pay_session_id_proto_id_drop_03 - ] - -mac_pppoe_ipv4_pay_ip_address_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)' - ] -} - -tv_mac_pppoe_ipv4_pay_ip_address_in_queue_01 = { - "name":"mac_pppoe_ipv4_pay_ip_address_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":2}} -} - -tv_mac_pppoe_ipv4_pay_ip_address_queue_region_02 = { - "name":"mac_pppoe_ipv4_pay_ip_address_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":2}} -} - -tv_mac_pppoe_ipv4_pay_ip_address_drop_03 = { - "name":"mac_pppoe_ipv4_pay_ip_address_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":2}} -} - -tvs_mac_pppoe_ipv4_pay_ip_address = [ - tv_mac_pppoe_ipv4_pay_ip_address_in_queue_01, - tv_mac_pppoe_ipv4_pay_ip_address_queue_region_02, - tv_mac_pppoe_ipv4_pay_ip_address_drop_03 - ] - -mac_pppoe_ipv4_udp_pay_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_ipv4_udp_pay_in_queue_01 = { - "name":"mac_pppoe_ipv4_udp_pay_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv4_udp_pay_queue_region_02 = { - "name":"mac_pppoe_ipv4_udp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions rss queues 7 8 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions rss queues 7 8 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv4_udp_pay_drop_03 = { - "name":"mac_pppoe_ipv4_udp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_pppoe_ipv4_udp_pay = [ - tv_mac_pppoe_ipv4_udp_pay_in_queue_01, - tv_mac_pppoe_ipv4_udp_pay_queue_region_02, - tv_mac_pppoe_ipv4_udp_pay_drop_03 - ] - -mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01 = { - "name":"mac_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02 = { - "name":"mac_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03 = { - "name":"mac_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port = [ - tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01, - tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02, - tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03 - ] - -mac_pppoe_ipv4_tcp_pay_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_ipv4_tcp_pay_in_queue_01 = { - "name":"mac_pppoe_ipv4_tcp_pay_in_queue_01", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv4_tcp_pay_queue_region_02 = { - "name":"mac_pppoe_ipv4_tcp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions rss queues 7 8 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions rss queues 7 8 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv4_tcp_pay_drop_03 = { - "name":"mac_pppoe_ipv4_tcp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_pppoe_ipv4_tcp_pay = [ - tv_mac_pppoe_ipv4_tcp_pay_in_queue_01, - tv_mac_pppoe_ipv4_tcp_pay_queue_region_02, - tv_mac_pppoe_ipv4_tcp_pay_drop_03 - ] - -mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01 = { - "name":"mac_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02 = { - "name":"mac_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03 = { - "name":"mac_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port = [ - tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01, - tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02, - tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03 - ] - -mac_pppoe_ipv6_pay_ip_address_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)' - ] -} - -tv_mac_pppoe_ipv6_pay_ip_address_in_queue_01 = { - "name":"mac_pppoe_ipv6_pay_ip_address_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":2}} -} - -tv_mac_pppoe_ipv6_pay_ip_address_queue_region_02 = { - "name":"mac_pppoe_ipv6_pay_ip_address_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":2}} -} - -tv_mac_pppoe_ipv6_pay_ip_address_drop_03 = { - "name":"mac_pppoe_ipv6_pay_ip_address_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":2}} -} - -tvs_mac_pppoe_ipv6_pay_ip_address = [ - tv_mac_pppoe_ipv6_pay_ip_address_in_queue_01, - tv_mac_pppoe_ipv6_pay_ip_address_queue_region_02, - tv_mac_pppoe_ipv6_pay_ip_address_drop_03 - ] - -mac_pppoe_ipv6_udp_pay_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_ipv6_udp_pay_in_queue_01 = { - "name":"mac_pppoe_ipv6_udp_pay_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_ipv6_udp_pay_queue_region_02 = { - "name":"mac_pppoe_ipv6_udp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions rss queues 4 5 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions rss queues 4 5 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_ipv6_udp_pay_drop_03 = { - "name":"mac_pppoe_ipv6_udp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":3}} -} - -tvs_mac_pppoe_ipv6_udp_pay = [ - tv_mac_pppoe_ipv6_udp_pay_in_queue_01, - tv_mac_pppoe_ipv6_udp_pay_queue_region_02, - tv_mac_pppoe_ipv6_udp_pay_drop_03 - ] - -mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01 = { - "name":"mac_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02 = { - "name":"mac_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03 = { - "name":"mac_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port = [ - tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01, - tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02, - tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03 - ] - -mac_pppoe_ipv6_tcp_pay_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_ipv6_tcp_pay_in_queue_01 = { - "name":"mac_pppoe_ipv6_tcp_pay_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_ipv6_tcp_pay_queue_region_02 = { - "name":"mac_pppoe_ipv6_tcp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_ipv6_tcp_pay_drop_03 = { - "name":"mac_pppoe_ipv6_tcp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":3}} -} - -tvs_mac_pppoe_ipv6_tcp_pay = [ - tv_mac_pppoe_ipv6_tcp_pay_in_queue_01, - tv_mac_pppoe_ipv6_tcp_pay_queue_region_02, - tv_mac_pppoe_ipv6_tcp_pay_drop_03 - ] - -mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01 = { - "name":"mac_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02 = { - "name":"mac_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03 = { - "name":"mac_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port = [ - tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01, - tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02, - tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03 - ] - -mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)' - ] -} - -tv_mac_vlan_pppoe_ipv4_pay_ip_address_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv4_pay_ip_address_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_vlan_pppoe_ipv4_pay_ip_address_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv4_pay_ip_address_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_vlan_pppoe_ipv4_pay_ip_address_drop_03 = { - "name":"mac_vlan_pppoe_ipv4_pay_ip_address_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":3}} -} - -tvs_mac_vlan_pppoe_ipv4_pay_ip_address = [ - tv_mac_vlan_pppoe_ipv4_pay_ip_address_in_queue_01, - tv_mac_vlan_pppoe_ipv4_pay_ip_address_queue_region_02, - tv_mac_vlan_pppoe_ipv4_pay_ip_address_drop_03 - ] - -mac_vlan_pppoe_ipv4_udp_pay_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_ipv4_udp_pay_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv4_udp_pay", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":5}} -} - -tv_mac_vlan_pppoe_ipv4_udp_pay_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv4_udp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions rss queues 7 8 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions rss queues 7 8 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":5}} -} - -tv_mac_vlan_pppoe_ipv4_udp_pay_drop_03 = { - "name":"mac_vlan_pppoe_ipv4_udp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":5}} -} - -tvs_mac_vlan_pppoe_ipv4_udp_pay = [ - tv_mac_vlan_pppoe_ipv4_udp_pay_in_queue_01, - tv_mac_vlan_pppoe_ipv4_udp_pay_queue_region_02, - tv_mac_vlan_pppoe_ipv4_udp_pay_drop_03 - ] - -mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions queue index 2 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":5}} -} - -tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions rss queues 7 8 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions rss queues 7 8 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":5}} -} - -tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03 = { - "name":"mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":5}} -} - -tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port = [ - tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01, - tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02, - tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03 - ] - -mac_vlan_pppoe_ipv4_tcp_pay_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_ipv4_tcp_pay_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv4_tcp_pay_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":5}} -} - -tv_mac_vlan_pppoe_ipv4_tcp_pay_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv4_tcp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions rss queues 7 8 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions rss queues 7 8 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":5}} -} - -tv_mac_vlan_pppoe_ipv4_tcp_pay_drop_03 = { - "name":"mac_vlan_pppoe_ipv4_tcp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":5}} -} - -tvs_mac_vlan_pppoe_ipv4_tcp_pay = [ - tv_mac_vlan_pppoe_ipv4_tcp_pay_in_queue_01, - tv_mac_vlan_pppoe_ipv4_tcp_pay_queue_region_02, - tv_mac_vlan_pppoe_ipv4_tcp_pay_drop_03 - ] - -mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str = { - "matched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":2}}, - "expect_results":{"expect_pkts":5}} -} - -tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[7, 8]}}, - "expect_results":{"expect_pkts":5}} -} - -tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03 = { - "name":"mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":5}} -} - -tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port = [ - tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01, - tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02, - tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03 - ] - -mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)' - ] -} - -tv_mac_vlan_pppoe_ipv6_pay_ip_address_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv6_pay_ip_address_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":2}} -} - -tv_mac_vlan_pppoe_ipv6_pay_ip_address_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv6_pay_ip_address_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":2}} -} - -tv_mac_vlan_pppoe_ipv6_pay_ip_address_drop_03 = { - "name":"mac_vlan_pppoe_ipv6_pay_ip_address_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":2}} -} - -tvs_mac_vlan_pppoe_ipv6_pay_ip_address = [ - tv_mac_vlan_pppoe_ipv6_pay_ip_address_in_queue_01, - tv_mac_vlan_pppoe_ipv6_pay_ip_address_queue_region_02, - tv_mac_vlan_pppoe_ipv6_pay_ip_address_drop_03 - ] - -mac_vlan_pppoe_ipv6_udp_pay_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_ipv6_udp_pay_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv6_udp_pay_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_ipv6_udp_pay_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv6_udp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions rss queues 4 5 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions rss queues 4 5 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_ipv6_udp_pay_drop_03 = { - "name":"mac_vlan_pppoe_ipv6_udp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_vlan_pppoe_ipv6_udp_pay = [ - tv_mac_vlan_pppoe_ipv6_udp_pay_in_queue_01, - tv_mac_vlan_pppoe_ipv6_udp_pay_queue_region_02, - tv_mac_vlan_pppoe_ipv6_udp_pay_drop_03 - ] - -mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03 = { - "name":"mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port = [ - tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01, - tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02, - tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03 - ] - -mac_vlan_pppoe_ipv6_tcp_pay_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_ipv6_tcp_pay_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv6_tcp_pay_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_ipv6_tcp_pay_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv6_tcp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[4, 5]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_ipv6_tcp_pay_drop_03 = { - "name":"mac_vlan_pppoe_ipv6_tcp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_vlan_pppoe_ipv6_tcp_pay = [ - tv_mac_vlan_pppoe_ipv6_tcp_pay_in_queue_01, - tv_mac_vlan_pppoe_ipv6_tcp_pay_queue_region_02, - tv_mac_vlan_pppoe_ipv6_tcp_pay_drop_03 - ] - -mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01 = { - "name":"mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02 = { - "name":"mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03 = { - "name":"mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":False}, - "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port = [ - tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01, - tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02, - tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03 - ] - -mac_pppoe_lcp_pay_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_lcp_pay_in_queue_01 = { - "name":"mac_pppoe_lcp_pay_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_lcp_pay_queue_region_02 = { - "name":"mac_pppoe_lcp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_lcp_pay_drop_03 = { - "name":"mac_pppoe_lcp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":3}} -} - -tvs_mac_pppoe_lcp_pay = [ - tv_mac_pppoe_lcp_pay_in_queue_01, - tv_mac_pppoe_lcp_pay_queue_region_02, - tv_mac_pppoe_lcp_pay_drop_03 - ] - -mac_pppoe_ipcp_pay_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' - ] -} - -tv_mac_pppoe_ipcp_pay_in_queue_01 = { - "name":"mac_pppoe_ipcp_pay_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_ipcp_pay_queue_region_02 = { - "name":"mac_pppoe_ipcp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":3}} -} - -tv_mac_pppoe_ipcp_pay_drop_03 = { - "name":"mac_pppoe_ipcp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":3}} -} - -tvs_mac_pppoe_ipcp_pay = [ - tv_mac_pppoe_ipcp_pay_in_queue_01, - tv_mac_pppoe_ipcp_pay_queue_region_02, - tv_mac_pppoe_ipcp_pay_drop_03 - ] - -mac_vlan_pppoe_lcp_pay_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_lcp_pay_in_queue_01 = { - "name":"mac_vlan_pppoe_lcp_pay_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_lcp_pay_queue_region_02 = { - "name":"mac_vlan_pppoe_lcp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_lcp_pay_drop_03 = { - "name":"mac_vlan_pppoe_lcp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_vlan_pppoe_lcp_pay = [ - tv_mac_vlan_pppoe_lcp_pay_in_queue_01, - tv_mac_vlan_pppoe_lcp_pay_queue_region_02, - tv_mac_vlan_pppoe_lcp_pay_drop_03 - ] - -mac_vlan_pppoe_ipcp_pay_scapy_str = { - "matched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)'], - "mismatched": [ - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', - 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' - ] -} - -tv_mac_vlan_pppoe_ipcp_pay_in_queue_01 = { - "name":"mac_vlan_pppoe_ipcp_pay_in_queue_01", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions queue index 1 / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions queue index 1 / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_in_queue, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_in_queue_mismatched, - "param":{"expect_port":0, "expect_queues":1}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_ipcp_pay_queue_region_02 = { - "name":"mac_vlan_pppoe_ipcp_pay_queue_region_02", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions rss queues 2 3 end / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions rss queues 2 3 end / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_queue_region, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_queue_region_mismatched, - "param":{"expect_port":0, "expect_queues":[2, 3]}}, - "expect_results":{"expect_pkts":4}} -} - -tv_mac_vlan_pppoe_ipcp_pay_drop_03 = { - "name":"mac_vlan_pppoe_ipcp_pay_drop_03", - "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions drop / end", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions drop / end", - "configuration":{ - "is_non_pipeline":True, - "is_need_rss_rule":True}, - "matched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["matched"], - "check_func":{"func":rfc.check_output_log_drop, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["mismatched"], - "check_func":{"func":rfc.check_output_log_drop_mismatched, - "param":{"expect_port":0, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":4}} -} - -tvs_mac_vlan_pppoe_ipcp_pay = [ - tv_mac_vlan_pppoe_ipcp_pay_in_queue_01, - tv_mac_vlan_pppoe_ipcp_pay_queue_region_02, - tv_mac_vlan_pppoe_ipcp_pay_drop_03 - ] - -test_results = OrderedDict() - -class CVLSwitchFilterTest(TestCase): - - def bind_nics_driver(self, ports, driver=""): - # modprobe vfio driver - if driver == "vfio-pci": - for port in ports: - netdev = self.dut.ports_info[port]['port'] - driver = netdev.get_nic_driver() - if driver != 'vfio-pci': - netdev.bind_driver(driver='vfio-pci') - - elif driver == "igb_uio": - # igb_uio should insmod as default, no need to check - for port in ports: - netdev = self.dut.ports_info[port]['port'] - driver = netdev.get_nic_driver() - if driver != 'igb_uio': - netdev.bind_driver(driver='igb_uio') - else: - for port in ports: - netdev = self.dut.ports_info[port]['port'] - driver_now = netdev.get_nic_driver() - if driver == "": - driver = netdev.default_driver - if driver != driver_now: - netdev.bind_driver(driver=driver) - - def set_up_all(self): - """ - Run at the start of each test suite. - """ - self.verify(self.nic in ["columbiaville_25g","columbiaville_100g"], "%s nic not support CVL switch filter" % self.nic) - self.dut_ports = self.dut.get_ports(self.nic) - # Verify that enough ports are available - self.verify(len(self.dut_ports) >= 1, "Insufficient ports") - localPort = self.tester.get_local_port(self.dut_ports[0]) - self.__tx_iface = self.tester.get_interface(localPort) - self.dut.send_expect("ifconfig %s up" % self.__tx_iface, "# ") - self.pkt = Packet() - #bind pf to kernel - self.bind_nics_driver(self.dut_ports, driver="ice") - #move comms package to package folder - self.suite_config = rfc.get_suite_config(self) - self.os_package_location = self.suite_config["os_default_package_file_location"] - self.comms_package_location = self.suite_config["comms_package_file_location"] - self.package_location = self.suite_config["package_file_location"] - self.dut.send_expect("cp %s %s" % (self.comms_package_location, self.package_location), "# ") - self.re_load_ice_driver() - #bind pf to vfio-pci - self.dut.send_expect('modprobe vfio-pci', '#') - self.bind_nics_driver(self.dut_ports, driver="vfio-pci") - self.pmd = PmdOutput(self.dut) - - self.generate_file_with_fdir_rules() - self.path = self.dut.apps_name['test-pmd'] - - def set_up(self): - """ - Run before each test case. - """ - - def re_load_ice_driver(self): - """ - remove and reload the driver - """ - ice_driver_file_location = self.suite_config["ice_driver_file_location"] - self.dut.send_expect("rmmod ice", "# ", 15) - self.dut.send_expect("insmod %s" % ice_driver_file_location, "# ", 60) - time.sleep(5) - - def generate_file_with_fdir_rules(self): - """ - generate file with fdir rules to make fdir table full, then test switch filter - """ - pf_pci = [self.dut.ports_info[0]['pci']] - out = self.pmd.start_testpmd('default', ports=pf_pci, eal_param='--log-level=ice,7') - self.dut.send_expect("quit", "# ") - self.fdir_rule_number = self.pmd.get_max_rule_number(self,out) - src_file = 'dep/testpmd_cmds_rte_flow_fdir_rules' - flows = open(src_file, mode='w') - rule_count = 1 - for i in range(0,255): - for j in range(0,255): - if not rule_count > self.fdir_rule_number: - flows.write('flow create 0 ingress pattern eth / ipv4 src is 192.168.%d.%d dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end \n' % (i, j)) - rule_count += 1 - else: - break - if rule_count > self.fdir_rule_number: - break - flows.close() - self.dut_file_dir = '/tmp' - self.dut.session.copy_file_to(src_file, self.dut_file_dir) - self.fdir_file = "/tmp/testpmd_cmds_rte_flow_fdir_rules" - - def create_testpmd_command(self): - """ - Create testpmd command for non-pipeline mode - """ - #Prepare testpmd EAL and parameters - all_eal_param = self.dut.create_eal_parameters(cores='1S/4C/1T', ports=[0]) - command = self.path + all_eal_param + " --log-level=\"ice,8\" -- -i --rxq=16 --txq=16 --cmdline-file=%s" % self.fdir_file - # command = "./%s/app/testpmd %s --log-level=\"ice,8\" -- -i %s" % (self.dut.target, all_eal_param, "--rxq=16 --txq=16") - return command - - def create_testpmd_command_pipeline_mode(self): - """ - Create testpmd command for pipeline mode - """ - #Prepare testpmd EAL and parameters - all_eal_param = self.dut.create_eal_parameters(cores='1S/4C/1T', ports=[0], port_options={0:"pipeline-mode-support=1"}) - command = self.path + all_eal_param + " --log-level=\"ice,8\" -- -i --rxq=16 --txq=16" - return command - - def launch_testpmd(self, is_non_pipeline): - """ - launch testpmd with the command - """ - if is_non_pipeline: - command = self.create_testpmd_command() - else: - command = self.create_testpmd_command_pipeline_mode() - out = self.dut.send_expect(command, "testpmd> ", 300) - self.dut.send_expect("port config all rss all", "testpmd> ", 15) - self.dut.send_expect("port config 0 rss-hash-key ipv4 1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd", "testpmd> ", 15) - self.dut.send_expect("rx_vxlan_port add 4789 0", "testpmd> ", 15) - self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) - self.dut.send_expect("set verbose 1", "testpmd> ", 15) - - def send_and_check_packets(self, dic, port): - """ - general packets processing workflow. - """ - #Specify the port to use - dic["check_func"]["param"]["expect_port"] = port - self.dut.send_expect("start", "testpmd> ", 15) - time.sleep(2) - #send packets - self.pkt.update_pkt(dic["scapy_str"]) - self.pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1, timeout=370) - time.sleep(3) - out = self.dut.send_expect("stop", "testpmd> ", 15) - result_flag, log_msg = dic["check_func"]["func"](out, dic["check_func"]["param"], dic["expect_results"]) - return result_flag, log_msg - - def send_packet_get_queue(self, packets_list): - """ - general packets processing workflow. - """ - self.dut.send_expect("start", "testpmd> ") - # send packets - self.pkt.update_pkt(packets_list) - self.pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1, timeout=370) - time.sleep(3) - out = self.dut.send_expect("stop", "testpmd> ", 15) - p = re.compile(r"Forward Stats for RX Port= \d+/Queue=(\s?\d+)") - res = p.findall(out) - default_queue = [int(i) for i in res] - return default_queue + def send_packet_get_queue(self, packets_list): + """ + general packets processing workflow. + """ + self.dut.send_expect("start", "testpmd> ") + # send packets + self.pkt.update_pkt(packets_list) + self.pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1, timeout=370) + time.sleep(3) + out = self.dut.send_expect("stop", "testpmd> ", 15) + p = re.compile(r"Forward Stats for RX Port= \d+/Queue=(\s?\d+)") + res = p.findall(out) + default_queue = [int(i) for i in res] + return default_queue def get_available_queue_num(self, default_queue, expect_queue, pmd_queue=8): """ @@ -5007,13 +3034,6 @@ class CVLSwitchFilterTest(TestCase): def test_ethertype_filter_pppoed(self): self._rte_flow_validate_pattern(tvs_ethertype_filter_pppoed) - def test_ethertype_filter_pppoes(self): - #launch testpmd - self.launch_testpmd(True) - #create a pppoe rss rule to make the pppoe packets have hash value, and queue group action work - self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) - self._rte_flow_validate_pattern(tvs_ethertype_filter_pppoes, False) - #ether filter pipeline mode def test_ethertype_filter_pppoed_pipeline_mode(self): tvs_ethertype_filter_pppoed_pipeline_mode = copy.deepcopy(tvs_ethertype_filter_pppoed) @@ -5023,18 +3043,6 @@ class CVLSwitchFilterTest(TestCase): tv["configuration"]["is_non_pipeline"] = False self._rte_flow_validate_pattern(tvs_ethertype_filter_pppoed_pipeline_mode) - def test_ethertype_filter_pppoes_pipeline_mode(self): - tvs_ethertype_filter_pppoes_pipeline_mode = copy.deepcopy(tvs_ethertype_filter_pppoes) - for tv in tvs_ethertype_filter_pppoes_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - #launch testpmd - self.launch_testpmd(False) - #create a pppoe rss rule to make the pppoe packets have hash value, and queue group action work - self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) - self._rte_flow_validate_pattern(tvs_ethertype_filter_pppoes_pipeline_mode, False) - #non-tunnel pipeline mode def test_mac_ipv4_frag_pipeline_mode(self): self._rte_flow_validate_pattern(tvs_mac_ipv4_frag_pipeline_mode) @@ -5082,499 +3090,7 @@ class CVLSwitchFilterTest(TestCase): def test_mac_ipv6_tcp_non_pipeline_mode(self): self._rte_flow_validate_pattern(tvs_mac_ipv6_tcp_non_pipeline_mode) - # 20.08 - def test_mac_vlan_pppoe_ipv4_pay_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id) - - def test_mac_vlan_pppoe_ipv6_pay_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id) - - def test_mac_pppoe_ipv4_pay_session_id_proto_id_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_pay_session_id_proto_id) - - def test_mac_pppoe_ipv6_pay_session_id_proto_id_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_pay_session_id_proto_id) - - def test_mac_pppoe_ipv4_pay_ip_address_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_pay_ip_address) - - def test_mac_pppoe_ipv4_udp_pay_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_udp_pay) - - def test_mac_pppoe_ipv4_udp_pay_non_src_dst_port_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port) - - def test_mac_pppoe_ipv4_tcp_pay_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_tcp_pay) - - def test_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port) - - def test_mac_pppoe_ipv6_pay_ip_address_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_pay_ip_address) - - def test_mac_pppoe_ipv6_udp_pay_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_udp_pay) - - def test_mac_pppoe_ipv6_udp_pay_non_src_dst_port_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port) - - def test_mac_pppoe_ipv6_tcp_pay_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_tcp_pay) - - def test_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port) - - def test_mac_vlan_pppoe_ipv4_pay_ip_address_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_pay_ip_address) - - def test_mac_vlan_pppoe_ipv4_udp_pay_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_udp_pay) - - def test_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port) - - def test_mac_vlan_pppoe_ipv4_tcp_pay_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_tcp_pay) - - def test_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port) - - def test_mac_vlan_pppoe_ipv6_pay_ip_address_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_pay_ip_address) - - def test_mac_vlan_pppoe_ipv6_udp_pay_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_udp_pay) - - def test_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port) - - def test_mac_vlan_pppoe_ipv6_tcp_pay_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_tcp_pay) - - def test_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_non_pipeline_mode(self): - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port) - - # pppoe control - def test_mac_pppoe_lcp_pay_non_pipeline_mode(self): - #launch testpmd - self.launch_testpmd(True) - #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work - self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) - self._rte_flow_validate_pattern(tvs_mac_pppoe_lcp_pay, False) - - def test_mac_pppoe_ipcp_pay_non_pipeline_mode(self): - #launch testpmd - self.launch_testpmd(True) - #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work - self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipcp_pay, False) - - def test_mac_vlan_pppoe_lcp_pay_non_pipeline_mode(self): - #launch testpmd - self.launch_testpmd(True) - #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work - self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_lcp_pay, False) - - def test_mac_vlan_pppoe_ipcp_pay_non_pipeline_mode(self): - #launch testpmd - self.launch_testpmd(True) - #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work - self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipcp_pay, False) - - # 20.08 pipeline mode - def test_mac_vlan_pppoe_ipv4_pay_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id) - for tv in tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode) - - def test_mac_vlan_pppoe_ipv6_pay_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id) - for tv in tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode) - - def test_mac_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode(self): - tvs_mac_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_pay_session_id_proto_id) - for tv in tvs_mac_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode) - - def test_mac_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode(self): - tvs_mac_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_pay_session_id_proto_id) - for tv in tvs_mac_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode) - - def test_mac_pppoe_ipv4_pay_ip_address_pipeline_mode(self): - tvs_mac_pppoe_ipv4_pay_ip_address_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_pay_ip_address) - for tv in tvs_mac_pppoe_ipv4_pay_ip_address_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_pay_ip_address_pipeline_mode) - - def test_mac_pppoe_ipv4_udp_pay_pipeline_mode(self): - tvs_mac_pppoe_ipv4_udp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_udp_pay) - for tv in tvs_mac_pppoe_ipv4_udp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_udp_pay_pipeline_mode) - - def test_mac_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode(self): - tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port) - for tv in tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode) - - def test_mac_pppoe_ipv4_tcp_pay_pipeline_mode(self): - tvs_mac_pppoe_ipv4_tcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_tcp_pay) - for tv in tvs_mac_pppoe_ipv4_tcp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_tcp_pay_pipeline_mode) - - def test_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode(self): - tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port) - for tv in tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode) - - def test_mac_pppoe_ipv6_pay_ip_address_pipeline_mode(self): - tvs_mac_pppoe_ipv6_pay_ip_address_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_pay_ip_address) - for tv in tvs_mac_pppoe_ipv6_pay_ip_address_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_pay_ip_address_pipeline_mode) - - def test_mac_pppoe_ipv6_udp_pay_pipeline_mode(self): - tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_udp_pay) - for tv in tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode) - - def test_mac_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode(self): - tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port) - for tv in tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode) - - def test_mac_pppoe_ipv6_tcp_pay_pipeline_mode(self): - tvs_mac_pppoe_ipv6_tcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_tcp_pay) - for tv in tvs_mac_pppoe_ipv6_tcp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_tcp_pay_pipeline_mode) - - def test_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode(self): - tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port) - for tv in tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode) - - def test_mac_vlan_pppoe_ipv4_pay_ip_address_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv4_pay_ip_address_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_pay_ip_address) - for tv in tvs_mac_vlan_pppoe_ipv4_pay_ip_address_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_pay_ip_address_pipeline_mode) - - def test_mac_vlan_pppoe_ipv4_udp_pay_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv4_udp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_udp_pay) - for tv in tvs_mac_vlan_pppoe_ipv4_udp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_udp_pay_pipeline_mode) - - def test_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port) - for tv in tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode) - - def test_mac_vlan_pppoe_ipv4_tcp_pay_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv4_tcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_tcp_pay) - for tv in tvs_mac_vlan_pppoe_ipv4_tcp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_tcp_pay_pipeline_mode) - - def test_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port) - for tv in tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode) - - def test_mac_vlan_pppoe_ipv6_pay_ip_address_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv6_pay_ip_address_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_pay_ip_address) - for tv in tvs_mac_vlan_pppoe_ipv6_pay_ip_address_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_pay_ip_address_pipeline_mode) - - def test_mac_vlan_pppoe_ipv6_udp_pay_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv6_udp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_udp_pay) - for tv in tvs_mac_vlan_pppoe_ipv6_udp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_udp_pay_pipeline_mode) - - def test_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port) - for tv in tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode) - - def test_mac_vlan_pppoe_ipv6_tcp_pay_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv6_tcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_tcp_pay) - for tv in tvs_mac_vlan_pppoe_ipv6_tcp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_tcp_pay_pipeline_mode) - - def test_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port) - for tv in tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode) - - # 20.08 pppoe control - def test_mac_pppoe_lcp_pay_pipeline_mode(self): - tvs_mac_pppoe_lcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_lcp_pay) - for tv in tvs_mac_pppoe_lcp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - #launch testpmd - self.launch_testpmd(False) - #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work - self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) - self._rte_flow_validate_pattern(tvs_mac_pppoe_lcp_pay_pipeline_mode, False) - - def test_mac_pppoe_ipcp_pay_pipeline_mode(self): - tvs_mac_pppoe_ipcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipcp_pay) - for tv in tvs_mac_pppoe_ipcp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - #launch testpmd - self.launch_testpmd(False) - #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work - self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipcp_pay_pipeline_mode, False) - - def test_mac_vlan_pppoe_lcp_pay_pipeline_mode(self): - tvs_mac_vlan_pppoe_lcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_lcp_pay) - for tv in tvs_mac_vlan_pppoe_lcp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - #launch testpmd - self.launch_testpmd(False) - #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work - self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_lcp_pay_pipeline_mode, False) - - def test_mac_vlan_pppoe_ipcp_pay_pipeline_mode(self): - tvs_mac_vlan_pppoe_ipcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipcp_pay) - for tv in tvs_mac_vlan_pppoe_ipcp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - #launch testpmd - self.launch_testpmd(False) - #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work - self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) - self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipcp_pay_pipeline_mode, False) - - def test_negative_case(self): - """ - negative cases - """ - self.launch_testpmd(False) - rules = { - "invalid parameters of queue index" : "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 16 / end", - "invalid parameters of rss queues" : [ - "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 1 2 3 end / end", - "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 0 end / end", - "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues end / end", - "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 1 2 3 5 end / end", - "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 15 16 end / end", - "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 end / end"], - "unsupported input set" : "flow create 0 priority 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 dst is 192.168.1.3 tos is 4 / end actions queue index 1 / end", - "multiple actions" : "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / rss queues 2 3 end / end", - "void action" : "flow create 0 priority 0 ingress pattern eth / ipv4 / udp src is 25 dst is 23 / end actions end", - "unsupported action": "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions mark id 1 / end", - "void input set value" : "flow create 0 priority 0 ingress pattern eth / ipv4 / end actions queue index 1 / end", - "invalid port" : "flow create 1 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end" - } - # all the rules failed to validate and create - - # invalid parameters of queue index - rule_list = self.validate_switch_filter_rule(rules["invalid parameters of queue index"], check_stats=False) - self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - rule_list = self.create_switch_filter_rule(rules["invalid parameters of queue index"], check_stats=False) - self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - - # invalid parameters of rss queues - rule_list = self.validate_switch_filter_rule(rules["invalid parameters of rss queues"], check_stats=False) - self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - rule_list = self.create_switch_filter_rule(rules["invalid parameters of rss queues"], check_stats=False) - self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - - # unsupported input set - rule_list = self.validate_switch_filter_rule(rules["unsupported input set"], check_stats=False) - self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - rule_list = self.create_switch_filter_rule(rules["unsupported input set"], check_stats=False) - self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - - # duplicated rules - rule = "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end" - rule_list = self.create_switch_filter_rule(rule, check_stats=False) - self.verify(all(rule_list), "some rules create failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == rule_list, "the rule list is not the same. expect %s, result %s" % (rule_list, result)) - rule_list_dupli = self.create_switch_filter_rule(rule, check_stats=False) - self.verify(not any(rule_list_dupli), "all rules should create failed, result %s" % rule_list_dupli) - result_dupli = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result_dupli == rule_list, "the rule list is not the same. expect %s, result %s" % (rule_list, result_dupli)) - self.dut.send_expect("flow destroy 0 rule %s" % rule_list[0], "testpmd> ", 15) - - # conflicted rules - rule = "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end" - rule_list = self.create_switch_filter_rule(rule, check_stats=False) - self.verify(all(rule_list), "some rules create failed, result %s, rule %s" % (rule_list, rule)) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == rule_list, "the rule list is not the same. expect %s, result %s" % (rule_list, result)) - rule1 = "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 2 / end" - rule_list1 = self.create_switch_filter_rule(rule1, check_stats=False) - self.verify(not any(rule_list1), "all rules should create failed, result %s" % rule_list1) - rule2 = "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions drop / end" - rule_list2 = self.create_switch_filter_rule(rule2, check_stats=False) - self.verify(not any(rule_list2), "all rules should create failed, result %s" % rule_list2) - result1 = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result1 == rule_list, "the rule list is not the same. expect %s, result %s" % (rule_list, result1)) - self.dut.send_expect("flow destroy 0 rule %s" % rule_list[0], "testpmd> ", 15) - - # multiple actions - rule_list = self.validate_switch_filter_rule(rules["multiple actions"], check_stats=False) - self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - rule_list = self.create_switch_filter_rule(rules["multiple actions"], check_stats=False) - self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - - # void action - rule_list = self.validate_switch_filter_rule(rules["void action"], check_stats=False) - self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - rule_list = self.create_switch_filter_rule(rules["void action"], check_stats=False) - self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - - # delete a non-existing rule - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - out = self.dut.send_expect("flow destroy 0 rule 0", "testpmd> ", 15) - self.verify("error" not in out, "It should be no error message.") - - # add long switch rule - rule = "flow create 0 priority 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions queue index 1 / end" - rule_list = self.validate_switch_filter_rule(rule, check_stats=False) - self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - rule_list = self.create_switch_filter_rule(rule, check_stats=False) - self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_udp_pay) - for tv in tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode: - create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") - tv["rte_flow_pattern"] = create_rule - tv["configuration"]["is_non_pipeline"] = False - self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode, False) - - # void input set value - rule_list = self.validate_switch_filter_rule(rules["void input set value"], check_stats=False) - self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - rule_list = self.create_switch_filter_rule(rules["void input set value"], check_stats=False) - self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - - # invalid port - rule_list = self.validate_switch_filter_rule(rules["invalid port"], check_stats=False) - self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) - result = self.check_switch_filter_rule_list(self.dut_ports[1], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % (rule_list, result)) - rule_list = self.create_switch_filter_rule(rules["invalid port"], check_stats=False) - self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) - # check there is no rule listed - result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % (rule_list, result)) - result = self.check_switch_filter_rule_list(self.dut_ports[1], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) - self.verify(result == [], "the rule list is not the same. expect %s, result %s" % (rule_list, result)) - + @skip_unsupported_pkg(['comms', 'wireless']) def test_unsupported_pattern_in_OS_default_package(self): """ Validate and create PPPOE rule, GTPU rule, PFCP rule, l2tpv3 rule, esp rule and ah rule with OS default package @@ -5585,12 +3101,6 @@ class CVLSwitchFilterTest(TestCase): "flow create 0 priority 0 ingress pattern eth / ipv4 / l2tpv3oip session_id is 17 / end actions rss queues 2 3 end / end", "flow create 0 priority 0 ingress pattern eth / ipv6 / udp / esp spi is 8 / end actions rss queues 2 3 end / end", "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions queue index 1 / end"] - #bind pf to kernel - self.bind_nics_driver(self.dut_ports, driver="ice") - self.dut.send_expect("cp %s %s" % (self.os_package_location, self.package_location), "# ") - self.re_load_ice_driver() - #bind pf to vfio-pci - self.bind_nics_driver(self.dut_ports, driver="vfio-pci") self.launch_testpmd(False) rule_list = self.validate_switch_filter_rule(rule, check_stats=False) @@ -5607,14 +3117,11 @@ class CVLSwitchFilterTest(TestCase): Run after each test case. """ # destroy all the rules on port 0 - self.dut.send_expect("flow flush %d" % self.dut_ports[0], "testpmd> ", 300) + if self.running_case == "test_unsupported_pattern_in_OS_default_package": + pass + else: + self.dut.send_expect("flow flush %d" % self.dut_ports[0], "testpmd> ", 15) self.dut.send_expect("quit", "#") - if self.running_case == "test_unsupported_pattern_in_OS_default_package": - self.bind_nics_driver(self.dut_ports, driver="ice") - self.dut.send_expect("cp %s %s" % (self.comms_package_location, self.package_location), "# ") - self.re_load_ice_driver() - #bind pf to vfio-pci - self.bind_nics_driver(self.dut_ports, driver="vfio-pci") def tear_down_all(self): """ From patchwork Thu Mar 18 05:27:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 89441 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C113BA0561; Thu, 18 Mar 2021 06:40:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BCA6F141052; Thu, 18 Mar 2021 06:40:03 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id E4736141040 for ; Thu, 18 Mar 2021 06:40:01 +0100 (CET) IronPort-SDR: k6qJwdoDBT0rPU7gZyVHtyj4DR4sY/Dtaqpgi2BE8gLcDNEmF9rrG1RL359ELqD8Ikw9lYMHMw o78bUXUnf23Q== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="176736185" X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="176736185" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:40:00 -0700 IronPort-SDR: OQhNfYVL9Sw+wgtbJogZ+uWSsMvSGGeHCBgoJ5LtVnsS1WxtHTlweupjr1bysPglFdGYXIM+jp j7gWSjyIHkxQ== X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="406214348" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:39:58 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Thu, 18 Mar 2021 13:27:29 +0800 Message-Id: <1616045251-65532-7-git-send-email-zhiminx.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> References: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 6/8] tests/cvl_advanced_rss_vlan_esp_ah_l2tp_pfcp:split pppoe into new suite X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *.add pppoe new suite and add pkg check Signed-off-by: Zhimin Huang --- ...Suite_cvl_advanced_rss_vlan_esp_ah_l2tp_pfcp.py | 998 +++++++++++++++++++++ 1 file changed, 998 insertions(+) create mode 100644 tests/TestSuite_cvl_advanced_rss_vlan_esp_ah_l2tp_pfcp.py diff --git a/tests/TestSuite_cvl_advanced_rss_vlan_esp_ah_l2tp_pfcp.py b/tests/TestSuite_cvl_advanced_rss_vlan_esp_ah_l2tp_pfcp.py new file mode 100644 index 0000000..8e90c08 --- /dev/null +++ b/tests/TestSuite_cvl_advanced_rss_vlan_esp_ah_l2tp_pfcp.py @@ -0,0 +1,998 @@ +# BSD LICENSE +# +# Copyright(c)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 random +import string +from test_case import TestCase, skip_unsupported_pkg, check_supported_nic +from pmd_output import PmdOutput +from packet import Packet +from rte_flow_common import RssProcessing +from config import UserConf + +mac_ipv4_pfcp_session_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=2)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:54")/IP(src="192.168.0.25",dst="192.168.0.23")/UDP(sport=23,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=25)/Raw("x"*80)'] +} + +mac_ipv4_pfcp_session = { + 'sub_casename': 'mac_ipv4_pfcp_session', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_pfcp_session_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_pfcp_session_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_pfcp_session_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv4_pfcp_session_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv4_pfcp_session_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv6_pfcp_session_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=2)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=23,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=8805)/PFCP(S=1, seid=1)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=25)/Raw("x"*80)'] +} + +mac_ipv6_pfcp_session = { + 'sub_casename': 'mac_ipv6_pfcp_session', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv6 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv6_pfcp_session_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv6_pfcp_session_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv6_pfcp_session_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv6_pfcp_session_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv6_pfcp_session_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv4_l2tpv3_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.4", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x12\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.5",dst="192.168.0.7", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)' + ], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21")/UDP(sport=22,dport=25)/Raw("x"*80)' + ] +} + +mac_ipv4_l2tpv3 = { + 'sub_casename': 'mac_ipv4_l2tpv3', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_l2tpv3_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_l2tpv3_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_l2tpv3_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv4_l2tpv3_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv4_l2tpv3_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv6_l2tpv3_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x12\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)' + ], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=22,dport=25)/Raw("x"*80)' + ] +} + +mac_ipv6_l2tpv3 = { + 'sub_casename': 'mac_ipv6_l2tpv3', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv6 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv6_l2tpv3_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv6_l2tpv3_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv6_l2tpv3_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv6_l2tpv3_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv6_l2tpv3_packets['match']], + 'action': 'check_no_hash', + } + ] +} + +mac_ipv4_esp_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.7",proto=50)/ESP(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5", proto=115)/L2TP(b\'\\x00\\x00\\x00\\x11\')/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=12)/Raw("x"*480)' + ] +} + +mac_ipv4_esp = { + 'sub_casename': 'mac_ipv4_esp', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / esp / end actions rss types esp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_esp_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_esp_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_esp_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [ + i for i in mac_ipv4_esp_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + i for i in mac_ipv4_esp_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv4_udp_esp_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.7")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)'] +} + +mac_ipv4_udp_esp = { + 'sub_casename': 'mac_ipv4_udp_esp', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / udp / esp / end actions rss types esp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_udp_esp_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_udp_esp_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_udp_esp_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv4_udp_esp_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [ + i for i in mac_ipv4_esp_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv6_esp_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=50)/ESP(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=50)/ESP(spi=11)/Raw("x"*480)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)'] +} + +mac_ipv6_esp = { + 'sub_casename': 'mac_ipv6_esp', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv6 / esp / end actions rss types esp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv6_esp_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv6_esp_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv6_esp_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv6_esp_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv6_esp_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_ipv6_udp_esp_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(dport=4500)/ESP(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(dport=4500)/ESP(spi=11)/Raw("x"*480)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=50)/ESP(spi=11)/Raw("x"*480)'] +} + +mac_ipv6_udp_esp = { + 'sub_casename': 'mac_ipv6_udp_esp', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv6 / udp / esp / end actions rss types esp end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv6_udp_esp_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv6_udp_esp_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv6_udp_esp_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': mac_ipv6_udp_esp_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_ipv6_udp_esp_packets['match'], + 'action': 'check_no_hash', + }, + ], + +} + +mac_ipv4_ah_packets = { + 'match': ['Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IP(src="192.168.0.4",dst="192.168.0.8",proto=51)/AH(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IP(src="192.168.0.3",dst="192.168.0.5")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=11)/Raw("x"*480)'] +} + +mac_ipv4_ah = { + 'sub_casename': 'mac_ipv4_ah', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv4 / ah / end actions rss types ah end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv4_ah_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv4_ah_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv4_ah_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv4_ah_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv4_ah_packets['match']], + 'action': 'check_no_hash', + }, + ], + +} + +mac_ipv6_ah_packets = { + 'match': [ + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=11)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022", nh=51)/AH(spi=12)/Raw("x"*480)', + 'Ether(dst="00:11:22:33:44:53")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023", nh=51)/AH(spi=11)/Raw("x"*480)'], + 'mismatch': [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.3",dst="192.168.0.5",proto=51)/AH(spi=11)/Raw("x"*480)', + 'Ether(src="00:11:22:33:44:55", dst="10:22:33:44:55:66")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x"*80)'] +} + +mac_ipv6_ah = { + 'sub_casename': 'mac_ipv6_ah', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / ipv6 / ah / end actions rss types ah end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_ipv6_ah_packets['match'][0], + 'action': 'save_hash', + }, + { + 'send_packet': mac_ipv6_ah_packets['match'][1], + 'action': 'check_hash_different', + }, + { + 'send_packet': mac_ipv6_ah_packets['match'][2], + 'action': 'check_hash_same', + }, + { + 'send_packet': [i for i in mac_ipv6_ah_packets['mismatch']], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': [i for i in mac_ipv6_ah_packets['match']], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv4_pay_packets = { + 'match': { + 'mac_vlan_ipv4_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/Raw("x" * 80)', + ], + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' + ] +} + +mac_vlan_ipv4_pay = { + 'sub_casename': 'mac_vlan_ipv4_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv4_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv4_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv4_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_pay_packets['mismatch'][0], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv4_pay_packets['match']['mac_vlan_ipv4_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv4_udp_pay_packets = { + 'match': { + 'mac_vlan_ipv4_udp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/UDP(sport=19,dport=99)/Raw("x" * 80)', + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' + ] +} + +mac_vlan_ipv4_udp_pay = { + 'sub_casename': 'mac_vlan_ipv4_udp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / udp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv4_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv4_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv4_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv4_udp_pay_packets['match']['mac_vlan_ipv4_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv4_tcp_pay_packets = { + 'match': { + 'mac_vlan_ipv4_tcp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/TCP(sport=19,dport=99)/Raw("x" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)' + ] +} + +mac_vlan_ipv4_tcp_pay = { + 'sub_casename': 'mac_vlan_ipv4_tcp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / tcp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv4_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_tcp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv4_tcp_pay_packets['match']['mac_vlan_ipv4_tcp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv4_sctp_pay_packets = { + 'match': { + 'mac_vlan_ipv4_sctp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.5")/SCTP(sport=19,dport=99)/Raw("x" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)' + + ] +} + +mac_vlan_ipv4_sctp_pay = { + 'sub_casename': 'mac_vlan_ipv4_sctp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv4 / sctp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv4_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv4_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv4_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv4_sctp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv4_sctp_pay_packets['match']['mac_vlan_ipv4_sctp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv6_pay_packets = { + 'match': { + 'mac_vlan_ipv6_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("y" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' + ] +} + +mac_vlan_ipv6_pay = { + 'sub_casename': 'mac_vlan_ipv6_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv6_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv6_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv6_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv6_pay_packets['match']['mac_vlan_ipv6_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv6_udp_pay_packets = { + 'match': { + 'mac_vlan_ipv6_udp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=23,dport=99)/Raw("x" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)' + ] +} + +mac_vlan_ipv6_udp_pay = { + 'sub_casename': 'mac_vlan_ipv6_udp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / udp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv6_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv6_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv6_udp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_udp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv6_udp_pay_packets['match']['mac_vlan_ipv6_udp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv6_tcp_pay_packets = { + 'match': { + 'mac_vlan_ipv6_tcp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=19,dport=99)/Raw("x" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' + ] +} + +mac_vlan_ipv6_tcp_pay = { + 'sub_casename': 'mac_vlan_ipv6_tcp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / tcp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv6_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv6_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv6_tcp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_tcp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv6_tcp_pay_packets['match']['mac_vlan_ipv6_tcp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +mac_vlan_ipv6_sctp_pay_packets = { + 'match': { + 'mac_vlan_ipv6_sctp_pay': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/SCTP(sport=25,dport=99)/Raw("x" * 80)' + ] + }, + 'mismatch': [ + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="10:22:33:44:55:66", dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)' + ] +} + +mac_vlan_ipv6_sctp_pay = { + 'sub_casename': 'mac_vlan_ipv6_sctp_pay', + 'port_id': 0, + 'rule': 'flow create 0 ingress pattern eth / vlan / ipv6 / sctp / end actions rss types c-vlan end key_len 0 queues end / end', + 'test': [ + { + 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][0], + 'action': {'save_hash': 'mac_vlan_ipv6_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][1], + 'action': {'check_hash_different': 'mac_vlan_ipv6_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'][2], + 'action': {'check_hash_same': 'mac_vlan_ipv6_sctp_pay_match'}, + }, + { + 'send_packet': mac_vlan_ipv6_sctp_pay_packets['mismatch'], + 'action': 'check_no_hash', + }, + ], + 'post-test': [ + { + 'send_packet': mac_vlan_ipv6_sctp_pay_packets['match']['mac_vlan_ipv6_sctp_pay'], + 'action': 'check_no_hash', + }, + ], +} + +class Advanced_rss_vlan_ah_l2tp_pfcp(TestCase): + + def set_up_all(self): + """ + Run at the start of each test suite. + Generic filter Prerequistites + """ + + # 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.pci_list = [] + for port in self.dut.ports_info: + self.pci_list.append(port['pci']) + self.pkt = Packet() + self.pmd_output = PmdOutput(self.dut) + self.symmetric = False + self.rxq = 64 + self.rsspro = RssProcessing(self, self.pmd_output, [self.tester_iface0, self.tester_iface1], self.rxq) + self.logger.info('rssprocess.tester_ifaces: {}'.format(self.rsspro.tester_ifaces)) + self.logger.info('rssprocess.test_case: {}'.format(self.rsspro.test_case)) + + def set_up(self): + """ + Run before each test case. + """ + pass + + def tear_down(self): + """ + Run after each test case. + """ + # 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") + self.dut.kill_all() + + def tear_down_all(self): + """ + Run after each test suite. + """ + self.dut.kill_all() + + 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" + out = self.pmd_output.start_testpmd(cores="1S/4C/1T", param=param, + eal_param=f"-w {self.pci_list[0]}", socket=self.ports_socket) + self.symmetric = symmetric + if symmetric: + # Need config rss in setup + self.pmd_output.execute_cmd("port config all rss all") + self.pmd_output.execute_cmd("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): + self.dut.kill_all() + self.launch_testpmd(symmetric) + self.pmd_output.execute_cmd("start") + + def _gener_str(self, str_len=6): + return ''.join(random.sample(string.ascii_letters + string.digits, k=str_len)) + + def test_mac_ipv4_pfcp_session(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_pfcp_session) + + def test_mac_ipv6_pfcp_session(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_pfcp_session) + + def test_mac_ipv4_l2tpv3(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_l2tpv3) + + def test_mac_ipv6_l2tpv3(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_l2tpv3) + + @skip_unsupported_pkg("os default") + def test_mac_ipv4_esp(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_esp) + + def test_mac_ipv4_udp_esp(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_udp_esp) + + def test_mac_ipv6_esp(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_esp) + + def test_mac_ipv6_udp_esp(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_udp_esp) + + @skip_unsupported_pkg("os default") + def test_mac_ipv4_ah(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv4_ah) + + def test_mac_ipv6_ah(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_ipv6_ah) + + def test_wrong_hash_input_set(self): + self.switch_testpmd(symmetric=True) + rule_list = [ + 'flow create 0 ingress pattern eth / pppoes / ipv4 / end actions rss types l2-src-only l2-dst-only end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss types ipv4-tcp end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / pppoes / ipv4 / udp / end actions rss func symmetric_toeplitz types ipv4-udp l3-src-only end key_len 0 queues end / end'] + + for rule in rule_list: + self.rsspro.validate_rule(rule, check_stats=False, check_msg='Invalid argument') + self.rsspro.create_rule(rule, check_stats=False, msg='Invalid argument') + + def test_void_action(self): + self.switch_testpmd(symmetric=True) + rule = 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions end' + self.rsspro.validate_rule(rule, check_stats=False, check_msg='Invalid argument') + self.rsspro.create_rule(rule, check_stats=False, msg='Invalid argument') + self.rsspro.check_rule(stats=False, rule_list=[rule]) + + def test_delete_nonexisting_rule(self): + self.switch_testpmd(symmetric=True) + self.rsspro.check_rule(stats=False) + out = self.dut.send_command("flow destroy 0 rule 0", timeout=1) + self.verify('error' not in out, 'delete nonexisting rule raise err,expected no err') + self.dut.send_command("flow flush 0", timeout=1) + + @skip_unsupported_pkg(['comms', 'wireless']) + def test_unsupported_pattern_with_OS_default_package(self): + self.switch_testpmd(symmetric=True) + rule_list = [ + 'flow create 0 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / l2tpv3oip / end actions rss types l2tpv3 end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / esp / end actions rss types esp end key_len 0 queues end / end', + 'flow create 0 ingress pattern eth / ipv4 / ah / end actions rss types ah end key_len 0 queues end / end' + ] + self.rsspro.validate_rule(rule_list, check_stats=False, check_msg='Invalid argument') + self.rsspro.create_rule(rule_list, check_stats=False, msg='Invalid argument') + self.rsspro.check_rule(stats=False) + + def test_invalid_port(self): + self.switch_testpmd(symmetric=True) + rule = 'flow create 1 ingress pattern eth / ipv4 / udp / pfcp / end actions rss types pfcp end key_len 0 queues end / end' + self.rsspro.create_rule(rule, check_stats=False, msg='No such device') + self.rsspro.check_rule(stats=False, rule_list=[rule]) + pattern = 'Invalid port 1' + out = self.dut.send_command("flow list 1", timeout=1) + result = re.search(r'%s' % pattern, out) + self.verify(result, 'actual result not match expected,expected result is:{}'.format(pattern)) + + def test_mac_vlan_ipv4_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_pay) + + def test_mac_vlan_ipv4_udp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_udp_pay) + + def test_mac_vlan_ipv4_tcp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_tcp_pay) + + def test_mac_vlan_ipv4_sctp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv4_sctp_pay) + + def test_mac_vlan_ipv6_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_pay) + + def test_mac_vlan_ipv6_udp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_udp_pay) + + def test_mac_vlan_ipv6_tcp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_tcp_pay) + + def test_mac_vlan_ipv6_sctp_pay(self): + self.switch_testpmd(symmetric=False) + self.rsspro.handle_rss_distribute_cases(cases_info=mac_vlan_ipv6_sctp_pay) From patchwork Thu Mar 18 05:27:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 89442 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43C7BA0561; Thu, 18 Mar 2021 06:40:06 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3CD08141056; Thu, 18 Mar 2021 06:40:06 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 69488141049 for ; Thu, 18 Mar 2021 06:40:03 +0100 (CET) IronPort-SDR: D9jBrKcY8OamghtJRD+35QDRwgmtu+jEJ49Zn9o3IdZZoajziOLghMbY2DdxmZHcnXrdLQZ1G4 61wXtk1m1/5w== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="176736190" X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="176736190" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:40:02 -0700 IronPort-SDR: ZFsn117CS2t2NrmwZtOaOa1B2w+p8Wna7poWMCwuzHqMidOfQa9uaEqkYvVKxFZidJw/ryBw1C Ky3GmH5ZKq0w== X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="406214371" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:40:00 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Thu, 18 Mar 2021 13:27:30 +0800 Message-Id: <1616045251-65532-8-git-send-email-zhiminx.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> References: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 7/8] tests/cvl_dcf_switch_filter_pppoe:split pppoe into new suite X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *.add new pppoe new suite and add pkg check Signed-off-by: Zhimin Huang --- tests/TestSuite_cvl_dcf_switch_filter_pppoe.py | 912 +++++++++++++++++++++++++ 1 file changed, 912 insertions(+) create mode 100644 tests/TestSuite_cvl_dcf_switch_filter_pppoe.py diff --git a/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py b/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py new file mode 100644 index 0000000..247561c --- /dev/null +++ b/tests/TestSuite_cvl_dcf_switch_filter_pppoe.py @@ -0,0 +1,912 @@ +# BSD LICENSE +# +# Copyright(c) 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 json +import time +import re +import copy + +from test_case import TestCase, skip_unsupported_pkg, check_supported_nic +from pmd_output import PmdOutput +from packet import Packet +from utils import BLUE, RED, GREEN +import rte_flow_common as rfc + +import os + + +tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id = { + "name":"tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id = { + "name":"tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv4_pay_session_id_proto_id = { + "name":"tv_mac_pppoe_ipv4_pay_session_id_proto_id", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_pay_session_id_proto_id = { + "name":"tv_mac_pppoe_ipv6_pay_session_id_proto_id", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv4_pay_ip_address = { + "name":"tv_mac_pppoe_ipv4_pay_ip_address", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv4_udp_pay = { + "name":"tv_mac_pppoe_ipv4_udp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port = { + "name":"tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv4_tcp_pay = { + "name":"tv_mac_pppoe_ipv4_tcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port = { + "name":"tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_pay_ip_address = { + "name":"tv_mac_pppoe_ipv6_pay_ip_address", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_udp_pay = { + "name":"tv_mac_pppoe_ipv6_udp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port = { + "name":"tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_tcp_pay = { + "name":"tv_mac_pppoe_ipv6_tcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port = { + "name":"tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv4_pay_ip_address = { + "name":"tv_mac_vlan_pppoe_ipv4_pay_ip_address", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv4_udp_pay = { + "name":"tv_mac_vlan_pppoe_ipv4_udp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port = { + "name":"tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv4_tcp_pay = { + "name":"tv_mac_vlan_pppoe_ipv4_tcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port = { + "name":"tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_pay_ip_address = { + "name":"tv_mac_vlan_pppoe_ipv6_pay_ip_address", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_udp_pay = { + "name":"tv_mac_vlan_pppoe_ipv6_udp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port = { + "name":"tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_tcp_pay = { + "name":"tv_mac_vlan_pppoe_ipv6_tcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port = { + "name":"tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_lcp_pay = { + "name":"tv_mac_pppoe_lcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipcp_pay = { + "name":"tv_mac_pppoe_ipcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_lcp_pay = { + "name":"tv_mac_vlan_pppoe_lcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipcp_pay = { + "name":"tv_mac_vlan_pppoe_ipcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +class CVLDCFSwitchFilterPPPOETest(TestCase): + supported_nic = ['columbiaville_100g', 'columbiaville_25g', 'columbiaville_25gx2'] + + def bind_nics_driver(self, ports, driver=""): + # modprobe vfio driver + if driver == "vfio-pci": + for port in ports: + netdev = self.dut.ports_info[port]['port'] + driver = netdev.get_nic_driver() + if driver != 'vfio-pci': + netdev.bind_driver(driver='vfio-pci') + + elif driver == "igb_uio": + # igb_uio should insmod as default, no need to check + for port in ports: + netdev = self.dut.ports_info[port]['port'] + driver = netdev.get_nic_driver() + if driver != 'igb_uio': + netdev.bind_driver(driver='igb_uio') + else: + for port in ports: + netdev = self.dut.ports_info[port]['port'] + driver_now = netdev.get_nic_driver() + if driver == "": + driver = netdev.default_driver + if driver != driver_now: + netdev.bind_driver(driver=driver) + + @check_supported_nic(supported_nic) + @skip_unsupported_pkg(['os default', 'wireless']) + def set_up_all(self): + """ + Run at the start of each test suite. + """ + self.dut_ports = self.dut.get_ports(self.nic) + # Verify that enough ports are available + self.verify(len(self.dut_ports) >= 1, "Insufficient ports") + localPort = self.tester.get_local_port(self.dut_ports[0]) + self.__tx_iface = self.tester.get_interface(localPort) + self.pkt = Packet() + self.testpmd_status = "close" + #bind pf to kernel + self.bind_nics_driver(self.dut_ports, driver="ice") + + #set vf driver + self.vf_driver = 'vfio-pci' + self.dut.send_expect('modprobe vfio-pci', '#') + self.path = self.dut.apps_name['test-pmd'] + + def setup_1pf_vfs_env(self, pf_port=0, driver='default'): + + self.used_dut_port_0 = self.dut_ports[pf_port] + #get PF interface name + self.pf0_intf = self.dut.ports_info[self.used_dut_port_0]['intf'] + out = self.dut.send_expect('ethtool -i %s' % self.pf0_intf, '#') + #generate 4 VFs on PF + self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, 4, driver=driver) + self.sriov_vfs_port_0 = self.dut.ports_info[self.used_dut_port_0]['vfs_port'] + #set VF0 as trust + self.dut.send_expect('ip link set %s vf 0 trust on' % self.pf0_intf, '#') + #bind VFs to dpdk driver + for port in self.sriov_vfs_port_0: + port.bind_driver(self.vf_driver) + time.sleep(5) + + def set_up(self): + """ + Run before each test case. + """ + pass + + def create_testpmd_command(self): + """ + Create testpmd command + """ + #Prepare testpmd EAL and parameters + vf0_pci = self.sriov_vfs_port_0[0].pci + vf1_pci = self.sriov_vfs_port_0[1].pci + all_eal_param = self.dut.create_eal_parameters(cores='1S/4C/1T',ports=[vf0_pci, vf1_pci], port_options={vf0_pci:"cap=dcf"}) + command = self.path + all_eal_param + " -- -i" + return command + + def launch_testpmd(self): + """ + launch testpmd with the command + """ + command = self.create_testpmd_command() + out = self.dut.send_expect(command, "testpmd> ", 15) + self.testpmd_status = "running" + self.dut.send_expect("set portlist 1", "testpmd> ", 15) + self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) + self.dut.send_expect("set verbose 1", "testpmd> ", 15) + + def send_packets(self, dic, session_name="", tx_iface=""): + """ + send packets. + """ + if session_name == "": + session_name = self.dut + if tx_iface == "": + tx_iface = self.__tx_iface + session_name.send_expect("start", "testpmd> ", 15) + time.sleep(2) + #send packets + self.pkt.update_pkt(dic["scapy_str"]) + self.pkt.send_pkt(self.tester, tx_port=tx_iface, count=1, timeout=370) + time.sleep(3) + out = session_name.send_expect("stop", "testpmd> ") + return out + + def send_and_check_packets(self, dic, session_name="", tx_iface=""): + """ + general packets processing workflow. + """ + if session_name == "": + session_name = self.dut + if tx_iface == "": + tx_iface = self.__tx_iface + session_name.send_expect("start", "testpmd> ", 15) + time.sleep(2) + #send packets + self.pkt.update_pkt(dic["scapy_str"]) + self.pkt.send_pkt(self.tester, tx_port=tx_iface, count=1, timeout=370) + time.sleep(3) + out = session_name.send_expect("stop", "testpmd> ", 15) + dic["check_func"]["func"](out, dic["check_func"]["param"], dic["expect_results"]) + + def send_and_get_packets_bg(self, dic, session_name="", tx_iface=""): + """ + general packets processing workflow. + """ + if session_name == "": + session_name = self.dut + if tx_iface == "": + tx_iface = self.__tx_iface + session_name.send_expect("start", "testpmd> ", 15) + time.sleep(2) + #send packets + pkt = Packet() + pkt.update_pkt(dic["scapy_str"]) + pkt.send_pkt_bg(self.tester, tx_port=tx_iface, count=1, loop=0, timeout=370) + time.sleep(3) + out = session_name.send_expect("stop", "testpmd> ", 15) + results = dic["check_func"]["func"](out, dic["check_func"]["param"], dic["expect_results"], False) + return results + + def validate_switch_filter_rule(self, rte_flow_pattern, session_name="", check_stats=True): + """ + validate switch filter rules + """ + if session_name == "": + session_name = self.dut + p = "Flow rule validated" + rule_list = [] + if isinstance(rte_flow_pattern, list): + for rule in rte_flow_pattern: + length = len(rule) + rule_rep = rule[0:5] + "validate" + rule[11:length] + out = session_name.send_expect(rule_rep, "testpmd> ") #validate a rule + if (p in out) and ("Failed" not in out): + rule_list.append(True) + else: + rule_list.append(False) + elif isinstance(rte_flow_pattern, str): + length = len(rte_flow_pattern) + rule_rep = rte_flow_pattern[0:5] + "validate" + rte_flow_pattern[11:length] + out = session_name.send_expect(rule_rep, "testpmd> ") #validate a rule + if (p in out) and ("Failed" not in out): + rule_list.append(True) + else: + rule_list.append(False) + else: + raise Exception("unsupported rule type, only accept list or str") + if check_stats: + self.verify(all(rule_list), "some rules not validated successfully, result %s, rule %s" % (rule_list, rte_flow_pattern)) + else: + self.verify(not any(rule_list), "all rules should not validate successfully, result %s, rule %s" % (rule_list, rte_flow_pattern)) + + def create_switch_filter_rule(self, rte_flow_pattern, session_name="", check_stats=True): + """ + create switch filter rules + """ + if session_name == "": + session_name = self.dut + p = re.compile(r"Flow rule #(\d+) created") + rule_list = [] + if isinstance(rte_flow_pattern, list): + for rule in rte_flow_pattern: + out = session_name.send_expect(rule, "testpmd> ") #create a rule + m = p.search(out) + if m: + rule_list.append(m.group(1)) + else: + rule_list.append(False) + else: + out = session_name.send_expect(rte_flow_pattern, "testpmd> ") #create a rule + m = p.search(out) + if m: + rule_list.append(m.group(1)) + else: + rule_list.append(False) + if check_stats: + self.verify(all(rule_list), "some rules not created successfully, result %s, rule %s" % (rule_list, rte_flow_pattern)) + else: + self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) + return rule_list + + def check_switch_filter_rule_list(self, port_id, rule_list, session_name="", need_verify=True): + """ + check the rules in list identical to ones in rule_list + """ + if session_name == "": + session_name = self.dut + out = session_name.send_expect("flow list %d" % port_id, "testpmd> ", 15) + p = re.compile(r"ID\s+Group\s+Prio\s+Attr\s+Rule") + m = p.search(out) + if not m: + result = [] + else: + p_spec = re.compile("^(\d+)\s") + out_lines = out.splitlines() + res = filter(bool, map(p_spec.match, out_lines)) + result = [i.group(1) for i in res] + if need_verify: + self.verify(result == rule_list, + "the rule list is not the same. expect %s, result %s" % (rule_list, result)) + else: + return result + + def destroy_switch_filter_rule(self, port_id, rule_list, session_name="", need_verify=True): + if session_name == "": + session_name = self.dut + p = re.compile(r"Flow rule #(\d+) destroyed") + destroy_list = [] + if isinstance(rule_list, list): + for i in rule_list: + out = session_name.send_expect("flow destroy %s rule %s" % (port_id, i), "testpmd> ", 15) + m = p.search(out) + if m: + destroy_list.append(m.group(1)) + else: + destroy_list.append(False) + else: + out = session_name.send_expect("flow destroy %s rule %s" % (port_id, rule_list), "testpmd> ", 15) + m = p.search(out) + if m: + destroy_list.append(m.group(1)) + else: + destroy_list.append(False) + rule_list = [rule_list] + if need_verify: + self.verify(destroy_list == rule_list, "flow rule destroy failed, expect %s result %s" % (rule_list, destroy_list)) + else: + return destroy_list + + def get_kernel_vf_log(self, vf_intfs, session_name): + """ + get the log of each kernel vf in list vf_intfs + """ + out_vfs = [] + for intf in vf_intfs: + out = session_name.send_expect('ifconfig %s' % intf, '#') + out_vfs.append(out) + return out_vfs + + def _rte_flow_validate_pattern(self, test_vector, launch_testpmd=True): + + if launch_testpmd: + #launch testpmd + self.launch_testpmd() + #validate a rule + self.validate_switch_filter_rule(test_vector["rte_flow_pattern"]) + #create a rule + rule_list = self.create_switch_filter_rule(test_vector["rte_flow_pattern"]) #create a rule + self.check_switch_filter_rule_list(0, rule_list) + #send matched packets and check + matched_dic = test_vector["matched"] + self.send_and_check_packets(matched_dic) + #send mismatched packets and check + mismatched_dic = test_vector["mismatched"] + self.send_and_check_packets(mismatched_dic) + #destroy rule and send matched packets + self.destroy_switch_filter_rule(0, rule_list) + self.check_switch_filter_rule_list(0, []) + #send matched packets and check + destroy_dict = copy.deepcopy(matched_dic) + if isinstance(destroy_dict["expect_results"]["expect_pkts"], list): + destroy_dict["expect_results"]["expect_pkts"] = [0]*len(destroy_dict["expect_results"]["expect_pkts"]) + else: + destroy_dict["expect_results"]["expect_pkts"] = 0 + self.send_and_check_packets(destroy_dict) + + def test_mac_vlan_pppoe_ipv4_pay_session_id_proto_id(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id) + + def test_mac_vlan_pppoe_ipv6_pay_session_id_proto_id(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id) + + def test_mac_pppoe_ipv4_pay_session_id_proto_id(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_pay_session_id_proto_id) + + def test_mac_pppoe_ipv6_pay_session_id_proto_id(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_pay_session_id_proto_id) + + def test_mac_pppoe_ipv4_pay_ip_address(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_pay_ip_address) + + def test_mac_pppoe_ipv4_udp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_udp_pay) + + def test_mac_pppoe_ipv4_udp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port) + + def test_mac_pppoe_ipv4_tcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_tcp_pay) + + def test_mac_pppoe_ipv4_tcp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port) + + def test_mac_pppoe_ipv6_pay_ip_address(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_pay_ip_address) + + def test_mac_pppoe_ipv6_udp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_udp_pay) + + def test_mac_pppoe_ipv6_udp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port) + + def test_mac_pppoe_ipv6_tcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_tcp_pay) + + def test_mac_pppoe_ipv6_tcp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv4_pay_ip_address(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_pay_ip_address) + + def test_mac_vlan_pppoe_ipv4_udp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_udp_pay) + + def test_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv4_tcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_tcp_pay) + + def test_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv6_pay_ip_address(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_pay_ip_address) + + def test_mac_vlan_pppoe_ipv6_udp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_udp_pay) + + def test_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv6_tcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_tcp_pay) + + def test_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port) + + def test_mac_pppoe_lcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_lcp_pay) + + def test_mac_pppoe_ipcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipcp_pay) + + def test_mac_vlan_pppoe_lcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_lcp_pay) + + def test_mac_vlan_pppoe_ipcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipcp_pay) + + def tear_down(self): + """ + Run after each test case. + """ + if self.testpmd_status != "close": + # destroy all flow rules on DCF + self.dut.send_expect("flow flush 0", "testpmd> ", 15) + self.dut.send_expect("clear port stats all", "testpmd> ", 15) + self.dut.send_expect("quit", "#", 15) + #kill all DPDK application + self.dut.kill_all() + # destroy vfs + for port_id in self.dut_ports: + self.dut.destroy_sriov_vfs_by_port(port_id) + self.testpmd_status = "close" + if getattr(self, 'session_secondary', None): + self.dut.close_session(self.session_secondary) + + def tear_down_all(self): + """ + Run after each test suite. + """ + self.dut.kill_all() From patchwork Thu Mar 18 05:27:31 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 89443 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7ADFDA0561; Thu, 18 Mar 2021 06:40:08 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 72F33141049; Thu, 18 Mar 2021 06:40:08 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 3B3F6141055 for ; Thu, 18 Mar 2021 06:40:05 +0100 (CET) IronPort-SDR: KrtOs49DiVf/1m//WltrIUfFrgZfXteZScQxt2U0QlBo/IoWMjqtXbTOd+JvEBKmZG5A4Ntyd3 +0uOBbg+NWjQ== X-IronPort-AV: E=McAfee;i="6000,8403,9926"; a="176736199" X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="176736199" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:40:05 -0700 IronPort-SDR: Q6yd706EG/zEAW6lMjfZAhKPMjPdo8z0NayptZ24eqm5aVKq9I0HQmAKAUQh2yz7+GNVW2XF5e ZtSW+/SfrOwg== X-IronPort-AV: E=Sophos;i="5.81,257,1610438400"; d="scan'208";a="406214403" Received: from unknown (HELO dpdk-huangzm-d.sh.intel.com) ([10.240.183.72]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Mar 2021 22:40:02 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Thu, 18 Mar 2021 13:27:31 +0800 Message-Id: <1616045251-65532-9-git-send-email-zhiminx.huang@intel.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> References: <1616045251-65532-1-git-send-email-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 8/8] tests/cvl_switch_filter_pppoe:split pppoe into new suite X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" *.add pppoe new suite and add pkg check Signed-off-by: Zhimin Huang --- tests/TestSuite_cvl_switch_filter_pppoe.py | 2965 ++++++++++++++++++++++++++++ 1 file changed, 2965 insertions(+) create mode 100644 tests/TestSuite_cvl_switch_filter_pppoe.py diff --git a/tests/TestSuite_cvl_switch_filter_pppoe.py b/tests/TestSuite_cvl_switch_filter_pppoe.py new file mode 100644 index 0000000..8904b47 --- /dev/null +++ b/tests/TestSuite_cvl_switch_filter_pppoe.py @@ -0,0 +1,2965 @@ +# BSD LICENSE +# +# Copyright(c) 2019-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 json +import time +import re +import copy +import random +from itertools import groupby + +from test_case import TestCase, skip_unsupported_pkg +from pmd_output import PmdOutput +from packet import Packet +from utils import BLUE, RED, GREEN +from collections import OrderedDict +import rte_flow_common as rfc + +import os + +#test vector ethertype_filter_pppoes +ethertype_filter_pppoes_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55", type=0x8864)/PPPoE(sessionid=3)/Raw("x" *80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55", type=0x8863)/PPPoED()/Raw("x" *80)' + ] +} + +tv_ethertype_filter_pppoes_in_queue_01 = { + "name":"tv_ethertype_filter_pppoes_in_queue_01", + "rte_flow_pattern":"flow create 0 ingress pattern eth type is 0x8864 / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":ethertype_filter_pppoes_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":ethertype_filter_pppoes_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}} +} + +tv_ethertype_filter_pppoes_queue_region_02 = { + "name":"tv_ethertype_filter_pppoes_queue_region_02", + "rte_flow_pattern":"flow create 0 ingress pattern eth type is 0x8864 / end actions rss queues 4 5 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":ethertype_filter_pppoes_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":ethertype_filter_pppoes_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":1}} +} + +tv_ethertype_filter_pppoes_drop_03 = { + "name":"tv_ethertype_filter_pppoes_drop_03", + "rte_flow_pattern":"flow create 0 ingress pattern eth type is 0x8864 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":ethertype_filter_pppoes_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":ethertype_filter_pppoes_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}} +} + +tvs_ethertype_filter_pppoes = [ + tv_ethertype_filter_pppoes_in_queue_01, + tv_ethertype_filter_pppoes_queue_region_02, + tv_ethertype_filter_pppoes_drop_03 + ] + +#20.08 +mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x"*80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv4_pay_session_id_proto_id_in_queue_01", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv4_pay_session_id_proto_id_queue_region_02", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions rss queues 4 5 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_drop_03 = { + "name":"tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_drop_03", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id = [ + tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_in_queue_01, + tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_queue_region_02, + tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_drop_03 + ] + +mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv6_pay_session_id_proto_id_in_queue_01", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv6_pay_session_id_proto_id_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions rss queues 4 5 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions rss queues 4 5 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_drop_03 = { + "name":"mac_vlan_pppoe_ipv6_pay_session_id_proto_id_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id = [ + tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_in_queue_01, + tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_queue_region_02, + tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_drop_03 + ] + +mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipv4_pay_session_id_proto_id_in_queue_01 = { + "name":"mac_pppoe_ipv4_pay_session_id_proto_id_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions queue index 2 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_ipv4_pay_session_id_proto_id_queue_region_02 = { + "name":"mac_pppoe_ipv4_pay_session_id_proto_id_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions rss queues 4 5 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions rss queues 4 5 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_ipv4_pay_session_id_proto_id_drop_03 = { + "name":"mac_pppoe_ipv4_pay_session_id_proto_id_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":3}} +} + +tvs_mac_pppoe_ipv4_pay_session_id_proto_id = [ + tv_mac_pppoe_ipv4_pay_session_id_proto_id_in_queue_01, + tv_mac_pppoe_ipv4_pay_session_id_proto_id_queue_region_02, + tv_mac_pppoe_ipv4_pay_session_id_proto_id_drop_03 + ] + +mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x00\\x57\')/IPv6()/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipv6_pay_session_id_proto_id_in_queue_01 = { + "name":"mac_pppoe_ipv6_pay_session_id_proto_id_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions queue index 2 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_ipv6_pay_session_id_proto_id_queue_region_02 = { + "name":"mac_pppoe_ipv6_pay_session_id_proto_id_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions rss queues 4 5 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions rss queues 4 5 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_ipv6_pay_session_id_proto_id_drop_03 = { + "name":"mac_pppoe_ipv6_pay_session_id_proto_id_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_session_id_proto_id_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":3}} +} + +tvs_mac_pppoe_ipv6_pay_session_id_proto_id = [ + tv_mac_pppoe_ipv6_pay_session_id_proto_id_in_queue_01, + tv_mac_pppoe_ipv6_pay_session_id_proto_id_queue_region_02, + tv_mac_pppoe_ipv6_pay_session_id_proto_id_drop_03 + ] + +mac_pppoe_ipv4_pay_ip_address_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)' + ] +} + +tv_mac_pppoe_ipv4_pay_ip_address_in_queue_01 = { + "name":"mac_pppoe_ipv4_pay_ip_address_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":2}} +} + +tv_mac_pppoe_ipv4_pay_ip_address_queue_region_02 = { + "name":"mac_pppoe_ipv4_pay_ip_address_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":2}} +} + +tv_mac_pppoe_ipv4_pay_ip_address_drop_03 = { + "name":"mac_pppoe_ipv4_pay_ip_address_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":2}} +} + +tvs_mac_pppoe_ipv4_pay_ip_address = [ + tv_mac_pppoe_ipv4_pay_ip_address_in_queue_01, + tv_mac_pppoe_ipv4_pay_ip_address_queue_region_02, + tv_mac_pppoe_ipv4_pay_ip_address_drop_03 + ] + +mac_pppoe_ipv4_udp_pay_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipv4_udp_pay_in_queue_01 = { + "name":"mac_pppoe_ipv4_udp_pay_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv4_udp_pay_queue_region_02 = { + "name":"mac_pppoe_ipv4_udp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions rss queues 7 8 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions rss queues 7 8 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv4_udp_pay_drop_03 = { + "name":"mac_pppoe_ipv4_udp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_pppoe_ipv4_udp_pay = [ + tv_mac_pppoe_ipv4_udp_pay_in_queue_01, + tv_mac_pppoe_ipv4_udp_pay_queue_region_02, + tv_mac_pppoe_ipv4_udp_pay_drop_03 + ] + +mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01 = { + "name":"mac_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02 = { + "name":"mac_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03 = { + "name":"mac_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port = [ + tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01, + tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02, + tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03 + ] + +mac_pppoe_ipv4_tcp_pay_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipv4_tcp_pay_in_queue_01 = { + "name":"mac_pppoe_ipv4_tcp_pay_in_queue_01", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv4_tcp_pay_queue_region_02 = { + "name":"mac_pppoe_ipv4_tcp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions rss queues 7 8 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions rss queues 7 8 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv4_tcp_pay_drop_03 = { + "name":"mac_pppoe_ipv4_tcp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_pppoe_ipv4_tcp_pay = [ + tv_mac_pppoe_ipv4_tcp_pay_in_queue_01, + tv_mac_pppoe_ipv4_tcp_pay_queue_region_02, + tv_mac_pppoe_ipv4_tcp_pay_drop_03 + ] + +mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01 = { + "name":"mac_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02 = { + "name":"mac_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03 = { + "name":"mac_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port = [ + tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01, + tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02, + tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03 + ] + +mac_pppoe_ipv6_pay_ip_address_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)' + ] +} + +tv_mac_pppoe_ipv6_pay_ip_address_in_queue_01 = { + "name":"mac_pppoe_ipv6_pay_ip_address_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":2}} +} + +tv_mac_pppoe_ipv6_pay_ip_address_queue_region_02 = { + "name":"mac_pppoe_ipv6_pay_ip_address_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":2}} +} + +tv_mac_pppoe_ipv6_pay_ip_address_drop_03 = { + "name":"mac_pppoe_ipv6_pay_ip_address_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":2}} +} + +tvs_mac_pppoe_ipv6_pay_ip_address = [ + tv_mac_pppoe_ipv6_pay_ip_address_in_queue_01, + tv_mac_pppoe_ipv6_pay_ip_address_queue_region_02, + tv_mac_pppoe_ipv6_pay_ip_address_drop_03 + ] + +mac_pppoe_ipv6_udp_pay_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipv6_udp_pay_in_queue_01 = { + "name":"mac_pppoe_ipv6_udp_pay_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_ipv6_udp_pay_queue_region_02 = { + "name":"mac_pppoe_ipv6_udp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions rss queues 4 5 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions rss queues 4 5 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_ipv6_udp_pay_drop_03 = { + "name":"mac_pppoe_ipv6_udp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":3}} +} + +tvs_mac_pppoe_ipv6_udp_pay = [ + tv_mac_pppoe_ipv6_udp_pay_in_queue_01, + tv_mac_pppoe_ipv6_udp_pay_queue_region_02, + tv_mac_pppoe_ipv6_udp_pay_drop_03 + ] + +mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01 = { + "name":"mac_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02 = { + "name":"mac_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03 = { + "name":"mac_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port = [ + tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01, + tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02, + tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03 + ] + +mac_pppoe_ipv6_tcp_pay_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipv6_tcp_pay_in_queue_01 = { + "name":"mac_pppoe_ipv6_tcp_pay_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_ipv6_tcp_pay_queue_region_02 = { + "name":"mac_pppoe_ipv6_tcp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_ipv6_tcp_pay_drop_03 = { + "name":"mac_pppoe_ipv6_tcp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":3}} +} + +tvs_mac_pppoe_ipv6_tcp_pay = [ + tv_mac_pppoe_ipv6_tcp_pay_in_queue_01, + tv_mac_pppoe_ipv6_tcp_pay_queue_region_02, + tv_mac_pppoe_ipv6_tcp_pay_drop_03 + ] + +mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01 = { + "name":"mac_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02 = { + "name":"mac_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03 = { + "name":"mac_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port = [ + tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01, + tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02, + tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03 + ] + +mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)' + ] +} + +tv_mac_vlan_pppoe_ipv4_pay_ip_address_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv4_pay_ip_address_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_vlan_pppoe_ipv4_pay_ip_address_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv4_pay_ip_address_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_vlan_pppoe_ipv4_pay_ip_address_drop_03 = { + "name":"mac_vlan_pppoe_ipv4_pay_ip_address_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":3}} +} + +tvs_mac_vlan_pppoe_ipv4_pay_ip_address = [ + tv_mac_vlan_pppoe_ipv4_pay_ip_address_in_queue_01, + tv_mac_vlan_pppoe_ipv4_pay_ip_address_queue_region_02, + tv_mac_vlan_pppoe_ipv4_pay_ip_address_drop_03 + ] + +mac_vlan_pppoe_ipv4_udp_pay_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipv4_udp_pay_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv4_udp_pay", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":5}} +} + +tv_mac_vlan_pppoe_ipv4_udp_pay_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv4_udp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions rss queues 7 8 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions rss queues 7 8 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":5}} +} + +tv_mac_vlan_pppoe_ipv4_udp_pay_drop_03 = { + "name":"mac_vlan_pppoe_ipv4_udp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":5}} +} + +tvs_mac_vlan_pppoe_ipv4_udp_pay = [ + tv_mac_vlan_pppoe_ipv4_udp_pay_in_queue_01, + tv_mac_vlan_pppoe_ipv4_udp_pay_queue_region_02, + tv_mac_vlan_pppoe_ipv4_udp_pay_drop_03 + ] + +mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions queue index 2 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":5}} +} + +tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions rss queues 7 8 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions rss queues 7 8 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":5}} +} + +tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03 = { + "name":"mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":5}} +} + +tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port = [ + tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_in_queue_01, + tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_queue_region_02, + tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_drop_03 + ] + +mac_vlan_pppoe_ipv4_tcp_pay_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipv4_tcp_pay_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv4_tcp_pay_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":5}} +} + +tv_mac_vlan_pppoe_ipv4_tcp_pay_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv4_tcp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions rss queues 7 8 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions rss queues 7 8 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":5}} +} + +tv_mac_vlan_pppoe_ipv4_tcp_pay_drop_03 = { + "name":"mac_vlan_pppoe_ipv4_tcp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":5}} +} + +tvs_mac_vlan_pppoe_ipv4_tcp_pay = [ + tv_mac_vlan_pppoe_ipv4_tcp_pay_in_queue_01, + tv_mac_vlan_pppoe_ipv4_tcp_pay_queue_region_02, + tv_mac_vlan_pppoe_ipv4_tcp_pay_drop_03 + ] + +mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str = { + "matched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":2}}, + "expect_results":{"expect_pkts":5}} +} + +tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[7, 8]}}, + "expect_results":{"expect_pkts":5}} +} + +tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03 = { + "name":"mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":5}} +} + +tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port = [ + tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_in_queue_01, + tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_queue_region_02, + tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_drop_03 + ] + +mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)' + ] +} + +tv_mac_vlan_pppoe_ipv6_pay_ip_address_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv6_pay_ip_address_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":2}} +} + +tv_mac_vlan_pppoe_ipv6_pay_ip_address_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv6_pay_ip_address_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":2}} +} + +tv_mac_vlan_pppoe_ipv6_pay_ip_address_drop_03 = { + "name":"mac_vlan_pppoe_ipv6_pay_ip_address_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_pay_ip_address_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":2}} +} + +tvs_mac_vlan_pppoe_ipv6_pay_ip_address = [ + tv_mac_vlan_pppoe_ipv6_pay_ip_address_in_queue_01, + tv_mac_vlan_pppoe_ipv6_pay_ip_address_queue_region_02, + tv_mac_vlan_pppoe_ipv6_pay_ip_address_drop_03 + ] + +mac_vlan_pppoe_ipv6_udp_pay_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipv6_udp_pay_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv6_udp_pay_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv6_udp_pay_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv6_udp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions rss queues 4 5 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions rss queues 4 5 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv6_udp_pay_drop_03 = { + "name":"mac_vlan_pppoe_ipv6_udp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_vlan_pppoe_ipv6_udp_pay = [ + tv_mac_vlan_pppoe_ipv6_udp_pay_in_queue_01, + tv_mac_vlan_pppoe_ipv6_udp_pay_queue_region_02, + tv_mac_vlan_pppoe_ipv6_udp_pay_drop_03 + ] + +mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03 = { + "name":"mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port = [ + tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_in_queue_01, + tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_queue_region_02, + tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_drop_03 + ] + +mac_vlan_pppoe_ipv6_tcp_pay_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipv6_tcp_pay_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv6_tcp_pay_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv6_tcp_pay_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv6_tcp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[4, 5]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv6_tcp_pay_drop_03 = { + "name":"mac_vlan_pppoe_ipv6_tcp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_vlan_pppoe_ipv6_tcp_pay = [ + tv_mac_vlan_pppoe_ipv6_tcp_pay_in_queue_01, + tv_mac_vlan_pppoe_ipv6_tcp_pay_queue_region_02, + tv_mac_vlan_pppoe_ipv6_tcp_pay_drop_03 + ] + +mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x57\')/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01 = { + "name":"mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02 = { + "name":"mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03 = { + "name":"mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":False}, + "matched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port = [ + tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_in_queue_01, + tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_queue_region_02, + tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_drop_03 + ] + +mac_pppoe_lcp_pay_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_lcp_pay_in_queue_01 = { + "name":"mac_pppoe_lcp_pay_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_lcp_pay_queue_region_02 = { + "name":"mac_pppoe_lcp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_lcp_pay_drop_03 = { + "name":"mac_pppoe_lcp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_lcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":3}} +} + +tvs_mac_pppoe_lcp_pay = [ + tv_mac_pppoe_lcp_pay_in_queue_01, + tv_mac_pppoe_lcp_pay_queue_region_02, + tv_mac_pppoe_lcp_pay_drop_03 + ] + +mac_pppoe_ipcp_pay_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' + ] +} + +tv_mac_pppoe_ipcp_pay_in_queue_01 = { + "name":"mac_pppoe_ipcp_pay_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_ipcp_pay_queue_region_02 = { + "name":"mac_pppoe_ipcp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":3}} +} + +tv_mac_pppoe_ipcp_pay_drop_03 = { + "name":"mac_pppoe_ipcp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_pppoe_ipcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":3}} +} + +tvs_mac_pppoe_ipcp_pay = [ + tv_mac_pppoe_ipcp_pay_in_queue_01, + tv_mac_pppoe_ipcp_pay_queue_region_02, + tv_mac_pppoe_ipcp_pay_drop_03 + ] + +mac_vlan_pppoe_lcp_pay_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\xc0\\x21\')/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_lcp_pay_in_queue_01 = { + "name":"mac_vlan_pppoe_lcp_pay_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_lcp_pay_queue_region_02 = { + "name":"mac_vlan_pppoe_lcp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_lcp_pay_drop_03 = { + "name":"mac_vlan_pppoe_lcp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_lcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_vlan_pppoe_lcp_pay = [ + tv_mac_vlan_pppoe_lcp_pay_in_queue_01, + tv_mac_vlan_pppoe_lcp_pay_queue_region_02, + tv_mac_vlan_pppoe_lcp_pay_drop_03 + ] + +mac_vlan_pppoe_ipcp_pay_scapy_str = { + "matched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)'], + "mismatched": [ + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(b\'\\x80\\x21\')/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(b\'\\x00\\x21\')/IP()/Raw("x" * 80)' + ] +} + +tv_mac_vlan_pppoe_ipcp_pay_in_queue_01 = { + "name":"mac_vlan_pppoe_ipcp_pay_in_queue_01", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions queue index 1 / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions queue index 1 / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_in_queue, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_in_queue_mismatched, + "param":{"expect_port":0, "expect_queues":1}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipcp_pay_queue_region_02 = { + "name":"mac_vlan_pppoe_ipcp_pay_queue_region_02", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions rss queues 2 3 end / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions rss queues 2 3 end / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_queue_region, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_queue_region_mismatched, + "param":{"expect_port":0, "expect_queues":[2, 3]}}, + "expect_results":{"expect_pkts":4}} +} + +tv_mac_vlan_pppoe_ipcp_pay_drop_03 = { + "name":"mac_vlan_pppoe_ipcp_pay_drop_03", + "validate_pattern":"flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions drop / end", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions drop / end", + "configuration":{ + "is_non_pipeline":True, + "is_need_rss_rule":True}, + "matched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["matched"], + "check_func":{"func":rfc.check_output_log_drop, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":mac_vlan_pppoe_ipcp_pay_scapy_str["mismatched"], + "check_func":{"func":rfc.check_output_log_drop_mismatched, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":4}} +} + +tvs_mac_vlan_pppoe_ipcp_pay = [ + tv_mac_vlan_pppoe_ipcp_pay_in_queue_01, + tv_mac_vlan_pppoe_ipcp_pay_queue_region_02, + tv_mac_vlan_pppoe_ipcp_pay_drop_03 + ] + +test_results = OrderedDict() + +class CVLSwitchFilterPPPOETest(TestCase): + + def bind_nics_driver(self, ports, driver=""): + # modprobe vfio driver + if driver == "vfio-pci": + for port in ports: + netdev = self.dut.ports_info[port]['port'] + driver = netdev.get_nic_driver() + if driver != 'vfio-pci': + netdev.bind_driver(driver='vfio-pci') + + elif driver == "igb_uio": + # igb_uio should insmod as default, no need to check + for port in ports: + netdev = self.dut.ports_info[port]['port'] + driver = netdev.get_nic_driver() + if driver != 'igb_uio': + netdev.bind_driver(driver='igb_uio') + else: + for port in ports: + netdev = self.dut.ports_info[port]['port'] + driver_now = netdev.get_nic_driver() + if driver == "": + driver = netdev.default_driver + if driver != driver_now: + netdev.bind_driver(driver=driver) + + @skip_unsupported_pkg(['os default', 'wireless']) + def set_up_all(self): + """ + Run at the start of each test suite. + """ + self.verify(self.nic in ["columbiaville_25g","columbiaville_100g"], "%s nic not support CVL switch filter" % self.nic) + self.dut_ports = self.dut.get_ports(self.nic) + # Verify that enough ports are available + self.verify(len(self.dut_ports) >= 1, "Insufficient ports") + localPort = self.tester.get_local_port(self.dut_ports[0]) + self.__tx_iface = self.tester.get_interface(localPort) + self.dut.send_expect("ifconfig %s up" % self.__tx_iface, "# ") + self.pkt = Packet() + self.pmd = PmdOutput(self.dut) + + self.generate_file_with_fdir_rules() + self.path = self.dut.apps_name['test-pmd'] + + def set_up(self): + """ + Run before each test case. + """ + + def generate_file_with_fdir_rules(self): + """ + generate file with fdir rules to make fdir table full, then test switch filter + """ + pf_pci = self.dut.ports_info[0]['pci'] + out = self.pmd.start_testpmd('default', eal_param='-a %s --log-level=ice,7'%pf_pci) + self.dut.send_expect("quit", "# ") + self.fdir_rule_number = self.pmd.get_max_rule_number(self,out) + src_file = 'dep/testpmd_cmds_rte_flow_fdir_rules' + flows = open(src_file, mode='w') + rule_count = 1 + for i in range(0,255): + for j in range(0,255): + if not rule_count > self.fdir_rule_number: + flows.write('flow create 0 ingress pattern eth / ipv4 src is 192.168.%d.%d dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end \n' % (i, j)) + rule_count += 1 + else: + break + if rule_count > self.fdir_rule_number: + break + flows.close() + self.dut_file_dir = '/tmp' + self.dut.session.copy_file_to(src_file, self.dut_file_dir) + self.fdir_file = "/tmp/testpmd_cmds_rte_flow_fdir_rules" + + def create_testpmd_command(self): + """ + Create testpmd command for non-pipeline mode + """ + #Prepare testpmd EAL and parameters + all_eal_param = self.dut.create_eal_parameters(cores='1S/4C/1T', ports=[0]) + command = self.path + all_eal_param + " --log-level=\"ice,8\" -- -i --rxq=16 --txq=16 --cmdline-file=%s" % self.fdir_file + # command = "./%s/app/testpmd %s --log-level=\"ice,8\" -- -i %s" % (self.dut.target, all_eal_param, "--rxq=16 --txq=16") + return command + + def create_testpmd_command_pipeline_mode(self): + """ + Create testpmd command for pipeline mode + """ + #Prepare testpmd EAL and parameters + all_eal_param = self.dut.create_eal_parameters(cores='1S/4C/1T', ports=[0], port_options={0:"pipeline-mode-support=1"}) + command = self.path + all_eal_param + " --log-level=\"ice,8\" -- -i --rxq=16 --txq=16" + return command + + def launch_testpmd(self, is_non_pipeline): + """ + launch testpmd with the command + """ + if is_non_pipeline: + command = self.create_testpmd_command() + else: + command = self.create_testpmd_command_pipeline_mode() + out = self.dut.send_expect(command, "testpmd> ", 300) + self.dut.send_expect("port config all rss all", "testpmd> ", 15) + self.dut.send_expect("port config 0 rss-hash-key ipv4 1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd", "testpmd> ", 15) + self.dut.send_expect("rx_vxlan_port add 4789 0", "testpmd> ", 15) + self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) + self.dut.send_expect("set verbose 1", "testpmd> ", 15) + + def send_and_check_packets(self, dic, port): + """ + general packets processing workflow. + """ + #Specify the port to use + dic["check_func"]["param"]["expect_port"] = port + self.dut.send_expect("start", "testpmd> ", 15) + time.sleep(2) + #send packets + self.pkt.update_pkt(dic["scapy_str"]) + self.pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1, timeout=370) + time.sleep(3) + out = self.dut.send_expect("stop", "testpmd> ", 15) + result_flag, log_msg = dic["check_func"]["func"](out, dic["check_func"]["param"], dic["expect_results"]) + return result_flag, log_msg + + def send_packet_get_queue(self, packets_list): + """ + general packets processing workflow. + """ + self.dut.send_expect("start", "testpmd> ") + # send packets + self.pkt.update_pkt(packets_list) + self.pkt.send_pkt(self.tester, tx_port=self.__tx_iface, count=1, timeout=370) + time.sleep(3) + out = self.dut.send_expect("stop", "testpmd> ", 15) + p = re.compile(r"Forward Stats for RX Port= \d+/Queue=(\s?\d+)") + res = p.findall(out) + default_queue = [int(i) for i in res] + return default_queue + + def get_available_queue_num(self, default_queue, expect_queue, pmd_queue=8): + """ + general packets processing workflow. + """ + queue_list = list(range(1, pmd_queue)) + # check if expect_queue length is power of 2 + q_len = len(expect_queue) + self.verify(q_len & (q_len - 1) == 0, "default_queue length is not power of 2!") + for q in default_queue: + if q in queue_list: + queue_list.remove(q) + if queue_list == []: + return [] + # according to expect_queue length get available queue + set_queue_list = [] + if q_len == 1: + set_queue = random.choice(queue_list) + set_queue_list.append(set_queue) + else: + fun = lambda x: x[1] - x[0] + for k, g in groupby(enumerate(queue_list), fun): + list_group = [j for i, j in g] + if len(list_group) >= q_len: + set_queue_list = list_group[:q_len] + break + return set_queue_list + + def create_switch_filter_rule(self, rte_flow_pattern, pattern_name="", overall_result=True, check_stats=True): + """ + create switch filter rules + """ + s = "Succeeded to create (2) flow" + p = re.compile(r"Flow rule #(\d+) created") + rule_list = [] + if isinstance(rte_flow_pattern, list): + for rule in rte_flow_pattern: + out = self.dut.send_expect(rule, "testpmd> ") #create a rule + if s not in out: + rule_list.append(False) + else: + m = p.search(out) + if m: + rule_list.append(m.group(1)) + else: + rule_list.append(False) + elif isinstance(rte_flow_pattern, str): + out = self.dut.send_expect(rte_flow_pattern, "testpmd> ") # create a rule + if s not in out: + rule_list.append(False) + else: + m = p.search(out) + if m: + rule_list.append(m.group(1)) + else: + rule_list.append(False) + else: + raise Exception("unsupported rule type, only accept list or str") + if check_stats: + if all(rule_list): + result_flag = True + log_msg = "" + else: + result_flag = False + log_msg = "some rules not created successfully, result %s, rule %s" % (rule_list, rte_flow_pattern) + overall_result = self.save_results(pattern_name, "create rule", result_flag, log_msg, overall_result) + return result_flag, overall_result, rule_list + else: + return rule_list + + def validate_switch_filter_rule(self, rte_flow_pattern, pattern_name="", overall_result=True, check_stats=True): + # validate rule. + p = "Flow rule validated" + rule_list = [] + if isinstance(rte_flow_pattern, list): + for i in rte_flow_pattern: + length = len(i) + rule_rep = i[0:5] + "validate" + i[11:length] + out = self.dut.send_expect(rule_rep, "testpmd> ") #validate a rule + if (p in out) and ("Failed" not in out): + rule_list.append(True) + else: + rule_list.append(False) + elif isinstance(rte_flow_pattern, str): + length = len(rte_flow_pattern) + rule_rep = rte_flow_pattern[0:5] + "validate" + rte_flow_pattern[11:length] + out = self.dut.send_expect(rule_rep, "testpmd> ") #validate a rule + if (p in out) and ("Failed" not in out): + rule_list.append(True) + else: + rule_list.append(False) + else: + raise Exception("unsupported rule type, only accept list or str") + if check_stats: + if all(rule_list): + result_flag = True + log_msg = "" + else: + result_flag = False + log_msg = "some rules not validated successfully, result %s, rule %s" % (rule_list, rte_flow_pattern) + overall_result = self.save_results(pattern_name, "validate rule", result_flag, log_msg, overall_result) + return result_flag, overall_result + else: + return rule_list + + def check_switch_filter_rule_list(self, port_id, rule_list=[], is_non_pipeline=True, is_need_rss_rule=True, pattern_name="", overall_result="", flag="", check_stats=True): + """ + check the rules in list identical to ones in rule_list + """ + out = self.dut.send_expect("flow list %d" % port_id, "testpmd> ", 15) + p = re.compile(r"ID\s+Group\s+Prio\s+Attr\s+Rule") + m = p.search(out) + if not m: + result = [] + else: + p_spec = re.compile("^(\d+)\s") + out_lines = out.splitlines() + res = filter(bool, map(p_spec.match, out_lines)) + result = [i.group(1) for i in res] + if is_non_pipeline: + #remove 15360 fdir rules id + del result[:self.fdir_rule_number] + if is_need_rss_rule: + #remove rss rule id + del result[0] + if check_stats: + if result == rule_list: + result_flag = True + log_msg = "" + else: + result_flag = False + log_msg = "the rule list is not the same. expect %s, result %s" % (rule_list, result) + overall_result = self.save_results(pattern_name, "check rule list after "+flag, result_flag, log_msg, overall_result) + return result_flag, overall_result + else: + return result + + def destroy_switch_filter_rule(self, port_id, rule_list, pattern_name="", overall_result=True, check_stats=True): + p = re.compile(r"Flow rule #(\d+) destroyed") + destroy_list = [] + if isinstance(rule_list, list): + for i in rule_list: + out = self.dut.send_expect("flow destroy %s rule %s" % (port_id, i), "testpmd> ", 15) + m = p.search(out) + if m: + destroy_list.append(m.group(1)) + else: + destroy_list.append(False) + else: + out = self.dut.send_expect("flow destroy %s rule %s" % (port_id, rule_list), "testpmd> ", 15) + m = p.search(out) + if m: + destroy_list.append(m.group(1)) + else: + destroy_list.append(False) + rule_list = [rule_list] + if check_stats: + if sorted(destroy_list) == sorted(rule_list): + result_flag = True + log_msg = "" + else: + result_flag = False + log_msg = "flow rule destroy failed, expect %s result %s" % (rule_list, destroy_list) + overall_result = self.save_results(pattern_name, "destroy rule list", result_flag, log_msg, overall_result) + return result_flag, overall_result + else: + return destroy_list + + def save_results(self, pattern_name, flag, result_flag, log_msg, overall_result): + """ + save results to dictionary: test_results. + """ + global test_results + + test_results[pattern_name][flag] = {} + test_results[pattern_name][flag]["result_flag"] = result_flag + test_results[pattern_name][flag]["log_msg"] = log_msg + overall_result = overall_result and result_flag + return overall_result + + def display_results(self): + global test_results + #print the results of the test case + count = 1 + for pattern in list(test_results.keys()): + print(str(count)+". "+pattern) + for flag in list(test_results[pattern].keys()): + result_flag = test_results[pattern][flag]["result_flag"] + log_msg = test_results[pattern][flag]["log_msg"] + print(flag+": ", end=' ') + result = "" + if result_flag: + result = "Passed" + print(GREEN(result), log_msg) + else: + result = "failed" + print(RED(result+", "+log_msg)) + print() + count += 1 + + def check_and_reset_queues(self, tv, default_queue, pattern_name, overall_result): + # check if default_queue and queues in rule have intersection + expect_queue = tv["matched"]["check_func"]["param"]["expect_queues"] + if expect_queue != "null": + if isinstance(expect_queue, int): + eq_list = [] + eq_list.append(expect_queue) + elif isinstance(expect_queue, list): + eq_list = expect_queue + recover_flag = list(set(eq_list) & set(default_queue)) + else: + recover_flag = None + # if default_queue has intersection with expect_queue, reset queues + if recover_flag: + # exclude default_queue and get set_queue + set_queue_list = self.get_available_queue_num(default_queue, eq_list, 16) + if not set_queue_list: + result_flag = False + log_msg = "No enough queues to avoid default_queue. Please give more queues when launch testpmd." + overall_result = self.save_results(pattern_name, "get queues", result_flag, log_msg, overall_result) + return result_flag, overall_result, tv + # reset queues in the rule + if isinstance(expect_queue, int): + rule_command = tv["rte_flow_pattern"].replace("/ end actions queue index %s" % str(expect_queue), + "/ end actions queue index %s" % str(set_queue_list[0])) + tv["matched"]["check_func"]["param"]["expect_queues"] = set_queue_list[0] + tv["mismatched"]["check_func"]["param"]["expect_queues"] = set_queue_list[0] + elif isinstance(expect_queue, list): + q = [str(i) for i in expect_queue] + expect_queue_str = " ".join(q) + s = [str(i) for i in set_queue_list] + set_queue_str = " ".join(s) + rule_command = tv["rte_flow_pattern"].replace("/ end actions rss queues %s" % expect_queue_str, + "/ end actions rss queues %s" % set_queue_str) + tv["matched"]["check_func"]["param"]["expect_queues"] = set_queue_list + tv["mismatched"]["check_func"]["param"]["expect_queues"] = set_queue_list + tv["rte_flow_pattern"] = rule_command + return True, overall_result, tv + + def _rte_flow_validate_pattern(self, test_vectors, launch_testpmd=True): + + global test_results + is_non_pipeline = test_vectors[0]["configuration"]["is_non_pipeline"] + is_need_rss_rule = test_vectors[0]["configuration"]["is_need_rss_rule"] + if launch_testpmd: + #launch testpmd + self.launch_testpmd(is_non_pipeline) + test_results.clear() + overall_result = True + count = 1 + for tv in test_vectors: + pattern_name = tv["name"] + test_results[pattern_name] = OrderedDict() + # get the queues that packets originally came to + if count == 1: + packets_list = tv["matched"]["scapy_str"] + tv["mismatched"]["scapy_str"] + default_queue = self.send_packet_get_queue(packets_list) + count += 1 + result_flag, overall_result, tv = self.check_and_reset_queues(tv, default_queue, pattern_name, overall_result) + if not result_flag: + continue + + #validate a rule + result_flag, overall_result = self.validate_switch_filter_rule(tv["rte_flow_pattern"], pattern_name, overall_result) + if not result_flag: + continue + result_flag, overall_result = self.check_switch_filter_rule_list(self.dut_ports[0], [], is_non_pipeline, is_need_rss_rule, pattern_name, overall_result, "validate") + if not result_flag: + continue + #create a rule + result_flag, overall_result, rule_list = self.create_switch_filter_rule(tv["rte_flow_pattern"], pattern_name, overall_result) #create a rule + if not result_flag: + continue + result_flag, overall_result = self.check_switch_filter_rule_list(self.dut_ports[0], rule_list, is_non_pipeline, is_need_rss_rule, pattern_name, overall_result, "create") + if not result_flag: + continue + #send matched packets and check + matched_dic = tv["matched"] + result_flag, log_msg = self.send_and_check_packets(matched_dic, self.dut_ports[0]) + overall_result = self.save_results(pattern_name, "matched packets", result_flag, log_msg, overall_result) + #send mismatched packets and check + mismatched_dic = tv["mismatched"] + if len(list(mismatched_dic.keys())) != 0: + result_flag, log_msg = self.send_and_check_packets(mismatched_dic, self.dut_ports[0]) + overall_result = self.save_results(pattern_name, "mismatched", result_flag, log_msg, overall_result) + #destroy rule and send matched packets + result_flag, overall_result = self.destroy_switch_filter_rule(0, rule_list, pattern_name, overall_result) + if not result_flag: + continue + result_flag, overall_result = self.check_switch_filter_rule_list(self.dut_ports[0], [], is_non_pipeline, is_need_rss_rule, pattern_name, overall_result, "destroy") + if not result_flag: + continue + #send matched packets and check + check_destroy_dict = copy.deepcopy(matched_dic) + check_destroy_dict["check_func"]["func"] = mismatched_dic["check_func"]["func"] + result_flag, log_msg = self.send_and_check_packets(check_destroy_dict, self.dut_ports[0]) + overall_result = self.save_results(pattern_name, "matched packets after destroying", result_flag, log_msg, overall_result) + self.display_results() + self.verify(overall_result == True, "Some subcase failed.") + + def test_ethertype_filter_pppoes_pipeline_mode(self): + tvs_ethertype_filter_pppoes_pipeline_mode = copy.deepcopy(tvs_ethertype_filter_pppoes) + for tv in tvs_ethertype_filter_pppoes_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + #launch testpmd + self.launch_testpmd(False) + #create a pppoe rss rule to make the pppoe packets have hash value, and queue group action work + self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) + self._rte_flow_validate_pattern(tvs_ethertype_filter_pppoes_pipeline_mode, False) + + def test_ethertype_filter_pppoes(self): + #launch testpmd + self.launch_testpmd(True) + #create a pppoe rss rule to make the pppoe packets have hash value, and queue group action work + self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) + self._rte_flow_validate_pattern(tvs_ethertype_filter_pppoes, False) + + # 20.08 + def test_mac_vlan_pppoe_ipv4_pay_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id) + + def test_mac_vlan_pppoe_ipv6_pay_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id) + + def test_mac_pppoe_ipv4_pay_session_id_proto_id_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_pay_session_id_proto_id) + + def test_mac_pppoe_ipv6_pay_session_id_proto_id_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_pay_session_id_proto_id) + + def test_mac_pppoe_ipv4_pay_ip_address_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_pay_ip_address) + + def test_mac_pppoe_ipv4_udp_pay_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_udp_pay) + + def test_mac_pppoe_ipv4_udp_pay_non_src_dst_port_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port) + + def test_mac_pppoe_ipv4_tcp_pay_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_tcp_pay) + + def test_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port) + + def test_mac_pppoe_ipv6_pay_ip_address_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_pay_ip_address) + + def test_mac_pppoe_ipv6_udp_pay_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_udp_pay) + + def test_mac_pppoe_ipv6_udp_pay_non_src_dst_port_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port) + + def test_mac_pppoe_ipv6_tcp_pay_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_tcp_pay) + + def test_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv4_pay_ip_address_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_pay_ip_address) + + def test_mac_vlan_pppoe_ipv4_udp_pay_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_udp_pay) + + def test_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv4_tcp_pay_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_tcp_pay) + + def test_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv6_pay_ip_address_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_pay_ip_address) + + def test_mac_vlan_pppoe_ipv6_udp_pay_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_udp_pay) + + def test_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv6_tcp_pay_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_tcp_pay) + + def test_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_non_pipeline_mode(self): + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port) + + # pppoe control + def test_mac_pppoe_lcp_pay_non_pipeline_mode(self): + #launch testpmd + self.launch_testpmd(True) + #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work + self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) + self._rte_flow_validate_pattern(tvs_mac_pppoe_lcp_pay, False) + + def test_mac_pppoe_ipcp_pay_non_pipeline_mode(self): + #launch testpmd + self.launch_testpmd(True) + #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work + self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipcp_pay, False) + + def test_mac_vlan_pppoe_lcp_pay_non_pipeline_mode(self): + #launch testpmd + self.launch_testpmd(True) + #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work + self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_lcp_pay, False) + + def test_mac_vlan_pppoe_ipcp_pay_non_pipeline_mode(self): + #launch testpmd + self.launch_testpmd(True) + #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work + self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipcp_pay, False) + + # 20.08 pipeline mode + def test_mac_vlan_pppoe_ipv4_pay_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id) + for tv in tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode) + + def test_mac_vlan_pppoe_ipv6_pay_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id) + for tv in tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode) + + def test_mac_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode(self): + tvs_mac_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_pay_session_id_proto_id) + for tv in tvs_mac_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_pay_session_id_proto_id_pipeline_mode) + + def test_mac_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode(self): + tvs_mac_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_pay_session_id_proto_id) + for tv in tvs_mac_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_pay_session_id_proto_id_pipeline_mode) + + def test_mac_pppoe_ipv4_pay_ip_address_pipeline_mode(self): + tvs_mac_pppoe_ipv4_pay_ip_address_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_pay_ip_address) + for tv in tvs_mac_pppoe_ipv4_pay_ip_address_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_pay_ip_address_pipeline_mode) + + def test_mac_pppoe_ipv4_udp_pay_pipeline_mode(self): + tvs_mac_pppoe_ipv4_udp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_udp_pay) + for tv in tvs_mac_pppoe_ipv4_udp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_udp_pay_pipeline_mode) + + def test_mac_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode(self): + tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port) + for tv in tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode) + + def test_mac_pppoe_ipv4_tcp_pay_pipeline_mode(self): + tvs_mac_pppoe_ipv4_tcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_tcp_pay) + for tv in tvs_mac_pppoe_ipv4_tcp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_tcp_pay_pipeline_mode) + + def test_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode(self): + tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port) + for tv in tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode) + + def test_mac_pppoe_ipv6_pay_ip_address_pipeline_mode(self): + tvs_mac_pppoe_ipv6_pay_ip_address_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_pay_ip_address) + for tv in tvs_mac_pppoe_ipv6_pay_ip_address_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_pay_ip_address_pipeline_mode) + + def test_mac_pppoe_ipv6_udp_pay_pipeline_mode(self): + tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_udp_pay) + for tv in tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode) + + def test_mac_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode(self): + tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port) + for tv in tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode) + + def test_mac_pppoe_ipv6_tcp_pay_pipeline_mode(self): + tvs_mac_pppoe_ipv6_tcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_tcp_pay) + for tv in tvs_mac_pppoe_ipv6_tcp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_tcp_pay_pipeline_mode) + + def test_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode(self): + tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port) + for tv in tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode) + + def test_mac_vlan_pppoe_ipv4_pay_ip_address_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv4_pay_ip_address_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_pay_ip_address) + for tv in tvs_mac_vlan_pppoe_ipv4_pay_ip_address_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_pay_ip_address_pipeline_mode) + + def test_mac_vlan_pppoe_ipv4_udp_pay_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv4_udp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_udp_pay) + for tv in tvs_mac_vlan_pppoe_ipv4_udp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_udp_pay_pipeline_mode) + + def test_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port) + for tv in tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port_pipeline_mode) + + def test_mac_vlan_pppoe_ipv4_tcp_pay_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv4_tcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_tcp_pay) + for tv in tvs_mac_vlan_pppoe_ipv4_tcp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_tcp_pay_pipeline_mode) + + def test_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port) + for tv in tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port_pipeline_mode) + + def test_mac_vlan_pppoe_ipv6_pay_ip_address_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv6_pay_ip_address_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_pay_ip_address) + for tv in tvs_mac_vlan_pppoe_ipv6_pay_ip_address_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_pay_ip_address_pipeline_mode) + + def test_mac_vlan_pppoe_ipv6_udp_pay_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv6_udp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_udp_pay) + for tv in tvs_mac_vlan_pppoe_ipv6_udp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_udp_pay_pipeline_mode) + + def test_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port) + for tv in tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port_pipeline_mode) + + def test_mac_vlan_pppoe_ipv6_tcp_pay_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv6_tcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_tcp_pay) + for tv in tvs_mac_vlan_pppoe_ipv6_tcp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_tcp_pay_pipeline_mode) + + def test_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port) + for tv in tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port_pipeline_mode) + + # 20.08 pppoe control + def test_mac_pppoe_lcp_pay_pipeline_mode(self): + tvs_mac_pppoe_lcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_lcp_pay) + for tv in tvs_mac_pppoe_lcp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + #launch testpmd + self.launch_testpmd(False) + #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work + self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) + self._rte_flow_validate_pattern(tvs_mac_pppoe_lcp_pay_pipeline_mode, False) + + def test_mac_pppoe_ipcp_pay_pipeline_mode(self): + tvs_mac_pppoe_ipcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipcp_pay) + for tv in tvs_mac_pppoe_ipcp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + #launch testpmd + self.launch_testpmd(False) + #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work + self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipcp_pay_pipeline_mode, False) + + def test_mac_vlan_pppoe_lcp_pay_pipeline_mode(self): + tvs_mac_vlan_pppoe_lcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_lcp_pay) + for tv in tvs_mac_vlan_pppoe_lcp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + #launch testpmd + self.launch_testpmd(False) + #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work + self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_lcp_pay_pipeline_mode, False) + + def test_mac_vlan_pppoe_ipcp_pay_pipeline_mode(self): + tvs_mac_vlan_pppoe_ipcp_pay_pipeline_mode = copy.deepcopy(tvs_mac_vlan_pppoe_ipcp_pay) + for tv in tvs_mac_vlan_pppoe_ipcp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + #launch testpmd + self.launch_testpmd(False) + #create a pppoe rss rule to make the pppoe control have hash value, and queue group action work + self.dut.send_expect("flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end", "testpmd> ", 15) + self._rte_flow_validate_pattern(tvs_mac_vlan_pppoe_ipcp_pay_pipeline_mode, False) + + def test_negative_case(self): + """ + negative cases + """ + self.launch_testpmd(False) + rules = { + "invalid parameters of queue index" : "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 16 / end", + "invalid parameters of rss queues" : [ + "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 1 2 3 end / end", + "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 0 end / end", + "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues end / end", + "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 1 2 3 5 end / end", + "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 15 16 end / end", + "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions rss queues 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 end / end"], + "unsupported input set" : "flow create 0 priority 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 dst is 192.168.1.3 tos is 4 / end actions queue index 1 / end", + "multiple actions" : "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / rss queues 2 3 end / end", + "void action" : "flow create 0 priority 0 ingress pattern eth / ipv4 / udp src is 25 dst is 23 / end actions end", + "unsupported action": "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions mark id 1 / end", + "void input set value" : "flow create 0 priority 0 ingress pattern eth / ipv4 / end actions queue index 1 / end", + "invalid port" : "flow create 1 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end" + } + # all the rules failed to validate and create + + # invalid parameters of queue index + rule_list = self.validate_switch_filter_rule(rules["invalid parameters of queue index"], check_stats=False) + self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + rule_list = self.create_switch_filter_rule(rules["invalid parameters of queue index"], check_stats=False) + self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + + # invalid parameters of rss queues + rule_list = self.validate_switch_filter_rule(rules["invalid parameters of rss queues"], check_stats=False) + self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + rule_list = self.create_switch_filter_rule(rules["invalid parameters of rss queues"], check_stats=False) + self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + + # unsupported input set + rule_list = self.validate_switch_filter_rule(rules["unsupported input set"], check_stats=False) + self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + rule_list = self.create_switch_filter_rule(rules["unsupported input set"], check_stats=False) + self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + + # duplicated rules + rule = "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end" + rule_list = self.create_switch_filter_rule(rule, check_stats=False) + self.verify(all(rule_list), "some rules create failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == rule_list, "the rule list is not the same. expect %s, result %s" % (rule_list, result)) + rule_list_dupli = self.create_switch_filter_rule(rule, check_stats=False) + self.verify(not any(rule_list_dupli), "all rules should create failed, result %s" % rule_list_dupli) + result_dupli = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result_dupli == rule_list, "the rule list is not the same. expect %s, result %s" % (rule_list, result_dupli)) + self.dut.send_expect("flow destroy 0 rule %s" % rule_list[0], "testpmd> ", 15) + + # conflicted rules + rule = "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 1 / end" + rule_list = self.create_switch_filter_rule(rule, check_stats=False) + self.verify(all(rule_list), "some rules create failed, result %s, rule %s" % (rule_list, rule)) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == rule_list, "the rule list is not the same. expect %s, result %s" % (rule_list, result)) + rule1 = "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions queue index 2 / end" + rule_list1 = self.create_switch_filter_rule(rule1, check_stats=False) + self.verify(not any(rule_list1), "all rules should create failed, result %s" % rule_list1) + rule2 = "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions drop / end" + rule_list2 = self.create_switch_filter_rule(rule2, check_stats=False) + self.verify(not any(rule_list2), "all rules should create failed, result %s" % rule_list2) + result1 = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result1 == rule_list, "the rule list is not the same. expect %s, result %s" % (rule_list, result1)) + self.dut.send_expect("flow destroy 0 rule %s" % rule_list[0], "testpmd> ", 15) + + # multiple actions + rule_list = self.validate_switch_filter_rule(rules["multiple actions"], check_stats=False) + self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + rule_list = self.create_switch_filter_rule(rules["multiple actions"], check_stats=False) + self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + + # void action + rule_list = self.validate_switch_filter_rule(rules["void action"], check_stats=False) + self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + rule_list = self.create_switch_filter_rule(rules["void action"], check_stats=False) + self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + + # delete a non-existing rule + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + out = self.dut.send_expect("flow destroy 0 rule 0", "testpmd> ", 15) + self.verify("error" not in out, "It should be no error message.") + + # add long switch rule + rule = "flow create 0 priority 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions queue index 1 / end" + rule_list = self.validate_switch_filter_rule(rule, check_stats=False) + self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + rule_list = self.create_switch_filter_rule(rule, check_stats=False) + self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode = copy.deepcopy(tvs_mac_pppoe_ipv6_udp_pay) + for tv in tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode: + create_rule = tv["rte_flow_pattern"].replace("flow create 0", "flow create 0 priority 0") + tv["rte_flow_pattern"] = create_rule + tv["configuration"]["is_non_pipeline"] = False + self._rte_flow_validate_pattern(tvs_mac_pppoe_ipv6_udp_pay_pipeline_mode, False) + + # void input set value + rule_list = self.validate_switch_filter_rule(rules["void input set value"], check_stats=False) + self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + rule_list = self.create_switch_filter_rule(rules["void input set value"], check_stats=False) + self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + + # invalid port + rule_list = self.validate_switch_filter_rule(rules["invalid port"], check_stats=False) + self.verify(not any(rule_list), "all rules should validate failed, result %s" % rule_list) + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % ([], result)) + result = self.check_switch_filter_rule_list(self.dut_ports[1], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % (rule_list, result)) + rule_list = self.create_switch_filter_rule(rules["invalid port"], check_stats=False) + self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) + # check there is no rule listed + result = self.check_switch_filter_rule_list(self.dut_ports[0], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % (rule_list, result)) + result = self.check_switch_filter_rule_list(self.dut_ports[1], is_non_pipeline=False, is_need_rss_rule=False, check_stats=False) + self.verify(result == [], "the rule list is not the same. expect %s, result %s" % (rule_list, result)) + + def tear_down(self): + """ + Run after each test case. + """ + # destroy all the rules on port 0 + self.dut.send_expect("flow flush %d" % self.dut_ports[0], "testpmd> ", 300) + self.dut.send_expect("quit", "#") + + def tear_down_all(self): + """ + Run after each test suite. + """ + self.dut.kill_all()