From patchwork Wed Jul 27 02:20:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 114248 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 0583CA00C4; Wed, 27 Jul 2022 04:21:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EDDF640F19; Wed, 27 Jul 2022 04:21:47 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 4610F40A89 for ; Wed, 27 Jul 2022 04:21:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658888504; x=1690424504; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=pH105uXWxbNn2Q55xEkl4jtFR0OlOUKI81UsjoBy5zY=; b=MXsttYJldCOv/j5G0KAVFE9/IypevTXlzgOeFJ0+68yTSgcM8h+HD2bb 2ykrGrWRy95ugN8nqNE5ZjNrVfXiJqqsdxWkcDXbJ/El2pGXQdybwok9H GCv790/j7hG5XehXH4rruaJsnnXob9xaIr4R4Y/7Iuu82/L7dHpIGYP/a jPKkhIBbaMNxKj9S8PpepMB2q8jdfIHsYWefDk734Ks5P2v8pjty4x98R urQLrUfbZ1tWSndDAJsK8g8b4XtvIJolwOR4bD7s7OSuzUg8nvyefJ1WJ UOw+GmLQhsIBCVb42fljuObi9xkS2MX1sTpxKvrB2E3rL3lEz5fA7GjYt A==; X-IronPort-AV: E=McAfee;i="6400,9594,10420"; a="289317530" X-IronPort-AV: E=Sophos;i="5.93,194,1654585200"; d="scan'208";a="289317530" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2022 19:21:26 -0700 X-IronPort-AV: E=Sophos;i="5.93,194,1654585200"; d="scan'208";a="628186405" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Jul 2022 19:21:24 -0700 From: Weiyuan Li To: dts@dpdk.org, yuan.peng@intel.com Cc: Weiyuan Li Subject: [dts][PATCH V1 2/4] tests/ice_advanced_iavf_rss: add new test suite Date: Wed, 27 Jul 2022 10:20:51 +0800 Message-Id: <20220727022053.11076-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220727022053.11076-1-weiyuanx.li@intel.com> References: <20220727022053.11076-1-weiyuanx.li@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 DPDK22.07 new feature test suite. Signed-off-by: Weiyuan Li --- 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()