From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43B70A0542; Fri, 29 Jul 2022 09:11:21 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FC8442C15; Fri, 29 Jul 2022 09:11:20 +0200 (CEST) Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by mails.dpdk.org (Postfix) with ESMTP id 20FD14069C for ; Fri, 29 Jul 2022 09:11:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1659078679; x=1690614679; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=F0/Sq7lBq6dU3Z4zUCDN2etExYlSbdSWcfQ/jVhu1kA=; b=Qd68ILDcm+Qg+2UL0LiThIMdy7+YMAij1rrmJ394A0Z1Yen7VueEOE2g S5iLGnTVym+6Ck8OR6lbVe7ZJiqC/HdXPwjunhL9wmKkiwEeNeHLkJcb7 lXSaZj9aR3uoLaSj3H5LgnCtHKRDL+rDG02mVaA54n1seJHdru3pE1rGQ JZmPTx0RQtoMtwcsGcIQhuq5UmHgQbrpwsTesGECr5KTvSwRv8wcfRrPc mqTCdafRG89hHr6VAqJJQ3/I71pC58RhMaOWmtQIT0UJeCCPlQ9teBAY9 AjyyK2qegro+qV3Zj8ToqbYDz2AhoYJEB7LMc9IPgWMEsj2v1Jfzgck3T Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10422"; a="350415822" X-IronPort-AV: E=Sophos;i="5.93,200,1654585200"; d="scan'208";a="350415822" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2022 00:11:15 -0700 X-IronPort-AV: E=Sophos;i="5.93,200,1654585200"; d="scan'208";a="660124696" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Jul 2022 00:11:14 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li Subject: [dts][PATCH V2 2/4] tests/ice_advanced_iavf_rss: add new test suite Date: Fri, 29 Jul 2022 15:11:12 +0800 Message-Id: <20220729071114.10788-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220729071114.10788-1-weiyuanx.li@intel.com> References: <20220729071114.10788-1-weiyuanx.li@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 DPDK22.07 new feature test suite. Signed-off-by: Weiyuan Li --- v2: -modify the ice_iavf_fdir scipt tear_down method and destroy environment first. tests/TestSuite_ice_advanced_iavf_rss.py | 654 +++++++++++++++++++++++ 1 file changed, 654 insertions(+) diff --git a/tests/TestSuite_ice_advanced_iavf_rss.py b/tests/TestSuite_ice_advanced_iavf_rss.py index e560c9e6..b4a7290b 100644 --- a/tests/TestSuite_ice_advanced_iavf_rss.py +++ b/tests/TestSuite_ice_advanced_iavf_rss.py @@ -80,6 +80,19 @@ mac_ipv6_toeplitz_basic_pkt = { # ], } +mac_ipv6_toeplitz_basic_multicast_pkt = { + "ipv6-nonfrag": [ + 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/("X"*480)', + ], + "ipv6-icmp": [ + 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/ICMP()/("X"*480)', + ], + "ipv6-udp": [ + 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480)', + ], +} + + mac_ipv6_udp_toeplitz_basic_pkt = { "ipv6-udp": [ 'Ether(dst="%s", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=22,dport=23)/("X"*480)' @@ -161,6 +174,295 @@ mac_ipv4_l2_src = { ], } +mac_ipv4_toeplitz_basic_multicast_pkt = { + "ipv4-nonfrag": [ + 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.2")/("X"*480)', + ], + "ipv4-icmp": [ + 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.2")/ICMP()/("X"*480)', + ], + "ipv4-tcp": [ + 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)', + ], +} + +# mac_ipv4 multicast +mac_ipv4_l2_src_multicast = { + "sub_casename": "mac_ipv4_l2_src_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv4 / end actions rss types eth l2-src-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-nonfrag"], + "action": {"save_hash": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/("X"*480)', + "action": {"check_hash_different": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/("X"*480)', + "action": {"check_hash_same": "ipv4-nonfrag"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-icmp"], + "action": {"save_hash": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/("X"*480)', + "action": {"check_hash_same": "ipv4-icmp"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-tcp"], + "action": {"save_hash": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/TCP(sport=19,dport=99)/("X"*480)', + "action": {"check_hash_same": "ipv4-tcp"}, + }, + ], +} + +mac_ipv4_l2_dst_multicast = { + "sub_casename": "mac_ipv4_l2_dst_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv4 / end actions rss types eth l2-dst-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-nonfrag"], + "action": {"save_hash": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/("X"*480)', + "action": {"check_hash_different": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.5")/("X"*480)', + "action": {"check_hash_same": "ipv4-nonfrag"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-icmp"], + "action": {"save_hash": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.5")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv4-icmp"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-tcp"], + "action": {"save_hash": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/TCP(sport=19,dport=99)/("X"*480)', + "action": {"check_hash_different": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.5")/TCP(sport=19,dport=99)/("X"*480)', + "action": {"check_hash_same": "ipv4-tcp"}, + }, + ], +} + +mac_ipv4_l2src_l2dst_multicast = { + "sub_casename": "mac_ipv4_l2src_l2dst_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv4 / end actions rss types eth end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-nonfrag"], + "action": {"save_hash": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/("X"*480)', + "action": {"check_hash_different": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/("X"*480)', + "action": {"check_hash_same": "ipv4-nonfrag"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-icmp"], + "action": {"save_hash": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv4-icmp"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-tcp"], + "action": {"save_hash": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.0.5")/TCP(sport=23,dport=25)/("X"*480)', + "action": {"check_hash_same": "ipv4-tcp"}, + }, + ], +} + +mac_ipv4_l3_src_multicast = { + "sub_casename": "mac_ipv4_l3_src_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-nonfrag"], + "action": {"save_hash": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/("X"*480)', + "action": {"check_hash_different": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/("X"*480)', + "action": {"check_hash_same": "ipv4-nonfrag"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-icmp"], + "action": {"save_hash": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv4-icmp"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-tcp"], + "action": {"save_hash": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/TCP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.2", src="192.168.0.2")/TCP(sport=32,dport=33)/("X"*480)', + "action": {"check_hash_same": "ipv4-tcp"}, + }, + ], +} + +mac_ipv4_l3_dst_multicast = { + "sub_casename": "mac_ipv4_l3_dst_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-nonfrag"], + "action": {"save_hash": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/("X"*480)', + "action": {"check_hash_different": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.1.2")/("X"*480)', + "action": {"check_hash_same": "ipv4-nonfrag"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-icmp"], + "action": {"save_hash": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.1.2")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv4-icmp"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-tcp"], + "action": {"save_hash": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.1.2")/TCP(sport=32,dport=33)/("X"*480)', + "action": {"check_hash_same": "ipv4-tcp"}, + }, + ], +} + +mac_ipv4_all_multicast = { + "sub_casename": "mac_ipv4_all_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-nonfrag"], + "action": {"save_hash": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/("X"*480)', + "action": {"check_hash_different": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/("X"*480)', + "action": {"check_hash_different": "ipv4-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/("X"*480)', + "action": {"check_hash_same": "ipv4-nonfrag"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-icmp"], + "action": {"save_hash": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv4-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv4-icmp"}, + }, + { + "send_packet": mac_ipv4_toeplitz_basic_multicast_pkt["ipv4-tcp"], + "action": {"save_hash": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.2.1", src="192.168.0.2")/TCP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IP(dst="224.0.0.1", src="192.168.1.2")/TCP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv4-tcp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IP(dst="224.0.0.1", src="192.168.0.2")/TCP(sport=32,dport=33)/("X"*480)', + "action": {"check_hash_same": "ipv4-tcp"}, + }, + ], +} + mac_ipv4_l2_dst = { "sub_casename": "mac_ipv4_l2_dst", "port_id": 0, @@ -1853,6 +2155,283 @@ mac_ipv4_sctp_chksum = [ for element in mac_ipv4_udp_chksum ] +# mac_ipv6 multicast +mac_ipv6_l2_src_multicast = { + "sub_casename": "mac_ipv6_l2_src_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv6 / end actions rss types eth l2-src-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-nonfrag"], + "action": {"save_hash": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/("X"*480)', + "action": {"check_hash_different": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/("X"*480)', + "action": {"check_hash_same": "ipv6-nonfrag"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-icmp"], + "action": {"save_hash": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv6-icmp"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-udp"], + "action": {"save_hash": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/UDP(sport=25,dport=99)/("X"*480)', + "action": {"check_hash_same": "ipv6-udp"}, + }, + ], +} + +mac_ipv6_l2_dst_multicast = { + "sub_casename": "mac_ipv6_l2_dst_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv6 / end actions rss types eth l2-dst-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-nonfrag"], + "action": {"save_hash": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/("X"*480)', + "action": {"check_hash_different": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/("X"*480)', + "action": {"check_hash_same": "ipv6-nonfrag"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-icmp"], + "action": {"save_hash": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv6-icmp"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-udp"], + "action": {"save_hash": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:67", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/UDP(sport=25,dport=99)/("X"*480)', + "action": {"check_hash_different": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::23")/UDP(sport=25,dport=99)/("X"*480)', + "action": {"check_hash_same": "ipv6-udp"}, + }, + ], +} + +mac_ipv6_l2src_l2dst_multicast = { + "sub_casename": "mac_ipv6_l2src_l2dst_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv6 / end actions rss types eth end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-nonfrag"], + "action": {"save_hash": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/("X"*480)', + "action": {"check_hash_different": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::25")/("X"*480)', + "action": {"check_hash_same": "ipv6-nonfrag"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-icmp"], + "action": {"save_hash": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::25")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv6-icmp"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-udp"], + "action": {"save_hash": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2923",dst="ff01::25")/UDP(sport=25,dport=99)/("X"*480)', + "action": {"check_hash_same": "ipv6-udp"}, + }, + ], +} + +mac_ipv6_l3_src_multicast = { + "sub_casename": "mac_ipv6_l3_src_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-nonfrag"], + "action": {"save_hash": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/("X"*480)', + "action": {"check_hash_different": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/("X"*480)', + "action": {"check_hash_same": "ipv6-nonfrag"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-icmp"], + "action": {"save_hash": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::25")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv6-icmp"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-udp"], + "action": {"save_hash": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::25")/UDP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/UDP(sport=32,dport=33)/("X"*480)', + "action": {"check_hash_same": "ipv6-udp"}, + }, + ], +} + +mac_ipv6_l3_dst_multicast = { + "sub_casename": "mac_ipv6_l3_dst_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-nonfrag"], + "action": {"save_hash": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::25")/("X"*480)', + "action": {"check_hash_different": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/("X"*480)', + "action": {"check_hash_same": "ipv6-nonfrag"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-icmp"], + "action": {"save_hash": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::25")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv6-icmp"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-udp"], + "action": {"save_hash": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::25")/UDP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/UDP(sport=32,dport=33)/("X"*480)', + "action": {"check_hash_same": "ipv6-udp"}, + }, + ], +} + +mac_ipv6_all_multicast = { + "sub_casename": "mac_ipv6_all_multicast", + "port_id": 0, + "rule": "flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end", + "test": [ + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-nonfrag"], + "action": {"save_hash": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::21")/("X"*480)', + "action": {"check_hash_different": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/("X"*480)', + "action": {"check_hash_different": "ipv6-nonfrag"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/("X"*480)', + "action": {"check_hash_same": "ipv6-nonfrag"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-icmp"], + "action": {"save_hash": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::21")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/ICMP()/("X"*480)', + "action": {"check_hash_different": "ipv6-icmp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/ICMP()/("X"*480)', + "action": {"check_hash_same": "ipv6-icmp"}, + }, + { + "send_packet": mac_ipv6_toeplitz_basic_multicast_pkt["ipv6-udp"], + "action": {"save_hash": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::21")/UDP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E0")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2928",dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480)', + "action": {"check_hash_different": "ipv6-udp"}, + }, + { + "send_packet": 'Ether(dst="11:22:33:44:55:66", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="ff01::2")/UDP(sport=32,dport=33)/("X"*480)', + "action": {"check_hash_same": "ipv6-udp"}, + }, + ], +} + # mac_ipv6 mac_ipv6_l2_src = { "sub_casename": "mac_ipv6_l2_src", @@ -3424,6 +4003,16 @@ mac_ipv4 = [ mac_ipv4_l3_dst, mac_ipv4_all, ] + +mac_ipv4_multicast = [ + mac_ipv4_l2_src_multicast, + mac_ipv4_l2_dst_multicast, + mac_ipv4_l2src_l2dst_multicast, + mac_ipv4_l3_src_multicast, + mac_ipv4_l3_dst_multicast, + mac_ipv4_all_multicast, +] + mac_ipv4_ipv4_chksum = [mac_ipv4_ipv4_chksum] mac_ipv4_udp = [ @@ -3480,6 +4069,15 @@ mac_ipv6 = [ mac_ipv6_all, ] +mac_ipv6_multicast = [ + mac_ipv6_l2_src_multicast, + mac_ipv6_l2_dst_multicast, + mac_ipv6_l2src_l2dst_multicast, + mac_ipv6_l3_src_multicast, + mac_ipv6_l3_dst_multicast, + mac_ipv6_all_multicast, +] + mac_ipv6_udp = [ mac_ipv6_udp_l2_src, mac_ipv6_udp_l2_dst, @@ -5785,6 +6383,31 @@ class AdvancedIavfRSSTest(TestCase): """ Run before each test case. """ + if self.running_case in ["test_mac_ipv4_multicast", "test_mac_ipv6_multicast"]: + self.flag = "vf-true-promisc-support" + self.dut.send_expect( + "ethtool --set-priv-flags %s %s on" + % (self.dut.ports_info[self.dut_ports[0]]["intf"], self.flag), + "# ", + ) + self.dut.send_expect( + "ethtool --show-priv-flags %s" + % (self.dut.ports_info[self.dut_ports[0]]["intf"]), + "# ", + ) + + out = self.dut.send_expect( + "ip link set %s vf 0 trust on" + % (self.dut.ports_info[self.dut_ports[0]]["intf"]), + "# ", + ) + if "RTNETLINK answers: Invalid argument" in out: + self.dut.send_expect( + "ip link set %s vf 0 trust on" + % (self.dut.ports_info[self.dut_ports[0]]["intf"]), + "# ", + ) + self.pkt = Packet() self.pmd_output = PmdOutput(self.dut) self.launch_testpmd() @@ -5836,12 +6459,16 @@ class AdvancedIavfRSSTest(TestCase): self.pmd_output.execute_cmd("port config all rss all") self.pmd_output.execute_cmd("set fwd rxonly") self.pmd_output.execute_cmd("set verbose 1") + self.pmd_output.execute_cmd("set allmulti all on") res = self.pmd_output.wait_link_status_up("all", timeout=15) self.verify(res is True, "there have port link is down") def test_mac_ipv4(self): self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4) + def test_mac_ipv4_multicast(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_multicast) + def test_mac_ipv4_udp(self): self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv4_udp) @@ -5854,6 +6481,9 @@ class AdvancedIavfRSSTest(TestCase): def test_mac_ipv6(self): self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6) + def test_mac_ipv6_multicast(self): + self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_multicast) + def test_mac_ipv6_udp(self): self.rssprocess.handle_rss_distribute_cases(cases_info=mac_ipv6_udp) @@ -6631,6 +7261,30 @@ class AdvancedIavfRSSTest(TestCase): self.dut.send_command("clear port stats all", timeout=1) self.pmd_output.execute_cmd("stop") self.pmd_output.execute_cmd("quit", "#") + if self.running_case in ["test_mac_ipv4_multicast", "test_mac_ipv6_multicast"]: + self.flag = "vf-true-promisc-support" + self.dut.send_expect( + "ethtool --set-priv-flags %s %s off" + % (self.dut.ports_info[self.dut_ports[0]]["intf"], self.flag), + "# ", + ) + self.dut.send_expect( + "ethtool --show-priv-flags %s" + % (self.dut.ports_info[self.dut_ports[0]]["intf"]), + "# ", + ) + + out = self.dut.send_expect( + "ip link set %s vf 0 trust off" + % (self.dut.ports_info[self.dut_ports[0]]["intf"]), + "# ", + ) + if "RTNETLINK answers: Invalid argument" in out: + self.dut.send_expect( + "ip link set %s vf 0 trust off" + % (self.dut.ports_info[self.dut_ports[0]]["intf"]), + "# ", + ) def tear_down_all(self): self.dut.kill_all() -- 2.27.0