From patchwork Wed Sep 21 03:10:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 116515 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 62976A034C; Wed, 21 Sep 2022 05:10:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 41CA740E0F; Wed, 21 Sep 2022 05:10:08 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 96B844014F for ; Wed, 21 Sep 2022 05:10:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663729806; x=1695265806; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=rw55h+J4WNoWbrjVg4HwrfGetinRGNCMeS2kuHtIpdc=; b=OusBi1ORI1qFW/orXts6TpVB4jxP5tX82KZh+wurAVcF2KZzya3/A8FN BxjuosLxT25MYMP5fFwY7ih6OQGl0Xa5WQX6dDKP2dcS00sIXpCgjhXOT XdpzfUc3w/U1YHiFeOgGjWF1sSUqOVCsOd8BixDkqOj7jYt5YE/XJDFj6 JYjp1xzF8xxv6Q+qmvBQFamWp3sYJHD4V3hqWOrDGFT8OiL9pw8UV3PUC FjcLLYS/Q1s4mwnrtL37KrGeQsg/ooFYEJeH83H95+94iZqX85ZA0aLbE 2nZ0iKQtnyfZSQ0MZ9cZqbXX7pRBN7wl0KrUq9fSI9VU5kxd3qiMSdBst A==; X-IronPort-AV: E=McAfee;i="6500,9779,10476"; a="299870377" X-IronPort-AV: E=Sophos;i="5.93,332,1654585200"; d="scan'208";a="299870377" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 20:10:05 -0700 X-IronPort-AV: E=Sophos;i="5.93,332,1654585200"; d="scan'208";a="761569166" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 20:10:03 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song , Peng Yuan Subject: [dts][PATCH V4 1/4] tests/ice_advanced_iavf_rss: add multicast new test case Date: Wed, 21 Sep 2022 11:10:18 +0800 Message-Id: <20220921031021.16547-1-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 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 ipv4/ipv6 multicast new case for dpdk22.07 new feature. Signed-off-by: Weiyuan Li --- Tested-by: Jiale Song < songx.jiale@intel.com> Acked-by: Peng Yuan v2: -modify the ice_iavf_fdir scipt tear_down method and destroy environment first. V3: -modify script and test plan disable promisc and trust mode. -add multicast detailes description reference. -modify script and test plan to add multicast address using mcast_addr. v4: -modify the description of multicast mac address. tests/TestSuite_ice_advanced_iavf_rss.py | 613 +++++++++++++++++++++++ 1 file changed, 613 insertions(+) diff --git a/tests/TestSuite_ice_advanced_iavf_rss.py b/tests/TestSuite_ice_advanced_iavf_rss.py index bed1d1df..8e8d7319 100644 --- a/tests/TestSuite_ice_advanced_iavf_rss.py +++ b/tests/TestSuite_ice_advanced_iavf_rss.py @@ -80,6 +80,18 @@ 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)' @@ -90,6 +102,296 @@ mac_ipv6_udp_toeplitz_basic_pkt = { # ], } +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_ipv6_tcp_toeplitz_basic_pkt = { "ipv6-tcp": [ '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")/TCP(sport=22,dport=23)/("X"*480)' @@ -1416,6 +1718,282 @@ mac_ipv4_tcp_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 ipv4_sctp mac_ipv4_sctp_l2_src = { "sub_casename": "mac_ipv4_sctp_l2_src", @@ -3424,6 +4002,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 +4068,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, @@ -5860,12 +6457,22 @@ 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") + if self.running_case in ["test_mac_ipv4_multicast", "test_mac_ipv6_multicast"]: + self.pmd_output.execute_cmd("set promisc all off") + self.pmd_output.execute_cmd("set allmulti all on") + # add multicast mac address to pmd + self.pmd_output.execute_cmd("mcast_addr add 0 11:22:33:44:55:66") + self.pmd_output.execute_cmd("mcast_addr add 0 11:22:33:44:55:67") + 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) @@ -5878,6 +6485,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) @@ -6655,6 +7265,9 @@ class AdvancedIavfRSSTest(TestCase): # destroy all flow rule on port 0 self.dut.send_command("flow flush 0", timeout=1) self.dut.send_command("clear port stats all", timeout=1) + if self.running_case in ["test_mac_ipv4_multicast", "test_mac_ipv6_multicast"]: + self.pmd_output.execute_cmd("mcast_addr remove 0 11:22:33:44:55:66") + self.pmd_output.execute_cmd("mcast_addr remove 0 11:22:33:44:55:67") self.pmd_output.execute_cmd("stop") self.pmd_output.execute_cmd("quit", "#") if self.running_case == "test_flow_rule_not_impact_rx_tx_chksum": From patchwork Wed Sep 21 03:10:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 116516 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 63602A04FD; Wed, 21 Sep 2022 05:10:09 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5D71240697; Wed, 21 Sep 2022 05:10:09 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id D366A4014F for ; Wed, 21 Sep 2022 05:10:07 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663729808; x=1695265808; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=TH6Z9Et4BusWh0hSNTzsSUNRzTiDYPqQtalR+BEZUHU=; b=VOrWwxftigcRsoEhOGpWI5YvdZE/fJCTYR3tR+MJ7hF7AHquUiJJrm/l +tgUN5QtOxoAlumqMPnCcIN3MUVTAaNmHHeuvAHCdDiMK3g6hKhL4hNLF 5njn9hhrsyGipKJPkTUV6nNAhq1EDzH+X6eu/6cWzX6EWXnvfFvIn1g1R FFkU6ZraV7a8DMU/DzY73F269ZRrltPlkiK2h3cgz0LKMiTMjbGYaBtA3 9IGj7vu1ml+H7IJuQDmCYQeSSCizcneQ2aua8/3D9+/5XClpfgRa2NSNl oQWhvSqpPhSEAXLYExFtULtviQnp+SVt74tM85ggJGOwVcZXsrpToy1/H g==; X-IronPort-AV: E=McAfee;i="6500,9779,10476"; a="299870387" X-IronPort-AV: E=Sophos;i="5.93,332,1654585200"; d="scan'208";a="299870387" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 20:10:07 -0700 X-IronPort-AV: E=Sophos;i="5.93,332,1654585200"; d="scan'208";a="761569189" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 20:10:05 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song , Peng Yuan Subject: [dts][PATCH V4 2/4] test_plans/ice_advanced_iavf: add multicast new test case Date: Wed, 21 Sep 2022 11:10:19 +0800 Message-Id: <20220921031021.16547-2-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220921031021.16547-1-weiyuanx.li@intel.com> References: <20220921031021.16547-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 ipv4/ipv6 multicast new case for dpdk22.07 new feature. Signed-off-by: Weiyuan Li --- Tested-by: Jiale Song < songx.jiale@intel.com> Acked-by: Peng Yuan v2: -modify the ice_iavf_fdir scipt tear_down method and destroy environment first. V3: -modify script and test plan disable promisc and trust mode. -add multicast detailes description reference. -modify script and test plan to add multicast address using mcast_addr. v4: -modify the description of multicast mac address. .../ice_advanced_iavf_rss_test_plan.rst | 450 ++++++++++++++++++ 1 file changed, 450 insertions(+) diff --git a/test_plans/ice_advanced_iavf_rss_test_plan.rst b/test_plans/ice_advanced_iavf_rss_test_plan.rst index 4213334b..e5abe8be 100644 --- a/test_plans/ice_advanced_iavf_rss_test_plan.rst +++ b/test_plans/ice_advanced_iavf_rss_test_plan.rst @@ -336,16 +336,23 @@ Default parameters [Src MAC]: 68:05:CA:BB:26:E0 [Dest MAC]: 00:11:22:33:44:55 + [Multicast Dest MAC]: 11:22:33:44:55:66 + + .. note:: + + The LSB of the first byte "11" is 1, it says it to be multicast MAC address. IPv4:: [Dest IP]: 192.168.0.1 [Source IP]: 192.168.0.2 + [Multicast Dest IPv4]: 224.0.0.1 IPv6:: [Source IPv6]: ABAB:910B:6666:3457:8295:3333:1800:2929 [Dest IPv6]: CDCD:910A:2222:5498:8475:1111:3900:2020 + [Multicast Dest IPv6]: ff01::2 UDP/TCP/SCTP:: @@ -896,6 +903,227 @@ Subcase: MAC_IPV4_SCTP_IPV4 Subcase: MAC_IPV4_SCTP_ALL -------------------------- +Test case: MAC_IPV4 multicast +============================= +Disable promisc mode in the testpmd:: + + testpmd> set promisc all off + +Enable all multicast mode in the testpmd:: + + testpmd> set allmulti all on + +configure multicast address:: + + testpmd> mcast_addr add 0 11:22:33:44:55:66 + +basic hit pattern packets are the same in this multicast test case: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV4_L2SRC +----------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv4 / end actions rss types eth l2-src-only end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV4_L2DST +----------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv4 / end actions rss types eth l2-dst-only end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV4_L2SRC_L2DST +----------------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv4 / end actions rss types eth end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV4_L3SRC +----------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-src-only end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV4_L3DST +----------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 l3-dst-only end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV4_ALL +--------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv4-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv4-tcp packets:: + + sendp([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)],iface="enp134s0f0") Test case: MAC_IPV6 =================== @@ -1096,6 +1324,228 @@ ipv6-udp packets:: sendp([Ether(dst="00:11:22:33:44:55", src="68:05:CA:BB:26:E1")/IPv6(src="ABAB:910B:6666:3457:8295:3333:1800:2929",dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=32,dport=33)/("X"*480)],iface="enp134s0f0") +Test case: MAC_IPV6 multicast +============================= +Disable promisc mode in the testpmd:: + + testpmd> set promisc all off + +Enable all multicast mode in the testpmd:: + + testpmd> set allmulti all on + +configure multicast address:: + + testpmd> mcast_addr add 0 11:22:33:44:55:66 + +basic hit pattern packets are the same in this test case, including unicast and multicast:: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV6_L2SRC +----------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv6 / end actions rss types eth l2-src-only end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV6_L2DST +----------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv6 / end actions rss types eth l2-dst-only end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV6_L2SRC_L2DST +----------------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv6 / end actions rss types eth end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV6_L3SRC +----------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-src-only end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV6_L3DST +----------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 l3-dst-only end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + +Subcase: MAC_IPV6_ALL +--------------------- +1. create rss rule:: + + flow create 0 ingress pattern eth / ipv6 / end actions rss types ipv6 end key_len 0 queues end / end + +2. hit pattern/defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") + sendp([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)],iface="enp134s0f0") + +3. hit pattern/not defined input set: +ipv6-nonfrag packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-icmp packets:: + + sendp([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)],iface="enp134s0f0") + +ipv6-udp packets:: + + sendp([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)],iface="enp134s0f0") Test case: MAC_IPV6_64BIT_PREFIX ================================= From patchwork Wed Sep 21 03:10:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 116517 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 82215A034C; Wed, 21 Sep 2022 05:10:11 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D6A9427F3; Wed, 21 Sep 2022 05:10:11 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id BB9AA4014F for ; Wed, 21 Sep 2022 05:10:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663729809; x=1695265809; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=T/6alGprSacpfuZtyfXo5nuZ3RwA8wkRfnxguOGgT9I=; b=XFfIKHUpMKod9WlL1oMYTWhkNEhsOUym7saqzADiHg0xInEWjw0E/6n4 8XfdfsA1VA8ikdXPEjqyHjbqCie6z7UjEpSnKm7TIkS/J1TkO61nVlUUm +Z0rSupKeDfzy0GHEPoB8LcoiSDbZhAgcJvmhvbYe7qbNU776rqHBeP8/ 2PDRXg+kqbc5zBBEqd3waHARnvFjgBtsJv/yXsTxScilIe9rUqKET5M7O 2sPnLOpdfQMbwg+Q2RuhmLUu1W0ozCKeJLf9ZxJDtdB4rjvUFQEzK1kk9 YgkrN3A9X0KKgQryVmiidip0tpbker29mNkwq82njwuzOLYvo0YQ729P6 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10476"; a="299870389" X-IronPort-AV: E=Sophos;i="5.93,332,1654585200"; d="scan'208";a="299870389" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 20:10:09 -0700 X-IronPort-AV: E=Sophos;i="5.93,332,1654585200"; d="scan'208";a="761569203" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 20:10:07 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song , Peng Yuan Subject: [dts][PATCH V4 3/4] tests/ice_iavf_fdir: add multicast new test case Date: Wed, 21 Sep 2022 11:10:20 +0800 Message-Id: <20220921031021.16547-3-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220921031021.16547-1-weiyuanx.li@intel.com> References: <20220921031021.16547-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 ipv4/ipv6 multicast new case for dpdk22.07 new feature. Signed-off-by: Weiyuan Li --- Tested-by: Jiale Song < songx.jiale@intel.com> Acked-by: Peng Yuan v2: -modify the ice_iavf_fdir scipt tear_down method and destroy environment first. V3: -modify script and test plan disable promisc and trust mode. -add multicast detailes description reference. -modify script and test plan to add multicast address using mcast_addr. v4: -modify the description of multicast mac address. tests/TestSuite_ice_iavf_fdir.py | 286 ++++++++++++++++++++++++++++++- 1 file changed, 285 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_ice_iavf_fdir.py b/tests/TestSuite_ice_iavf_fdir.py index 1cc71f67..d6ca832a 100644 --- a/tests/TestSuite_ice_iavf_fdir.py +++ b/tests/TestSuite_ice_iavf_fdir.py @@ -29,6 +29,20 @@ MAC_IPV4_PAY = { ], } +MAC_IPV4_PAY_MULTICAST = { + "match": [ + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=2, tos=4) / Raw("X" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=2, tos=4)/UDP(sport=22,dport=23)/Raw("x" * 80)', + ], + "mismatch": [ + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.22",dst="224.0.0.1", proto=255, ttl=2, tos=4) / Raw("X" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.2", proto=255, ttl=2, tos=4) / Raw("X" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=1, ttl=2, tos=4) / Raw("X" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=3, tos=4) / Raw("X" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=2, tos=9) / Raw("X" * 80)', + ], +} + MAC_IPV4_PAY_protocol = { "match": [ 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=1)/Raw("x" * 80)', @@ -46,6 +60,23 @@ MAC_IPV4_PAY_protocol = { ], } +MAC_IPV4_PAY_multicast_protocol = { + "match": [ + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=1)/Raw("x" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.19",dst="224.0.0.1", proto=1)/Raw("x" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", ttl=2, tos=4)/UDP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=17)/TCP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=17, ttl=2, tos=4)/Raw("x" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=17)/Raw("x" * 80)', + ], + "mismatch": [ + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.2", proto=1)/Raw("x" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=6)/UDP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1")/TCP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", ttl=2, tos=4)/SCTP()/Raw("x" * 80)', + ], +} + MAC_IPV4_UDP = { "match": [ 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", ttl=2, tos=4) /UDP(sport=22,dport=23)/Raw("x" * 80)' @@ -61,6 +92,20 @@ MAC_IPV4_UDP = { ], } +MAC_IPV6_PAY_MULTICAST = { + "match": [ + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=1, hlim=2)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=1, hlim=2)/UDP(sport=22,dport=23)/("X"*480)', + ], + "mismatch": [ + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::1", src="2001::2", nh=0, tc=1, hlim=2)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::1", nh=0, tc=1, hlim=2)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=2, tc=1, hlim=2)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=2, hlim=2)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=1, hlim=5)/("X"*480)', + ], +} + MAC_IPV4_TCP = { "match": [ 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", ttl=2, tos=4) /TCP(sport=22,dport=23)/Raw("x" * 80)' @@ -121,6 +166,22 @@ MAC_IPV6_PAY_protocol = { ], } +MAC_IPV6_PAY_multicast_protocol = { + "match": [ + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=17, tc=1, hlim=2)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", nh=17)/TCP(sport=22,dport=23)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/UDP(sport=22,dport=23)/TCP(sport=22,dport=23)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", nh=6)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/TCP(sport=22,dport=23)/("X"*480)', + ], + "mismatch": [ + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::3", nh=1)/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/SCTP()/("X"*480)', + 'Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", nh=1)/TCP(sport=22,dport=23)/("X"*480)', + ], +} + MAC_IPV6_UDP = { "match": [ 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2",tc=1, hlim=2)/UDP(sport=22,dport=23)/("X"*480)' @@ -136,6 +197,94 @@ MAC_IPV6_UDP = { ], } +tv_mac_ipv4_pay_queue_index_multicast = { + "name": "test_mac_ipv4_pay_queue_index_multicast", + "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / mark / end", + "scapy_str": MAC_IPV4_PAY_MULTICAST, + "check_param": {"port_id": 0, "queue": 1, "mark_id": 0}, +} + +tv_mac_ipv4_pay_rss_multicast = { + "name": "test_mac_ipv4_pay_rss_multicast", + "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions rss queues 2 3 end / mark / end", + "scapy_str": MAC_IPV4_PAY_MULTICAST, + "check_param": {"port_id": 0, "queue": [2, 3], "mark_id": 0}, +} + +tv_mac_ipv4_pay_passthru_multicast = { + "name": "test_mac_ipv4_pay_passthru_multicast", + "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions passthru / mark / end", + "scapy_str": MAC_IPV4_PAY_MULTICAST, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 0}, +} + +tv_mac_ipv4_pay_drop_multicast = { + "name": "test_mac_ipv4_pay_drop_multicast", + "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions drop / mark / end", + "scapy_str": MAC_IPV4_PAY_MULTICAST, + "check_param": {"port_id": 0, "drop": 1, "mark_id": 0}, +} + +tv_mac_ipv4_pay_mark_rss_multicast = { + "name": "test_mac_ipv4_pay_mark_rss_multicast", + "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions mark / rss / end", + "scapy_str": MAC_IPV4_PAY_MULTICAST, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 0}, +} + +tv_mac_ipv4_pay_mark_multicast = { + "name": "test_mac_ipv4_pay_mark_multicast", + "rule": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions mark / end", + "scapy_str": MAC_IPV4_PAY_MULTICAST, + "check_param": {"port_id": 0, "mark_id": 0}, +} + +tv_mac_ipv6_pay_queue_index_multicast = { + "name": "test_mac_ipv4_pay_queue_index_multicast", + "rule": "flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions queue index 15 / mark / end", + "scapy_str": MAC_IPV6_PAY_MULTICAST, + "check_param": {"port_id": 0, "queue": 15, "mark_id": 0}, +} + +tv_mac_ipv6_pay_rss_multicast = { + "name": "test_mac_ipv6_pay_rss_multicast", + "rule": "flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions rss queues 8 9 10 11 12 13 14 15 end / mark / end", + "scapy_str": MAC_IPV6_PAY_MULTICAST, + "check_param": { + "port_id": 0, + "queue": [8, 9, 10, 11, 12, 13, 14, 15], + "mark_id": 0, + }, +} + +tv_mac_ipv6_pay_passthru_multicast = { + "name": "test_mac_ipv6_pay_passthru_multicast", + "rule": "flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions passthru / mark / end", + "scapy_str": MAC_IPV6_PAY_MULTICAST, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 0}, +} + +tv_mac_ipv6_pay_drop_multicast = { + "name": "test_mac_ipv6_pay_drop_multicast", + "rule": "flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions drop / mark / end", + "scapy_str": MAC_IPV6_PAY_MULTICAST, + "check_param": {"port_id": 0, "drop": 1, "mark_id": 0}, +} + +tv_mac_ipv6_pay_mark_rss_multicast = { + "name": "test_mac_ipv6_pay_mark_rss_multicast", + "rule": "flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions mark / rss / end", + "scapy_str": MAC_IPV6_PAY_MULTICAST, + "check_param": {"port_id": 0, "passthru": 1, "mark_id": 0}, +} + +tv_mac_ipv6_pay_mark_multicast = { + "name": "test_mac_ipv6_pay_mark_multicast", + "rule": "flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions mark / end", + "scapy_str": MAC_IPV6_PAY_MULTICAST, + "check_param": {"port_id": 0, "mark_id": 0}, +} + MAC_IPV6_TCP = { "match": [ 'Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2",tc=1, hlim=2)/TCP(sport=22,dport=23)/("X"*480)' @@ -7223,6 +7372,15 @@ vectors_ipv4_pay = [ tv_mac_ipv4_pay_mark, ] +vectors_ipv4_pay_multicast = [ + tv_mac_ipv4_pay_queue_index_multicast, + tv_mac_ipv4_pay_rss_multicast, + tv_mac_ipv4_pay_passthru_multicast, + tv_mac_ipv4_pay_drop_multicast, + tv_mac_ipv4_pay_mark_rss_multicast, + tv_mac_ipv4_pay_mark_multicast, +] + vectors_ipv4_udp = [ tv_mac_ipv4_udp_drop, tv_mac_ipv4_udp_queue_group, @@ -7232,6 +7390,15 @@ vectors_ipv4_udp = [ tv_mac_ipv4_udp_mark, ] +vectors_ipv6_pay_multicast = [ + tv_mac_ipv6_pay_queue_index_multicast, + tv_mac_ipv6_pay_rss_multicast, + tv_mac_ipv6_pay_passthru_multicast, + tv_mac_ipv6_pay_drop_multicast, + tv_mac_ipv6_pay_mark_rss_multicast, + tv_mac_ipv6_pay_mark_multicast, +] + vectors_ipv4_tcp = [ tv_mac_ipv4_tcp_drop, tv_mac_ipv4_tcp_queue_group, @@ -8554,6 +8721,16 @@ class TestICEIAVFFdir(TestCase): self.pmd_output.execute_cmd( "port config 1 rss-hash-key ipv4 1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd" ) + if self.running_case in [ + "test_mac_ipv4_pay_multicast", + "test_mac_ipv4_multicast_protocol", + "test_mac_ipv6_pay_multicast", + "test_mac_ipv6_multicast_protocol", + ]: + self.pmd_output.execute_cmd("set promisc all off") + self.pmd_output.execute_cmd("set allmulti all on") + # add multicast mac address to pmd + self.pmd_output.execute_cmd("mcast_addr add 0 11:22:33:44:55:66") res = self.pmd_output.wait_link_status_up("all", timeout=15) self.verify(res is True, "there have port link is down") self.pmd_output.execute_cmd("start") @@ -8700,6 +8877,9 @@ class TestICEIAVFFdir(TestCase): def test_mac_ipv4_pay(self): self.rte_flow_process(vectors_ipv4_pay) + def test_mac_ipv4_pay_multicast(self): + self.rte_flow_process(vectors_ipv4_pay_multicast) + def test_mac_ipv4_udp(self): self.rte_flow_process(vectors_ipv4_udp) @@ -8712,6 +8892,9 @@ class TestICEIAVFFdir(TestCase): def test_mac_ipv6_pay(self): self.rte_flow_process(vectors_ipv6_pay) + def test_mac_ipv6_pay_multicast(self): + self.rte_flow_process(vectors_ipv6_pay_multicast) + def test_mac_ipv6_udp(self): self.rte_flow_process(vectors_ipv6_udp) @@ -8828,6 +9011,53 @@ class TestICEIAVFFdir(TestCase): out4, pkt_num=6, check_param={"port_id": 0, "passthru": 1}, stats=False ) + def test_mac_ipv4_multicast_protocol(self): + rules = [ + "flow create 0 ingress pattern eth / ipv4 dst is 224.0.0.1 proto is 1 / end actions queue index 1 / mark id 1 / end", + "flow create 0 ingress pattern eth / ipv4 dst is 224.0.0.1 proto is 17 / end actions passthru / mark id 3 / end", + ] + + # validate rules + self.validate_fdir_rule(rules, check_stats=True) + self.check_fdir_rule(port_id=0, stats=False) + + # create rules + rule_li = self.create_fdir_rule(rules, check_stats=True) + self.check_fdir_rule(port_id=0, rule_list=rule_li) + + # pkt1 and pkt2 in "match" match rule 0, pkt3-6 match rule 1. + out1 = self.send_pkts_getouput(MAC_IPV4_PAY_multicast_protocol["match"][0:2]) + rfc.check_iavf_fdir_mark( + out1, + pkt_num=2, + check_param={"port_id": 0, "mark_id": 1, "queue": 1}, + stats=True, + ) + + out2 = self.send_pkts_getouput(MAC_IPV4_PAY_multicast_protocol["match"][2:6]) + rfc.check_iavf_fdir_mark( + out2, + pkt_num=4, + check_param={"port_id": 0, "mark_id": 3, "passthru": 1}, + stats=True, + ) + + # send mismatched packets: + out3 = self.send_pkts_getouput(MAC_IPV4_PAY_multicast_protocol["mismatch"]) + rfc.check_iavf_fdir_mark( + out3, pkt_num=4, check_param={"port_id": 0, "passthru": 1}, stats=False + ) + + # destroy the rules and check there is no rule listed. + self.destroy_fdir_rule(rule_id=rule_li, port_id=0) + self.check_fdir_rule(port_id=0, stats=False) + + # send matched packet + out4 = self.send_pkts_getouput(MAC_IPV4_PAY_multicast_protocol["match"]) + rfc.check_iavf_fdir_mark( + out4, pkt_num=6, check_param={"port_id": 0, "passthru": 1}, stats=False + ) + def test_mac_ipv6_protocol(self): rules = [ "flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 17 / end actions rss queues 5 6 end / mark id 0 / end", @@ -8875,6 +9105,53 @@ class TestICEIAVFFdir(TestCase): out4, pkt_num=6, check_param={"port_id": 0, "passthru": 1}, stats=False ) + def test_mac_ipv6_multicast_protocol(self): + rules = [ + "flow create 0 ingress pattern eth / ipv6 dst is ff01::2 proto is 17 / end actions rss queues 5 6 end / mark id 0 / end", + "flow create 0 ingress pattern eth / ipv6 dst is ff01::2 proto is 6 / end actions mark id 2 / rss / end", + ] + + # validate rules + self.validate_fdir_rule(rules, check_stats=True) + self.check_fdir_rule(port_id=0, stats=False) + + # create rules + rule_li = self.create_fdir_rule(rules, check_stats=True) + self.check_fdir_rule(port_id=0, rule_list=rule_li) + + # pkt1-4 in "match" match rule 0, pkt5-6 match rule 1. + out1 = self.send_pkts_getouput(MAC_IPV6_PAY_multicast_protocol["match"][0:4]) + rfc.check_iavf_fdir_mark( + out1, + pkt_num=4, + check_param={"port_id": 0, "mark_id": 0, "queue": [5, 6]}, + stats=True, + ) + + out2 = self.send_pkts_getouput(MAC_IPV6_PAY_multicast_protocol["match"][4:6]) + rfc.check_iavf_fdir_mark( + out2, + pkt_num=2, + check_param={"port_id": 0, "mark_id": 2, "passthru": 1}, + stats=True, + ) + + # send mismatched packets: + out3 = self.send_pkts_getouput(MAC_IPV6_PAY_multicast_protocol["mismatch"]) + rfc.check_iavf_fdir_mark( + out3, pkt_num=3, check_param={"port_id": 0, "passthru": 1}, stats=False + ) + + # destroy the rules and check there is no rule listed. + self.destroy_fdir_rule(rule_id=rule_li, port_id=0) + self.check_fdir_rule(port_id=0, stats=False) + + # send matched packet + out4 = self.send_pkts_getouput(MAC_IPV6_PAY_multicast_protocol["match"]) + rfc.check_iavf_fdir_mark( + out4, pkt_num=6, check_param={"port_id": 0, "passthru": 1}, stats=False + ) + @skip_unsupported_pkg("os default") def test_mac_ipv4_gtpu_eh_without_teid(self): rules = [ @@ -11648,8 +11925,15 @@ class TestICEIAVFFdir(TestCase): def tear_down(self): # destroy all flow rule on port 0 - self.dut.kill_all() + if self.running_case in [ + "test_mac_ipv4_pay_multicast", + "test_mac_ipv4_multicast_protocol", + "test_mac_ipv6_pay_multicast", + "test_mac_ipv6_multicast_protocol", + ]: + self.pmd_output.execute_cmd("mcast_addr remove 0 11:22:33:44:55:66") self.destroy_env() + self.dut.kill_all() if getattr(self, "session_secondary", None): self.dut.close_session(self.session_secondary) if getattr(self, "session_third", None): From patchwork Wed Sep 21 03:10:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Weiyuan Li X-Patchwork-Id: 116518 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 9B64CA04FD; Wed, 21 Sep 2022 05:10:12 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 96E5C410D0; Wed, 21 Sep 2022 05:10:12 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 32B574014F for ; Wed, 21 Sep 2022 05:10:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663729811; x=1695265811; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=nkSk/B+fGMy08ga8hR0VvnoJ+p2MjjPfQnt9dpwSJVU=; b=lD1uNqIsE5HZ4xmw3Kyoc/Pe84L3vBYWqDyLbf6lN9uEU2TCBte3umTM rYHSFsLjIfu3sSAwI4Z8lPYNBdnt3THNyh4BUxYU1zrwUgixaNd1Gw4rt pD3wjPZbn4OTC8jyvC4zb4ee3XO0nqrpKRfcUUN4zsBjh5RF7yiX1EDBB /ViN7mHLITiuc6cgtJQ17XZwhf0PK442mLoimfwU1ySzNa/frxtSsrvlB tJSbALxLRuZS29GzuAQR/R/hR6GdCQqjY9TUZcPHV9yNC+RiwQaeXT0q1 VByQj0gyVajQeEpY4GgIcBb/UOxz5RyBVExTtf+5eLdoScikeHJUthdXK w==; X-IronPort-AV: E=McAfee;i="6500,9779,10476"; a="299870415" X-IronPort-AV: E=Sophos;i="5.93,332,1654585200"; d="scan'208";a="299870415" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 20:10:10 -0700 X-IronPort-AV: E=Sophos;i="5.93,332,1654585200"; d="scan'208";a="761569225" Received: from unknown (HELO localhost.localdomain) ([10.239.252.248]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Sep 2022 20:10:09 -0700 From: Weiyuan Li To: dts@dpdk.org Cc: Weiyuan Li , Jiale Song , Peng Yuan Subject: [dts][PATCH V4 4/4] test_plans/ice_iavf_fdir: add multicast new test case Date: Wed, 21 Sep 2022 11:10:21 +0800 Message-Id: <20220921031021.16547-4-weiyuanx.li@intel.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20220921031021.16547-1-weiyuanx.li@intel.com> References: <20220921031021.16547-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 ipv4/ipv6 multicast new case for dpdk22.07 new feature. Signed-off-by: Weiyuan Li --- Tested-by: Jiale Song < songx.jiale@intel.com> Acked-by: Peng Yuan v2: -modify the ice_iavf_fdir scipt tear_down method and destroy environment first. V3: -modify script and test plan disable promisc and trust mode. -add multicast detailes description reference. -modify script and test plan to add multicast address using mcast_addr. v4: -modify the description of multicast mac address. test_plans/ice_iavf_fdir_test_plan.rst | 321 +++++++++++++++++++++++++ 1 file changed, 321 insertions(+) diff --git a/test_plans/ice_iavf_fdir_test_plan.rst b/test_plans/ice_iavf_fdir_test_plan.rst index 9f6b5aaf..54779ad2 100644 --- a/test_plans/ice_iavf_fdir_test_plan.rst +++ b/test_plans/ice_iavf_fdir_test_plan.rst @@ -236,6 +236,11 @@ Default parameters VF00 MAC:: [Dest MAC]: 00:11:22:33:44:55 + [Multicast Dest MAC]: 11:22:33:44:55:66 + + .. note:: + + The LSB of the first byte "11" is 1, it says it to be multicast MAC address. VF01 MAC:: @@ -253,6 +258,7 @@ Default parameters [Source IP]: 192.168.0.20 [Dest IP]: 192.168.0.21 + [Multicast Dest IPv4]: 224.0.0.1 [IP protocol]: 255 [TTL]: 2 [DSCP]: 4 @@ -261,6 +267,7 @@ Default parameters [Source IPv6]: 2001::2 [Dest IPv6]: CDCD:910A:2222:5498:8475:1111:3900:2020 + [Multicast Dest IPv6]: ff01::2 [IP protocol]: 0 [TTL]: 2 [TC]: 1 @@ -303,6 +310,21 @@ Send packets sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=255, ttl=3, tos=4) / Raw('x' * 80)],iface="enp134s0f1") sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.20",dst="192.168.0.21", proto=255, ttl=2, tos=9) / Raw('x' * 80)],iface="enp134s0f1") +* MAC_IPV4_PAY multicast + + matched packets:: + + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=2, tos=4)/UDP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + + mismatched packets:: + + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.22",dst="224.0.0.1", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.2", proto=255, ttl=2, tos=4) / Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=1, ttl=2, tos=4) / Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=3, tos=4) / Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=255, ttl=2, tos=9) / Raw('x' * 80)],iface="enp134s0f1") + * MAC_IPV4_UDP matched packets:: @@ -366,6 +388,21 @@ Send packets sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", nh=0, tc=2, hlim=2)/("X"*480)], iface="enp134s0f1") sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", src="2001::2", nh=0, tc=1, hlim=5)/("X"*480)], iface="enp134s0f1") +* MAC_IPV6_PAY multicast + + matched packets:: + + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=1, hlim=2)/("X"*480)], iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=1, hlim=2)/UDP(sport=22,dport=23)/("X"*480)], iface="enp134s0f1") + + mismatched packets:: + + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::1", src="2001::2", nh=0, tc=1, hlim=2)/("X"*480)], iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::1", nh=0, tc=1, hlim=2)/("X"*480)], iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=2, tc=1, hlim=2)/("X"*480)], iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=2, hlim=2)/("X"*480)], iface="enp134s0f1") + sendp([Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=0, tc=1, hlim=5)/("X"*480)], iface="enp134s0f1") + * MAC_IPV6_UDP matched packets:: @@ -7268,3 +7305,287 @@ Subcase 6: MAC_IPV6_GRE_IPV6_UDP mark each subcase is the same as the subcase of Test case: MAC_IPV6_GRE_IPV6_TCP pattern, just only pattern is different, replace "tcp" with "udp" in all the subcases + +Test case: MAC_IPV4_PAY pattern multicast +========================================= +Disable promisc mode in the testpmd:: + + testpmd> set promisc all off + +Enable all multicast mode in the testpmd:: + + testpmd> set allmulti all on + +configure multicast address:: + + testpmd> mcast_addr add 0 11:22:33:44:55:66 + +Subcase 1: MAC_IPV4_PAY queue index +----------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions queue index 1 / mark / end + +2. send multicast matched packets, check the packets are distributed to queue 1 without FDIR matched ID. + send multicast mismatched packets, check the packets are not distributed to queue 1 without FDIR matched ID. + +3. verify rules can be listed and destroyed:: + + testpmd> flow list 0 + + check the rule listed. + destroy the rule:: + + testpmd> flow destroy 0 rule 0 + +4. verify matched packets are not distributed to queue 1 without FDIR matched ID. + check there is no rule listed. + +Subcase 2: MAC_IPV4_PAY rss queues +---------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions rss queues 2 3 end / mark / end + +2. send multicast matched packets, check the packets are distributed to queue 2 or 3 without without FDIR matched ID. + send multicast mismatched packets, check the packets are not distributed to queue 2 or 3 without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are not distributed to queue 2 or 3 without FDIR matched ID. + check there is no rule listed. + +Subcase 3: MAC_IPV4_PAY passthru +-------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions passthru / mark / end + +2. send multicast matched packets, check the packets are distributed by RSS without FDIR matched ID. + send multicast mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID=0x0. + check there is no rule listed. + +Subcase 4: MAC_IPV4_PAY drop +---------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions drop / mark / end + +2. send multicast matched packets, check the packets are dropped + send multicast mismatched packets, check the packets are not dropped. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are not dropped. + check there is no rule listed. + +Subcase 5: MAC_IPV4_PAY mark+rss +-------------------------------- +Note: This combined action is mark with RSS which is without queues specified. + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions mark / rss / end + +2. send multicast matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0 + send multicast mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID. + check there is no rule listed. + +Subcase 6: MAC_IPV4_PAY mark +---------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 224.0.0.1 proto is 255 ttl is 2 tos is 4 / end actions mark / end + +2. send multicast matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0. + send multicast mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID. + check there is no rule listed. + +Subcase 7: MAC_IPV4_PAY protocal +-------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv4 dst is 224.0.0.1 proto is 1 / end actions queue index 1 / mark id 1 / end + flow create 0 ingress pattern eth / ipv4 dst is 224.0.0.1 proto is 17 / end actions passthru / mark id 3 / end + +2. send matched packets:: + + pkt1 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=1)/Raw('x' * 80) + pkt2 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.19",dst="224.0.0.1", proto=1)/Raw('x' * 80) + pkt3 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", ttl=2, tos=4)/UDP(sport=22,dport=23)/Raw('x' * 80) + pkt4 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=17)/UDP(sport=22,dport=23)/Raw('x' * 80) + pkt5 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=17, ttl=2, tos=4)/Raw('x' * 80) + pkt6 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", frag=1, proto=17, ttl=2, tos=4)/Raw('x' * 80) + + check the pkt1 and pkt2 are redirected to queue 1 with FDIR matched ID=0x1. + check the pkt3-pkt6 are distributed by RSS with FDIR matched ID=0x3. + send mismatched packets:: + + pkt7 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.2", proto=1)/Raw('x' * 80) + pkt8 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", proto=6)/UDP(sport=22,dport=23)/Raw('x' * 80) + pkt9 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1")/TCP(sport=22,dport=23)/Raw('x' * 80) + pkt10 = Ether(dst="11:22:33:44:55:66")/IP(src="192.168.0.20",dst="224.0.0.1", ttl=2, tos=4)/TCP(sport=22,dport=23)/Raw('x' * 80) + + check the packets received have not FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets have not FDIR matched ID. + check there is no rule listed. + +Test case: MAC_IPV6_PAY pattern multicast +========================================= +Disable promisc mode in the testpmd:: + + testpmd> set promisc all off + +Enable all multicast mode in the testpmd:: + + testpmd> set allmulti all on + +configure multicast address:: + + testpmd> mcast_addr add 0 11:22:33:44:55:66 + +Subcase 1: MAC_IPV6_PAY queue index +----------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions queue index 15 / mark / end + +2. send multicast matched packets, check the packets is distributed to queue 15 with FDIR matched ID=0x0. + send multicast mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. verify rules can be listed and destroyed:: + + testpmd> flow list 0 + + check the rule listed. + destroy the rule:: + + testpmd> flow destroy 0 rule 0 + +4. verify matched packet is distributed by RSS without FDIR matched ID. + check there is no rule listed. + +Subcase 2: MAC_IPV6_PAY rss queues +---------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions rss queues 8 9 10 11 12 13 14 15 end / mark / end + +2. send multicast matched packets, check the packets is distributed to queue 8-15 with FDIR matched ID=0x0. + send multicast mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packet is distributed by RSS without FDIR matched ID. + check there is no rule listed. + +Subcase 3: MAC_IPV6_PAY passthru +-------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions passthru / mark / end + +2. send multicast matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0. + send multicast mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are destributed to the same queue without FDIR matched ID . + check there is no rule listed. + +Subcase 4: MAC_IPV6_PAY drop +---------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions drop / mark / end + +2. send multicast matched packets, check the packets are dropped. + send multicast mismatched packets, check the packets are not dropped. + +3. repeat step 3 of subcase 1. + +4. verify matched packet is dropped. + check there is no rule listed. + +Subcase 5: MAC_IPV6_PAY mark+rss +-------------------------------- +Note: This combined action is mark with RSS which is without queues specified. + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions mark / rss / end + +2. send multicast matched packets, check the packets are distributed by RSS with FDIR matched ID=0x0 + send multicast mismatched packets, check the packets are distributed by RSS without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are distributed to the same queue without FDIR matched ID. + check there is no rule listed. + +Subcase 6: MAC_IPV6_PAY mark +---------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 src is 2001::2 proto is 0 hop is 2 tc is 1 / end actions mark / end + +2. repeat the steps of passthru with mark part in subcase 3, + get the same result. + +Subcase 7: MAC_IPV6_PAY protocal +-------------------------------- + +1. create filter rules:: + + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 proto is 17 / end actions rss queues 5 6 end / mark id 0 / end + flow create 0 ingress pattern eth / ipv6 dst is ff01::2 proto is 6 / end actions mark id 2 / rss / end + +2. send matched packets:: + + pkt1 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", src="2001::2", nh=17, tc=1, hlim=2)/("X"*480) + pkt2 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/UDP(sport=22,dport=23)/("X"*480) + pkt3 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", nh=17)/TCP(sport=22,dport=23)/("X"*480) + pkt4 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/UDP(sport=22,dport=23)/TCP(sport=22,dport=23)/("X"*480) + pkt5 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", nh=6)/("X"*480) + pkt6 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/TCP(sport=22,dport=23)/("X"*480) + + check pkt1-pkt4 are redirected to queue 5 or queue 6 with FDIR matched ID=0x0. + check pkt5 and pkt6 are distributed by RSS with FDIR matched ID=0x2. + send mismatched packets:: + + pkt7 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::3", nh=1)/("X"*480) + pkt8 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2")/SCTP()/("X"*480) + pkt9 = Ether(dst="11:22:33:44:55:66")/IPv6(dst="ff01::2", nh=1)/TCP(sport=22,dport=23)/("X"*480) + + check the packets are received without FDIR matched ID. + +3. repeat step 3 of subcase 1. + +4. verify matched packets are received without FDIR matched ID. + check there is no rule listed.