From patchwork Wed Dec 28 12:32:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 121422 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 A1F6BA04FD; Wed, 28 Dec 2022 05:34:46 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6EC6F410D0; Wed, 28 Dec 2022 05:34:46 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 9E3CD40FDF for ; Wed, 28 Dec 2022 05:34:43 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672202083; x=1703738083; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=MCMI79gKy4N/bf7udjshT+R74LzA0aJinQXTEtf0IR4=; b=K0X/xxiL0PM11yNFCW0vsjRCGzdD7oqXuWVyg0AGDkEa+GPZWEi38iYE dWQjuZyTmi4h3Y4lo754C/1OM45RE5EpsQtq9zH2+iankT6LoNpcFCtdV F4r+xLAtBa62ECCvkBhZudr9EcqqUFikOquFvdPWv3DMavlsPA8v7C0Mt NFgon1cu0tULdMBWF6EYxOfH5xiUw7+rIG0bnWk8Z0LYjXE7ZoctrhFvs t7KueXCc3CCYvdB6KizFUHN8QwOPORezN8ovfHIFYMsSDYYKwiUw4MeTA pOHND820iUnFUjZps3VUYD3gyHu1rQSziwe8lxCjOXtwvhXOxgdX8av46 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="322040108" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="322040108" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 20:34:42 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="655200517" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="655200517" Received: from unknown (HELO localhost.localdomain) ([10.239.252.20]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 20:34:40 -0800 From: Song Jiale To: dts@dpdk.org Cc: Song Jiale Subject: [dts] [PATCH V1 1/2] tests/ice_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp: add new cases according to testplan Date: Wed, 28 Dec 2022 12:32:33 +0000 Message-Id: <20221228123234.628532-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 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 add 9 subcases according to testplan. Signed-off-by: Song Jiale --- ...advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py | 781 +++++++++++++++--- 1 file changed, 683 insertions(+), 98 deletions(-) diff --git a/tests/TestSuite_ice_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py b/tests/TestSuite_ice_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py index 0c24188a..cf2e9cc6 100644 --- a/tests/TestSuite_ice_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py +++ b/tests/TestSuite_ice_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp.py @@ -523,9 +523,9 @@ mac_ipv6_ah = { ], } -mac_vlan_ipv4_pay_packets = { +mac_vlan_ipv4_vlan_packets = { "match": { - "mac_vlan_ipv4_pay": [ + "mac_vlan_ipv4_vlan": [ 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'.format( vf0_mac ), @@ -544,37 +544,94 @@ mac_vlan_ipv4_pay_packets = { ], } -mac_vlan_ipv4_pay = { - "sub_casename": "mac_vlan_ipv4_pay", +mac_vlan_ipv4_vlan = { + "sub_casename": "mac_vlan_ipv4_vlan", "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], + "send_packet": mac_vlan_ipv4_vlan_packets["match"]["mac_vlan_ipv4_vlan"][0], "action": "save_hash", }, { - "send_packet": mac_vlan_ipv4_pay_packets["match"]["mac_vlan_ipv4_pay"][1], + "send_packet": mac_vlan_ipv4_vlan_packets["match"]["mac_vlan_ipv4_vlan"][1], "action": "check_hash_different", }, { - "send_packet": mac_vlan_ipv4_pay_packets["match"]["mac_vlan_ipv4_pay"][2], + "send_packet": mac_vlan_ipv4_vlan_packets["match"]["mac_vlan_ipv4_vlan"][2], "action": "check_hash_same", }, # { - # 'send_packet': mac_vlan_ipv4_pay_packets['mismatch'][0], - # 'action': 'check_no_hash_or_different', + # "send_packet": mac_vlan_ipv4_vlan_packets["mismatch"][0], + # "action": "check_no_hash_or_different", # }, ], "post-test": [ {"send_packet": pkt, "action": "check_no_hash_or_different"} - for pkt in mac_vlan_ipv4_pay_packets["match"]["mac_vlan_ipv4_pay"] + for pkt in mac_vlan_ipv4_vlan_packets["match"]["mac_vlan_ipv4_vlan"] ], } -mac_vlan_ipv4_udp_pay_packets = { +mac_vlan_ipv4_l3dst_packets = { "match": { - "mac_vlan_ipv4_udp_pay": [ + "mac_vlan_ipv4_l3dst": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.3")/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:99", dst="{}",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x" * 80)'.format( + vf0_mac + ), + ], + }, + "mismatch": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ) + ], +} + +mac_vlan_ipv4_l3dst = { + "sub_casename": "mac_vlan_ipv4_l3dst", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / vlan / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_vlan_ipv4_l3dst_packets["match"]["mac_vlan_ipv4_l3dst"][ + 0 + ], + "action": "save_hash", + }, + { + "send_packet": mac_vlan_ipv4_l3dst_packets["match"]["mac_vlan_ipv4_l3dst"][ + 1 + ], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv4_l3dst_packets["match"]["mac_vlan_ipv4_l3dst"][ + 2 + ], + "action": "check_hash_same", + }, + # { + # "send_packet": mac_vlan_ipv4_l3dst_packets["mismatch"][0], + # "action": "check_no_hash_or_different", + # }, + ], + "post-test": [ + {"send_packet": pkt, "action": "check_no_hash_or_different"} + for pkt in mac_vlan_ipv4_l3dst_packets["match"]["mac_vlan_ipv4_l3dst"] + ], +} + +mac_vlan_ipv4_pay = [mac_vlan_ipv4_vlan, mac_vlan_ipv4_l3dst] + +mac_vlan_ipv4_udp_vlan_packets = { + "match": { + "mac_vlan_ipv4_udp_vlan": [ 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( vf0_mac ), @@ -596,43 +653,165 @@ mac_vlan_ipv4_udp_pay_packets = { ], } -mac_vlan_ipv4_udp_pay = { - "sub_casename": "mac_vlan_ipv4_udp_pay", +mac_vlan_ipv4_udp_vlan = { + "sub_casename": "mac_vlan_ipv4_udp_vlan", "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" + "send_packet": mac_vlan_ipv4_udp_vlan_packets["match"][ + "mac_vlan_ipv4_udp_vlan" ][0], "action": "save_hash", }, { - "send_packet": mac_vlan_ipv4_udp_pay_packets["match"][ - "mac_vlan_ipv4_udp_pay" + "send_packet": mac_vlan_ipv4_udp_vlan_packets["match"][ + "mac_vlan_ipv4_udp_vlan" ][1], "action": "check_hash_different", }, { - "send_packet": mac_vlan_ipv4_udp_pay_packets["match"][ - "mac_vlan_ipv4_udp_pay" + "send_packet": mac_vlan_ipv4_udp_vlan_packets["match"][ + "mac_vlan_ipv4_udp_vlan" ][2], "action": "check_hash_same", }, # { - # 'send_packet': mac_vlan_ipv4_udp_pay_packets['mismatch'], - # 'action': 'check_no_hash_or_different', + # "send_packet": mac_vlan_ipv4_udp_vlan_packets["mismatch"], + # "action": "check_no_hash_or_different", + # }, + ], + "post-test": [ + {"send_packet": pkt, "action": "check_no_hash_or_different"} + for pkt in mac_vlan_ipv4_udp_vlan_packets["match"]["mac_vlan_ipv4_udp_vlan"] + ], +} + +mac_vlan_ipv4_udp_l3src_packets = { + "match": { + "mac_vlan_ipv4_udp_l3src": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:99", dst="{}",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=19,dport=99)/Raw("x" * 80)'.format( + vf0_mac + ), + ] + }, + "mismatch": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + ], +} + +mac_vlan_ipv4_udp_l3src = { + "sub_casename": "mac_vlan_ipv4_udp_l3src", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / vlan / ipv4 / udp / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_vlan_ipv4_udp_l3src_packets["match"][ + "mac_vlan_ipv4_udp_l3src" + ][0], + "action": "save_hash", + }, + { + "send_packet": mac_vlan_ipv4_udp_l3src_packets["match"][ + "mac_vlan_ipv4_udp_l3src" + ][1], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv4_udp_l3src_packets["match"][ + "mac_vlan_ipv4_udp_l3src" + ][2], + "action": "check_hash_same", + }, + # { + # "send_packet": mac_vlan_ipv4_udp_l3src_packets["mismatch"], + # "action": "check_no_hash_or_different", + # }, + ], + "post-test": [ + {"send_packet": pkt, "action": "check_no_hash_or_different"} + for pkt in mac_vlan_ipv4_udp_l3src_packets["match"]["mac_vlan_ipv4_udp_l3src"] + ], +} + +mac_vlan_ipv4_udp_l4dst_packets = { + "match": { + "mac_vlan_ipv4_udp_l4dst": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=24)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:99", dst="{}",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/UDP(sport=19,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + ] + }, + "mismatch": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + ], +} + +mac_vlan_ipv4_udp_l4dst = { + "sub_casename": "mac_vlan_ipv4_udp_l4dst", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / vlan / ipv4 / udp / end actions rss types ipv4-udp l4-dst-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_vlan_ipv4_udp_l4dst_packets["match"][ + "mac_vlan_ipv4_udp_l4dst" + ][0], + "action": "save_hash", + }, + { + "send_packet": mac_vlan_ipv4_udp_l4dst_packets["match"][ + "mac_vlan_ipv4_udp_l4dst" + ][1], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv4_udp_l4dst_packets["match"][ + "mac_vlan_ipv4_udp_l4dst" + ][2], + "action": "check_hash_same", + }, + # { + # "send_packet": mac_vlan_ipv4_udp_l4dst_packets["mismatch"], + # "action": "check_no_hash_or_different", # }, ], "post-test": [ {"send_packet": pkt, "action": "check_no_hash_or_different"} - for pkt in mac_vlan_ipv4_udp_pay_packets["match"]["mac_vlan_ipv4_udp_pay"] + for pkt in mac_vlan_ipv4_udp_l4dst_packets["match"]["mac_vlan_ipv4_udp_l4dst"] ], } -mac_vlan_ipv4_tcp_pay_packets = { +mac_vlan_ipv4_udp_pay = [ + mac_vlan_ipv4_udp_vlan, + mac_vlan_ipv4_udp_l3src, + mac_vlan_ipv4_udp_l4dst, +] + +mac_vlan_ipv4_tcp_vlan_packets = { "match": { - "mac_vlan_ipv4_tcp_pay": [ + "mac_vlan_ipv4_tcp_vlan": [ 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( vf0_mac ), @@ -654,43 +833,114 @@ mac_vlan_ipv4_tcp_pay_packets = { ], } -mac_vlan_ipv4_tcp_pay = { - "sub_casename": "mac_vlan_ipv4_tcp_pay", +mac_vlan_ipv4_tcp_vlan = { + "sub_casename": "mac_vlan_ipv4_tcp_vlan", "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" + "send_packet": mac_vlan_ipv4_tcp_vlan_packets["match"][ + "mac_vlan_ipv4_tcp_vlan" ][0], "action": "save_hash", }, { - "send_packet": mac_vlan_ipv4_tcp_pay_packets["match"][ - "mac_vlan_ipv4_tcp_pay" + "send_packet": mac_vlan_ipv4_tcp_vlan_packets["match"][ + "mac_vlan_ipv4_tcp_vlan" ][1], "action": "check_hash_different", }, { - "send_packet": mac_vlan_ipv4_tcp_pay_packets["match"][ - "mac_vlan_ipv4_tcp_pay" + "send_packet": mac_vlan_ipv4_tcp_vlan_packets["match"][ + "mac_vlan_ipv4_tcp_vlan" ][2], "action": "check_hash_same", }, # { - # 'send_packet': mac_vlan_ipv4_tcp_pay_packets['mismatch'], - # 'action': 'check_no_hash_or_different', + # "send_packet": mac_vlan_ipv4_tcp_vlan_packets["mismatch"], + # "action": "check_no_hash_or_different", + # }, + ], + "post-test": [ + {"send_packet": pkt, "action": "check_no_hash_or_different"} + for pkt in mac_vlan_ipv4_tcp_vlan_packets["match"]["mac_vlan_ipv4_tcp_vlan"] + ], +} + +mac_vlan_ipv4_tcp_l3src_l4src_packets = { + "match": { + "mac_vlan_ipv4_tcp_l3src_l4src": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=22,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:99", dst="{}",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=99)/Raw("x" * 80)'.format( + vf0_mac + ), + ] + }, + "mismatch": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + ], +} + +mac_vlan_ipv4_tcp_l3src_l4src = { + "sub_casename": "mac_vlan_ipv4_tcp_l3src_l4src", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / vlan / 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_vlan_ipv4_tcp_l3src_l4src_packets["match"][ + "mac_vlan_ipv4_tcp_l3src_l4src" + ][0], + "action": "save_hash", + }, + { + "send_packet": mac_vlan_ipv4_tcp_l3src_l4src_packets["match"][ + "mac_vlan_ipv4_tcp_l3src_l4src" + ][1], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv4_tcp_l3src_l4src_packets["match"][ + "mac_vlan_ipv4_tcp_l3src_l4src" + ][2], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv4_tcp_l3src_l4src_packets["match"][ + "mac_vlan_ipv4_tcp_l3src_l4src" + ][3], + "action": "check_hash_same", + }, + # { + # "send_packet": mac_vlan_ipv4_tcp_l3src_l4src_packets["mismatch"], + # "action": "check_no_hash_or_different", # }, ], "post-test": [ {"send_packet": pkt, "action": "check_no_hash_or_different"} - for pkt in mac_vlan_ipv4_tcp_pay_packets["match"]["mac_vlan_ipv4_tcp_pay"] + for pkt in mac_vlan_ipv4_tcp_l3src_l4src_packets["match"][ + "mac_vlan_ipv4_tcp_l3src_l4src" + ] ], } -mac_vlan_ipv4_sctp_pay_packets = { +mac_vlan_ipv4_tcp_pay = [mac_vlan_ipv4_tcp_vlan, mac_vlan_ipv4_tcp_l3src_l4src] + +mac_vlan_ipv4_sctp_vlan_packets = { "match": { - "mac_vlan_ipv4_sctp_pay": [ + "mac_vlan_ipv4_sctp_vlan": [ 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( vf0_mac ), @@ -712,43 +962,130 @@ mac_vlan_ipv4_sctp_pay_packets = { ], } -mac_vlan_ipv4_sctp_pay = { - "sub_casename": "mac_vlan_ipv4_sctp_pay", +mac_vlan_ipv4_sctp_vlan = { + "sub_casename": "mac_vlan_ipv4_sctp_vlan", "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" + "send_packet": mac_vlan_ipv4_sctp_vlan_packets["match"][ + "mac_vlan_ipv4_sctp_vlan" ][0], "action": "save_hash", }, { - "send_packet": mac_vlan_ipv4_sctp_pay_packets["match"][ - "mac_vlan_ipv4_sctp_pay" + "send_packet": mac_vlan_ipv4_sctp_vlan_packets["match"][ + "mac_vlan_ipv4_sctp_vlan" ][1], "action": "check_hash_different", }, { - "send_packet": mac_vlan_ipv4_sctp_pay_packets["match"][ - "mac_vlan_ipv4_sctp_pay" + "send_packet": mac_vlan_ipv4_sctp_vlan_packets["match"][ + "mac_vlan_ipv4_sctp_vlan" ][2], "action": "check_hash_same", }, # { - # 'send_packet': mac_vlan_ipv4_sctp_pay_packets['mismatch'], - # 'action': 'check_no_hash_or_different', + # "send_packet": mac_vlan_ipv4_sctp_vlan_packets["mismatch"], + # "action": "check_no_hash_or_different", + # }, + ], + "post-test": [ + {"send_packet": pkt, "action": "check_no_hash_or_different"} + for pkt in mac_vlan_ipv4_sctp_vlan_packets["match"]["mac_vlan_ipv4_sctp_vlan"] + ], +} + +mac_vlan_ipv4_sctp_all_packets = { + "match": { + "mac_vlan_ipv4_sctp_all": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.4")/SCTP(sport=25,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=19,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/SCTP(sport=25,dport=99)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:99", dst="{}",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)'.format( + vf0_mac + ), + ] + }, + "mismatch": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + ], +} + +mac_vlan_ipv4_sctp_all = { + "sub_casename": "mac_vlan_ipv4_sctp_all", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / vlan / ipv4 / sctp / end actions rss types ipv4-sctp end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_vlan_ipv4_sctp_all_packets["match"][ + "mac_vlan_ipv4_sctp_all" + ][0], + "action": "save_hash", + }, + { + "send_packet": mac_vlan_ipv4_sctp_all_packets["match"][ + "mac_vlan_ipv4_sctp_all" + ][1], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv4_sctp_all_packets["match"][ + "mac_vlan_ipv4_sctp_all" + ][2], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv4_sctp_all_packets["match"][ + "mac_vlan_ipv4_sctp_all" + ][3], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv4_sctp_all_packets["match"][ + "mac_vlan_ipv4_sctp_all" + ][4], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv4_sctp_all_packets["match"][ + "mac_vlan_ipv4_sctp_all" + ][5], + "action": "check_hash_same", + }, + # { + # "send_packet": mac_vlan_ipv4_sctp_all_packets["mismatch"], + # "action": "check_no_hash_or_different", # }, ], "post-test": [ {"send_packet": pkt, "action": "check_no_hash_or_different"} - for pkt in mac_vlan_ipv4_sctp_pay_packets["match"]["mac_vlan_ipv4_sctp_pay"] + for pkt in mac_vlan_ipv4_sctp_all_packets["match"]["mac_vlan_ipv4_sctp_all"] ], } -mac_vlan_ipv6_pay_packets = { +mac_vlan_ipv4_sctp_pay = [mac_vlan_ipv4_sctp_vlan, mac_vlan_ipv4_sctp_all] + +mac_vlan_ipv6_vlan_packets = { "match": { - "mac_vlan_ipv6_pay": [ + "mac_vlan_ipv6_vlan": [ 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( vf0_mac ), @@ -767,37 +1104,94 @@ mac_vlan_ipv6_pay_packets = { ], } -mac_vlan_ipv6_pay = { - "sub_casename": "mac_vlan_ipv6_pay", +mac_vlan_ipv6_vlan = { + "sub_casename": "mac_vlan_ipv6_vlan", "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], + "send_packet": mac_vlan_ipv6_vlan_packets["match"]["mac_vlan_ipv6_vlan"][0], "action": "save_hash", }, { - "send_packet": mac_vlan_ipv6_pay_packets["match"]["mac_vlan_ipv6_pay"][1], + "send_packet": mac_vlan_ipv6_vlan_packets["match"]["mac_vlan_ipv6_vlan"][1], "action": "check_hash_different", }, { - "send_packet": mac_vlan_ipv6_pay_packets["match"]["mac_vlan_ipv6_pay"][2], + "send_packet": mac_vlan_ipv6_vlan_packets["match"]["mac_vlan_ipv6_vlan"][2], "action": "check_hash_same", }, # { - # 'send_packet': mac_vlan_ipv6_pay_packets['mismatch'], - # 'action': 'check_no_hash_or_different', + # "send_packet": mac_vlan_ipv6_vlan_packets["mismatch"], + # "action": "check_no_hash_or_different", + # }, + ], + "post-test": [ + {"send_packet": pkt, "action": "check_no_hash_or_different"} + for pkt in mac_vlan_ipv6_vlan_packets["match"]["mac_vlan_ipv6_vlan"] + ], +} + +mac_vlan_ipv6_l3src_packets = { + "match": { + "mac_vlan_ipv6_l3src": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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:2022")/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:99", dst="{}",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:2023")/Raw("y" * 80)'.format( + vf0_mac + ), + ] + }, + "mismatch": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",type=0x8100)/Dot1Q(vlan=1,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'.format( + vf0_mac + ) + ], +} + +mac_vlan_ipv6_l3src = { + "sub_casename": "mac_vlan_ipv6_l3src", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / vlan / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_vlan_ipv6_l3src_packets["match"]["mac_vlan_ipv6_l3src"][ + 0 + ], + "action": "save_hash", + }, + { + "send_packet": mac_vlan_ipv6_l3src_packets["match"]["mac_vlan_ipv6_l3src"][ + 1 + ], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv6_l3src_packets["match"]["mac_vlan_ipv6_l3src"][ + 2 + ], + "action": "check_hash_same", + }, + # { + # "send_packet": mac_vlan_ipv6_l3src_packets["mismatch"], + # "action": "check_no_hash_or_different", # }, ], "post-test": [ {"send_packet": pkt, "action": "check_no_hash_or_different"} - for pkt in mac_vlan_ipv6_pay_packets["match"]["mac_vlan_ipv6_pay"] + for pkt in mac_vlan_ipv6_l3src_packets["match"]["mac_vlan_ipv6_l3src"] ], } -mac_vlan_ipv6_udp_pay_packets = { +mac_vlan_ipv6_pay = [mac_vlan_ipv6_vlan, mac_vlan_ipv6_l3src] + +mac_vlan_ipv6_udp_vlan_packets = { "match": { - "mac_vlan_ipv6_udp_pay": [ + "mac_vlan_ipv6_udp_vlan": [ 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( vf0_mac ), @@ -819,43 +1213,103 @@ mac_vlan_ipv6_udp_pay_packets = { ], } -mac_vlan_ipv6_udp_pay = { - "sub_casename": "mac_vlan_ipv6_udp_pay", +mac_vlan_ipv6_udp_vlan = { + "sub_casename": "mac_vlan_ipv6_udp_vlan", "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" + "send_packet": mac_vlan_ipv6_udp_vlan_packets["match"][ + "mac_vlan_ipv6_udp_vlan" ][0], "action": "save_hash", }, { - "send_packet": mac_vlan_ipv6_udp_pay_packets["match"][ - "mac_vlan_ipv6_udp_pay" + "send_packet": mac_vlan_ipv6_udp_vlan_packets["match"][ + "mac_vlan_ipv6_udp_vlan" ][1], "action": "check_hash_different", }, { - "send_packet": mac_vlan_ipv6_udp_pay_packets["match"][ - "mac_vlan_ipv6_udp_pay" + "send_packet": mac_vlan_ipv6_udp_vlan_packets["match"][ + "mac_vlan_ipv6_udp_vlan" ][2], "action": "check_hash_same", }, # { - # 'send_packet': mac_vlan_ipv6_udp_pay_packets['mismatch'], - # 'action': 'check_no_hash_or_different', + # "send_packet": mac_vlan_ipv6_udp_vlan_packets["mismatch"], + # "action": "check_no_hash_or_different", + # }, + ], + "post-test": [ + {"send_packet": pkt, "action": "check_no_hash_or_different"} + for pkt in mac_vlan_ipv6_udp_vlan_packets["match"]["mac_vlan_ipv6_udp_vlan"] + ], +} + +mac_vlan_ipv6_udp_l4src_packets = { + "match": { + "mac_vlan_ipv6_udp_l4src": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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=19,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:99", dst="{}",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/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)'.format( + vf0_mac + ), + ] + }, + "mismatch": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + ], +} + +mac_vlan_ipv6_udp_l4src = { + "sub_casename": "mac_vlan_ipv6_udp_l4src", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / vlan / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_vlan_ipv6_udp_l4src_packets["match"][ + "mac_vlan_ipv6_udp_l4src" + ][0], + "action": "save_hash", + }, + { + "send_packet": mac_vlan_ipv6_udp_l4src_packets["match"][ + "mac_vlan_ipv6_udp_l4src" + ][1], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv6_udp_l4src_packets["match"][ + "mac_vlan_ipv6_udp_l4src" + ][2], + "action": "check_hash_same", + }, + # { + # "send_packet": mac_vlan_ipv6_udp_l4src_packets["mismatch"], + # "action": "check_no_hash_or_different", # }, ], "post-test": [ {"send_packet": pkt, "action": "check_no_hash_or_different"} - for pkt in mac_vlan_ipv6_udp_pay_packets["match"]["mac_vlan_ipv6_udp_pay"] + for pkt in mac_vlan_ipv6_udp_l4src_packets["match"]["mac_vlan_ipv6_udp_l4src"] ], } -mac_vlan_ipv6_tcp_pay_packets = { +mac_vlan_ipv6_udp_pay = [mac_vlan_ipv6_udp_vlan, mac_vlan_ipv6_udp_l4src] + +mac_vlan_ipv6_tcp_vlan_packets = { "match": { - "mac_vlan_ipv6_tcp_pay": [ + "mac_vlan_ipv6_tcp_vlan": [ 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( vf0_mac ), @@ -877,43 +1331,103 @@ mac_vlan_ipv6_tcp_pay_packets = { ], } -mac_vlan_ipv6_tcp_pay = { - "sub_casename": "mac_vlan_ipv6_tcp_pay", +mac_vlan_ipv6_tcp_vlan = { + "sub_casename": "mac_vlan_ipv6_tcp_vlan", "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" + "send_packet": mac_vlan_ipv6_tcp_vlan_packets["match"][ + "mac_vlan_ipv6_tcp_vlan" ][0], "action": "save_hash", }, { - "send_packet": mac_vlan_ipv6_tcp_pay_packets["match"][ - "mac_vlan_ipv6_tcp_pay" + "send_packet": mac_vlan_ipv6_tcp_vlan_packets["match"][ + "mac_vlan_ipv6_tcp_vlan" ][1], "action": "check_hash_different", }, { - "send_packet": mac_vlan_ipv6_tcp_pay_packets["match"][ - "mac_vlan_ipv6_tcp_pay" + "send_packet": mac_vlan_ipv6_tcp_vlan_packets["match"][ + "mac_vlan_ipv6_tcp_vlan" ][2], "action": "check_hash_same", }, # { - # 'send_packet': mac_vlan_ipv6_tcp_pay_packets['mismatch'], - # 'action': 'check_no_hash_or_different', + # "send_packet": mac_vlan_ipv6_tcp_vlan_packets["mismatch"], + # "action": "check_no_hash_or_different", + # }, + ], + "post-test": [ + {"send_packet": pkt, "action": "check_no_hash_or_different"} + for pkt in mac_vlan_ipv6_tcp_vlan_packets["match"]["mac_vlan_ipv6_tcp_vlan"] + ], +} + +mac_vlan_ipv6_tcp_l3dst_packets = { + "match": { + "mac_vlan_ipv6_tcp_l3dst": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:99", dst="{}",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/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)'.format( + vf0_mac + ), + ] + }, + "mismatch": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + ], +} + +mac_vlan_ipv6_tcp_l3dst = { + "sub_casename": "mac_vlan_ipv6_tcp_l3dst", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / vlan / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_vlan_ipv6_tcp_l3dst_packets["match"][ + "mac_vlan_ipv6_tcp_l3dst" + ][0], + "action": "save_hash", + }, + { + "send_packet": mac_vlan_ipv6_tcp_l3dst_packets["match"][ + "mac_vlan_ipv6_tcp_l3dst" + ][1], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv6_tcp_l3dst_packets["match"][ + "mac_vlan_ipv6_tcp_l3dst" + ][2], + "action": "check_hash_same", + }, + # { + # "send_packet": mac_vlan_ipv6_tcp_l3dst_packets["mismatch"], + # "action": "check_no_hash_or_different", # }, ], "post-test": [ {"send_packet": pkt, "action": "check_no_hash_or_different"} - for pkt in mac_vlan_ipv6_tcp_pay_packets["match"]["mac_vlan_ipv6_tcp_pay"] + for pkt in mac_vlan_ipv6_tcp_l3dst_packets["match"]["mac_vlan_ipv6_tcp_l3dst"] ], } -mac_vlan_ipv6_sctp_pay_packets = { +mac_vlan_ipv6_tcp_pay = [mac_vlan_ipv6_tcp_vlan, mac_vlan_ipv6_tcp_l3dst] + +mac_vlan_ipv6_sctp_vlan_packets = { "match": { - "mac_vlan_ipv6_sctp_pay": [ + "mac_vlan_ipv6_sctp_vlan": [ 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( vf0_mac ), @@ -935,40 +1449,111 @@ mac_vlan_ipv6_sctp_pay_packets = { ], } -mac_vlan_ipv6_sctp_pay = { - "sub_casename": "mac_vlan_ipv6_sctp_pay", +mac_vlan_ipv6_sctp_vlan = { + "sub_casename": "mac_vlan_ipv6_sctp_vlan", "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" + "send_packet": mac_vlan_ipv6_sctp_vlan_packets["match"][ + "mac_vlan_ipv6_sctp_vlan" ][0], "action": "save_hash", }, { - "send_packet": mac_vlan_ipv6_sctp_pay_packets["match"][ - "mac_vlan_ipv6_sctp_pay" + "send_packet": mac_vlan_ipv6_sctp_vlan_packets["match"][ + "mac_vlan_ipv6_sctp_vlan" ][1], "action": "check_hash_different", }, { - "send_packet": mac_vlan_ipv6_sctp_pay_packets["match"][ - "mac_vlan_ipv6_sctp_pay" + "send_packet": mac_vlan_ipv6_sctp_vlan_packets["match"][ + "mac_vlan_ipv6_sctp_vlan" ][2], "action": "check_hash_same", }, # { - # 'send_packet': mac_vlan_ipv6_sctp_pay_packets['mismatch'], - # 'action': 'check_no_hash_or_different', + # "send_packet": mac_vlan_ipv6_sctp_vlan_packets["mismatch"], + # "action": "check_no_hash_or_different", # }, ], "post-test": [ {"send_packet": pkt, "action": "check_no_hash_or_different"} - for pkt in mac_vlan_ipv6_sctp_pay_packets["match"]["mac_vlan_ipv6_sctp_pay"] + for pkt in mac_vlan_ipv6_sctp_vlan_packets["match"]["mac_vlan_ipv6_sctp_vlan"] + ], +} + +mac_vlan_ipv6_sctp_l3dst_l4dst_packets = { + "match": { + "mac_vlan_ipv6_sctp_l3dst_l4dst": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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:2023")/SCTP(sport=25,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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=99)/Raw("x" * 80)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:99", dst="{}",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=19,dport=23)/Raw("x" * 80)'.format( + vf0_mac + ), + ] + }, + "mismatch": [ + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), + 'Ether(src="10:22:33:44:55:66", dst="{}",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)'.format( + vf0_mac + ), ], } +mac_vlan_ipv6_sctp_l3dst_l4dst = { + "sub_casename": "mac_vlan_ipv6_sctp_l3dst_l4dst", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / vlan / ipv6 / sctp / end actions rss types ipv6-sctp l3-dst-only l4-dst-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_vlan_ipv6_sctp_l3dst_l4dst_packets["match"][ + "mac_vlan_ipv6_sctp_l3dst_l4dst" + ][0], + "action": "save_hash", + }, + { + "send_packet": mac_vlan_ipv6_sctp_l3dst_l4dst_packets["match"][ + "mac_vlan_ipv6_sctp_l3dst_l4dst" + ][1], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv6_sctp_l3dst_l4dst_packets["match"][ + "mac_vlan_ipv6_sctp_l3dst_l4dst" + ][2], + "action": "check_hash_different", + }, + { + "send_packet": mac_vlan_ipv6_sctp_l3dst_l4dst_packets["match"][ + "mac_vlan_ipv6_sctp_l3dst_l4dst" + ][3], + "action": "check_hash_same", + }, + # { + # "send_packet": mac_vlan_ipv6_sctp_l3dst_l4dst_packets["mismatch"], + # "action": "check_no_hash_or_different", + # }, + ], + "post-test": [ + {"send_packet": pkt, "action": "check_no_hash_or_different"} + for pkt in mac_vlan_ipv6_sctp_l3dst_l4dst_packets["match"][ + "mac_vlan_ipv6_sctp_l3dst_l4dst" + ] + ], +} + +mac_vlan_ipv6_sctp_pay = [mac_vlan_ipv6_sctp_vlan, mac_vlan_ipv6_sctp_l3dst_l4dst] + class ICE_advance_iavf_rss_vlan_ah_l2tp_pfcp(TestCase): def set_up_all(self): From patchwork Wed Dec 28 12:32:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Jiale, SongX" X-Patchwork-Id: 121423 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 0F133A0540; Wed, 28 Dec 2022 05:34:47 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 97A874161A; Wed, 28 Dec 2022 05:34:46 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id A4DAA40FDF for ; Wed, 28 Dec 2022 05:34:44 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672202084; x=1703738084; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0t9Zc2xZ/Dzgb98XjWV/hQg4MZON78lyYY7dio0l4mg=; b=FNGwQenpym5uR90CRElatg0C1HlkrLwhxUp39Kx7SwbBUTb+Bdz1yb+E OFm/gSDvla95T3OKfQNuBL9IX5w2qcMe5OYMTFXx7fvPffu5Sv8EI+VUb hDc/+qZvFUABJnhHkJ0aMl3RxLNh6dojrL4pJ+/Oc2B+zZrgjjU7dC71l R1Ma6EJyoCMQBso5oOmeMgfysLgifW3zlLpBPsIT5hTiCDvwSqoNG1CZr GkdaD2/mGV6QJrEBk7pDV6A2juXkM0OmrrEg24Js6GMgkhzmt4yUMP5gQ Hxa7gcIjs4vGP7jtjQUGcakIR3bZZlz8EeGfcw1S92G35fwaJrQKgeWxl w==; X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="322040110" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="322040110" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 20:34:43 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10573"; a="655200522" X-IronPort-AV: E=Sophos;i="5.96,280,1665471600"; d="scan'208";a="655200522" Received: from unknown (HELO localhost.localdomain) ([10.239.252.20]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Dec 2022 20:34:42 -0800 From: Song Jiale To: dts@dpdk.org Cc: Song Jiale , Peng Yuan Subject: [dts] [PATCH V1 2/2] test_plans/ice_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp: add 9 subcase Date: Wed, 28 Dec 2022 12:32:34 +0000 Message-Id: <20221228123234.628532-2-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221228123234.628532-1-songx.jiale@intel.com> References: <20221228123234.628532-1-songx.jiale@intel.com> MIME-Version: 1.0 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 add 9 subcases to test the dst and src rss rules of L3 and L4 layers with vf. Signed-off-by: Peng Yuan Signed-off-by: Song Jiale Acked-by: Yuan Peng Tested-by: Weiyuan Li --- ...vf_rss_vlan_esp_ah_l2tp_pfcp_test_plan.rst | 461 ++++++++++++++++++ 1 file changed, 461 insertions(+) diff --git a/test_plans/ice_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp_test_plan.rst b/test_plans/ice_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp_test_plan.rst index 2acf665f..82c88fe0 100644 --- a/test_plans/ice_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp_test_plan.rst +++ b/test_plans/ice_advanced_iavf_rss_vlan_esp_ah_l2tp_pfcp_test_plan.rst @@ -598,6 +598,8 @@ Test case: MAC_IPV6_AH Test case: MAC_VLAN_IPV4_PAY ============================ +Subcase: MAC_VLAN_IPV4_VLAN +--------------------------- 1. validate a rule for RSS type of MAC_VLAN_IPV4_PAY:: @@ -645,8 +647,59 @@ Test case: MAC_VLAN_IPV4_PAY check the rule not exists. send the first packet in matched packets, check the hash value of this packet is different with before. +Subcase: MAC_VLAN_IPV4_L3DST +-------------------------------- + +1. validate a rule for RSS type of MAC_VLAN_IPV4_PAY:: + + testpmd> flow validate 0 ingress pattern eth / vlan / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule for RSS type of MAC_VLAN_IPV4_PAY:: + + testpmd> flow create 0 ingress pattern eth / vlan / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets + + * MAC_VLAN_IPV4_PAY packet:: + + sendp([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)],iface="ens786f0",count=1) + + change the field [l3 dst address], send packets:: + + sendp([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.3")/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash value is different from the first packet. + change other fields, send packets:: + + sendp([Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are the same as the first packet. + +4. destroy the rule:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists. + send the matched packets, check the hash values of the packets are not exist. + Test case: MAC_VLAN_IPV4_UDP_PAY ================================ +Subcase: MAC_VLAN_IPV4_UDP_VLAN +------------------------------- 1. validate a rule for RSS type of MAC_VLAN_IPV4_UDP_PAY:: @@ -694,8 +747,108 @@ Test case: MAC_VLAN_IPV4_UDP_PAY check the rule not exists. send the first packet in matched packets, check the hash value of this packet is different with before. +Subcase: MAC_VLAN_IPV4_UDP_L3SRC +-------------------------------- + +1. validate a rule for RSS type of MAC_VLAN_IPV4_UDP_PAY:: + + testpmd> flow validate 0 ingress pattern eth / vlan / ipv4 / udp / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule for RSS type of MAC_VLAN_IPV4_UDP_PAY:: + + testpmd> flow create 0 ingress pattern eth / vlan / ipv4 / udp / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets + + * MAC_VLAN_IPV4_UDP_PAY packet:: + + sendp([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)],iface="ens786f0",count=1) + + change the field [l3 src address], send packets:: + + sendp([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.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are different from the first packet. + change other fields, send packets:: + + sendp([Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=19,dport=99)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are the same as as the first packet. + +4. destroy the rule:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists. + send the matched packets, check the hash values of the packets are not exist. + +Subcase: MAC_VLAN_IPV4_UDP_L4DST +-------------------------------- + +1. validate a rule for RSS type of MAC_VLAN_IPV4_UDP_PAY:: + + testpmd> flow validate 0 ingress pattern eth / vlan / ipv4 / udp / end actions rss types ipv4-udp l4-dst-only end key_len 0 queues end / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule for RSS type of MAC_VLAN_IPV4_UDP_PAY:: + + testpmd> flow create 0 ingress pattern eth / vlan / ipv4 / udp / end actions rss types ipv4-udp l4-dst-only end key_len 0 queues end / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets + + * MAC_VLAN_IPV4_UDP_PAY packet:: + + sendp([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)],iface="ens786f0",count=1) + + change the field [l4 dst address], send packets:: + + sendp([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=24)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are different from the first packet. + change other fields, send packets:: + + sendp([Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.3", dst="192.168.1.4")/UDP(sport=19,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are the same as as the first packet. + +4. destroy the rule:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists. + send the matched packets, check the hash values of the packets are not exist. + Test case: MAC_VLAN_IPV4_TCP_PAY ================================ +Subcase: MAC_VLAN_IPV4_TCP_VLAN +------------------------------- 1. validate a rule for RSS type of MAC_VLAN_IPV4_TCP_PAY:: @@ -743,8 +896,60 @@ Test case: MAC_VLAN_IPV4_TCP_PAY check the rule not exists. send the first packet in matched packets, check the hash value of this packet is different with before. +Subcase: MAC_VLAN_IPV4_TCP_l3SRC_L4SRC +-------------------------------------- + +1. validate a rule for RSS type of MAC_VLAN_IPV4_TCP_PAY:: + + testpmd> flow validate 0 ingress pattern eth / vlan / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-src-only end key_len 0 queues end / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule for RSS type of MAC_VLAN_IPV4_TCP_PAY:: + + testpmd> flow create 0 ingress pattern eth / vlan / ipv4 / tcp / end actions rss types ipv4-tcp l3-src-only l4-src-only end key_len 0 queues end / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets + + * MAC_VLAN_IPV4_TCP_PAY packet:: + + sendp([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)],iface="ens786f0",count=1) + + change the field [l3 src address and l4 sport], send packets:: + + sendp([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.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([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=22,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are different from the first packet. + change other fields, send packets:: + + sendp([Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=2,type=0x0800)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=99)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are the same as as the first packet. + +4. destroy the rule:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists. + send the matched packets, check the hash values of the packets are not exist. + Test case: MAC_VLAN_IPV4_SCTP_PAY ================================= +Subcase: MAC_VLAN_IPV4_SCTP_VLAN +-------------------------------- 1. validate a rule for RSS type of MAC_VLAN_IPV4_SCTP_PAY:: @@ -792,8 +997,62 @@ Test case: MAC_VLAN_IPV4_SCTP_PAY check the rule not exists. send the first packet in matched packets, check the hash value of this packet is different with before. +Subcase: MAC_VLAN_IPV4_SCTP_ALL +------------------------------- + +1. validate a rule for RSS type of MAC_VLAN_IPV4_SCTP_PAY:: + + testpmd> flow validate 0 ingress pattern eth / vlan / ipv4 / sctp / end actions rss types ipv4-sctp end key_len 0 queues end / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule for RSS type of MAC_VLAN_IPV4_SCTP_PAY:: + + testpmd> flow create 0 ingress pattern eth / vlan / ipv4 / sctp / end actions rss types ipv4-sctp end key_len 0 queues end / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets + + * MAC_VLAN_IPV4_SCTP_PAY packet:: + + sendp([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)],iface="ens786f0",count=1) + + change the field [ipv4-sctp], send packets:: + + sendp([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.3", dst="192.168.1.2")/SCTP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([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.4")/SCTP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([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=19,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([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=99)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are different from the first packet. + change other fields, send packets:: + + sendp([Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",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)],iface="ens786f0",count=1) + + check the hash values are the same as as the first packet. + +4. destroy the rule:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists. + send the matched packets, check the hash values of the packets are not exist. + Test case: MAC_VLAN_IPV6_PAY ============================ +Subcase: MAC_VLAN_IPV6_VLAN +------------------------------- 1. validate a rule for RSS type of MAC_VLAN_IPV6_PAY:: @@ -841,8 +1100,59 @@ Test case: MAC_VLAN_IPV6_PAY check the rule not exists. send the first packet in matched packets, check the hash value of this packet is different with before. +Subcase: MAC_VLAN_IPV6_L3SRC +-------------------------------- + +1. validate a rule for RSS type of MAC_VLAN_IPV6_PAY:: + + testpmd> flow validate 0 ingress pattern eth / vlan / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule for RSS type of MAC_VLAN_IPV6_PAY:: + + testpmd> flow create 0 ingress pattern eth / vlan / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets + + * MAC_VLAN_IPV6_PAY packet:: + + sendp([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)],iface="ens786f0",count=1) + + change the field [l3 src address], send packets:: + + sendp([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:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are different from the first packet. + change other fields, send packets:: + + sendp([Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",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:2023")/Raw("y" * 80)],iface="ens786f0",count=1) + + check the hash values are the same as the first packet. + +4. destroy the rule:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists. + send the matched packets, check the hash values of the packets are not exist. + Test case: MAC_VLAN_IPV6_UDP_PAY ================================ +Subcase: MAC_VLAN_IPV6_UDP_VLAN +------------------------------- 1. validate a rule for RSS type of MAC_VLAN_IPV6_UDP_PAY:: @@ -890,8 +1200,59 @@ Test case: MAC_VLAN_IPV6_UDP_PAY check the rule not exists. send the first packet in matched packets, check the hash value of this packet is different with before. +Subcase: MAC_VLAN_IPV6_UDP_L4SRC +-------------------------------- + +1. validate a rule for RSS type of MAC_VLAN_IPV6_UDP_PAY:: + + testpmd> flow validate 0 ingress pattern eth / vlan / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end key_len 0 queues end / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule for RSS type of MAC_VLAN_IPV6_UDP_PAY:: + + testpmd> flow create 0 ingress pattern eth / vlan / ipv6 / udp / end actions rss types ipv6-udp l4-src-only end key_len 0 queues end / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets + + * MAC_VLAN_IPV6_UDP_PAY packet:: + + sendp([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)],iface="ens786f0",count=1) + + change the field [l4 src address], send packets:: + + sendp([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=19,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are different from the first packet. + change other fields, send packets:: + + sendp([Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/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)],iface="ens786f0",count=1) + + check the hash values are the same as the first packet. + +4. destroy the rule:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists. + send the matched packets, check the hash values of the packets are not exist. + Test case: MAC_VLAN_IPV6_TCP_PAY ================================ +Subcase: MAC_VLAN_IPV6_TCP_VLAN +------------------------------- 1. validate a rule for RSS type of MAC_VLAN_IPV6_TCP_PAY:: @@ -939,8 +1300,59 @@ Test case: MAC_VLAN_IPV6_TCP_PAY check the rule not exists. send the first packet in matched packets, check the hash value of this packet is different with before. +Subcase: MAC_VLAN_IPV6_TCP_L3DST +-------------------------------- + +1. validate a rule for RSS type of MAC_VLAN_IPV6_TCP_PAY:: + + testpmd> flow validate 0 ingress pattern eth / vlan / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only end key_len 0 queues end / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule for RSS type of MAC_VLAN_IPV6_TCP_PAY:: + + testpmd> flow create 0 ingress pattern eth / vlan / ipv6 / tcp / end actions rss types ipv6-tcp l3-dst-only end key_len 0 queues end / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets + + * MAC_VLAN_IPV6_TCP_PAY packet:: + + sendp([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)],iface="ens786f0",count=1) + + change the field [l3 dst address], send packets:: + + sendp([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:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are different from the first packet. + change other fields, send packets:: + + sendp([Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/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)],iface="ens786f0",count=1) + + check the hash values are the same as the first packet. + +4. destroy the rule:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists. + send the matched packets, check the hash values of the packets are not exist. + Test case: MAC_VLAN_IPV6_SCTP_PAY ================================= +Subcase: MAC_VLAN_IPV6_SCTP_VLAN +-------------------------------- 1. validate a rule for RSS type of MAC_VLAN_IPV6_SCTP_PAY:: @@ -988,6 +1400,55 @@ Test case: MAC_VLAN_IPV6_SCTP_PAY check the rule not exists. send the first packet in matched packets, check the hash value of this packet is different with before. +Subcase: MAC_VLAN_IPV6_SCTP_L3DST_L4DST +--------------------------------------- + +1. validate a rule for RSS type of MAC_VLAN_IPV6_SCTP_PAY:: + + testpmd> flow validate 0 ingress pattern eth / vlan / ipv6 / sctp / end actions rss types ipv6-sctp l3-dst-only l4-dst-only end key_len 0 queues end / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule for RSS type of MAC_VLAN_IPV6_SCTP_PAY:: + + testpmd> flow create 0 ingress pattern eth / vlan / ipv6 / sctp / end actions rss types ipv6-sctp l3-dst-only l4-dst-only end key_len 0 queues end / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets + + * MAC_VLAN_IPV6_SCTP_PAY packet:: + + sendp([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)],iface="ens786f0",count=1) + + change the field [l3 dst address and l4 dport], send packets:: + + sendp([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:2023")/SCTP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([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=99)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are different from the first packet. + change other fields, send packets:: + + sendp([Ether(src="10:22:33:44:55:99", dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=2,type=0x86dd)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/SCTP(sport=19,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + + check the hash values are the same as the first packet. + +4. destroy the rule:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists. + send the matched packets, check the hash values the packets are not exist. Test case: negative cases =========================