From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EEFD7A0032; Wed, 13 Jul 2022 09:13:39 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AAE7F42B72; Wed, 13 Jul 2022 09:13:39 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id EF47742836 for ; Wed, 13 Jul 2022 09:13:37 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1657696418; x=1689232418; h=from:to:cc:subject:date:message-id; bh=LnRpfd0/HwVU8oJZHBU8mE/mUZL1vdmg+1OIqaIBamk=; b=OBM8VonKhMb3D1Ll/l7lH0z7c1LJ/tvP+7nMfhhK2aNcekelYGJmcR0y 3Q9z6shwJqh438KR0WSuMqouBQ9iYVzi7RjWV2YKTdvQy5RVQRwNDmKMT LlJvDxYmFub9UQ/V47dJSMjaoKzdSj/CD6qecoe1V0AGq2+nnp1Y1Wgmo yTeUMoRRv55YsKmDxEIxuZ9dwgum5KDDY2goIpWPxqwYy+QAFFZXGVqQy xQR7+B0ZPwqD1pGd3LRgwg/FUQEPvZT6wxbSiwusC0+yrKTsL7FB8qnb7 0kMzm4kS0pQIoTfJF9QoZRBQhP7c41vH12osBNAZBwgyXYwwq+JTyGCV5 g==; X-IronPort-AV: E=McAfee;i="6400,9594,10406"; a="285157818" X-IronPort-AV: E=Sophos;i="5.92,267,1650956400"; d="scan'208";a="285157818" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2022 00:13:29 -0700 X-IronPort-AV: E=Sophos;i="5.92,267,1650956400"; d="scan'208";a="592897166" Received: from unknown (HELO localhost.localdomain) ([10.239.252.94]) by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Jul 2022 00:13:27 -0700 From: Jiale Song To: dts@dpdk.org Cc: Jiale Song Subject: [dts] [PATCH V1] tests/ice_switch_filter: add 2 case Date: Wed, 13 Jul 2022 15:35:20 +0000 Message-Id: <20220713153520.30586-1-songx.jiale@intel.com> X-Mailer: git-send-email 2.17.1 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 case to test the switch rule of l2 mask and l3 mask. add case test_l2_multicast and test_l3_multicast. Signed-off-by: Jiale Song --- test_plans/ice_switch_filter_test_plan.rst | 237 ++++++++++++++++++++- tests/TestSuite_ice_switch_filter.py | 175 ++++++++++++++- 2 files changed, 408 insertions(+), 4 deletions(-) diff --git a/test_plans/ice_switch_filter_test_plan.rst b/test_plans/ice_switch_filter_test_plan.rst index 599174ba..fcb1902a 100644 --- a/test_plans/ice_switch_filter_test_plan.rst +++ b/test_plans/ice_switch_filter_test_plan.rst @@ -96,6 +96,10 @@ Pattern and input set +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+ | ethertype filter | ethertype filter_PPPOED | [Ether type] | [Ether type] | +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+ + | | L3 multicast | [Dest IPv4], [Source IPv6] | N/A | + | multicast +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | L2 multicast | [Dest MAC], [Source MAC] | N/A | + +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+ .. note:: @@ -5596,6 +5600,8 @@ Pattern Any Test Case Test case 1: check rule is programmed to switch ----------------------------------------------- +Test Steps +.......... 1. launch testpmd with --log-level="ice,7" create a rule:: testpmd> flow create 0 ingress pattern any / end actions drop / end @@ -5614,6 +5620,9 @@ Test case 1: check rule is programmed to switch Test case 2: drop any rule -------------------------- + +Test Steps +.......... 1. create a rule:: testpmd> flow create 0 ingress pattern any / end actions drop / end @@ -5656,6 +5665,9 @@ Test case 2: drop any rule Test case 3: any to queue rule ------------------------------ + +Test Steps +.......... 1. create a rule:: testpmd> flow create 0 ingress pattern any / end actions queue index 4 / end @@ -5677,8 +5689,10 @@ Test case 4: pattern any priority check --------------------------------------- subcase 1: non-pipeline mode -............................ +---------------------------- +Test Steps +.......... 1. create drop any rule with priority 0, to queue rule with priority 1:: testpmd> flow create 0 priority 0 ingress pattern any / end actions drop / end @@ -5703,8 +5717,10 @@ subcase 1: non-pipeline mode 5. change the rule priority, repeat step 2-4, check the result is same. subcase 2: non-pipeline mode with other rule -............................................ +-------------------------------------------- +Test Steps +.......... 1. create 2 rules:: testpmd> flow create 0 priority 1 ingress pattern any / end actions drop / end @@ -5732,8 +5748,10 @@ subcase 2: non-pipeline mode with other rule testpmd> flow destroy 0 rule 1 subcase 3: pipeline mode -........................ +------------------------ +Test Steps +.......... 1. launch testpmd with pipeline mode, create rule, check the rule can be created:: testpmd> flow create 0 priority 0 ingress pattern any / end actions drop / end @@ -5761,3 +5779,216 @@ subcase 3: pipeline mode 7. create rule, check the rule can not be created:: testpmd> flow create 0 priority 1 ingress pattern any / end actions queue index 4 / end + +Test case: L3 multicast +======================= + +subcase 1: ipv4 dst + mask +-------------------------- + +Test Steps +.......... +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst spec 224.0.0.0 dst mask 240.0.0.0 / end actions queue index 12 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv4 dst spec 224.0.0.0 dst mask 240.0.0.0 / end actions queue index 12 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp(Ether()/IP(dst="224.0.0.0")/Raw("x"*80), iface="enp27s0f0", count=1), + sendp(Ether()/IP(dst="224.0.0.255")/Raw("x"*80), iface="enp27s0f0", count=1), + sendp(Ether()/IP(src="192.168.0.1", dst="224.0.255.0")/Raw("x"*80), iface="enp27s0f0", count=1), + sendp(Ether()/IP(src="192.168.0.1", dst="224.255.0.0")/TCP()/Raw("x"*80), iface="enp27s0f0", count=1), + sendp(Ether()/IP(src="192.168.0.1", dst="239.0.0.0")/UDP()/Raw("x"*80), iface="enp27s0f0", count=1), + + check all the packets received by queue 12. + send mismatched packets:: + + sendp(Ether()/IP(src="192.168.0.1", dst="223.0.0.0")/TCP()/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether()/IP(src="192.168.0.1", dst="240.0.0.0")/UDP()/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether()/IP(src="192.168.0.1", dst="128.0.0.0")/Raw("x"*80)], iface="enp27s0f0", count=1) + + check all the packets can't received by queue 12. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check all the packets can't received by queue 12. + +subcase 2: ipv6 src + mask +-------------------------- + +Test Steps +.......... +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv6 src spec CDCD:910A:2222:5498:8475:1111:3900:2023 src mask fff0:0:0:0:0:0:0:0 / end actions queue index 12 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv6 src spec CDCD:910A:2222:5498:8475:1111:3900:2023 src mask fff0:0:0:0:0:0:0:0 / end actions queue index 12 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp(Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*480), iface="enp27s0f0", count=1), + sendp(Ether()/IPv6(src="CDCf:0:0:0:0:0:0:0")/("X"*480), iface="enp27s0f0", count=1), + sendp(Ether()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:1515", src="CDC0:0:0:0:0:0:0:ffff")/("X"*480), iface="enp27s0f0", count=1), + sendp(Ether()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:1515", src="CDC0:0:0:0:0:0:ffff:0")/("X"*480), iface="enp27s0f0", count=1), + sendp(Ether()/IPv6(src="CDC0:0:0:0:0:ffff:0:0")/UDP()/("X"*480), iface="enp27s0f0", count=1), + sendp(Ether()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:1515", src="CDC0:0:0:0:ffff:0:0:0")/UDP()/("X"*480), iface="enp27s0f0", count=1), + sendp(Ether()/IPv6(src="CDC0:0:ffff:0:0:0:0:0")/TCP()/("X"*480), iface="enp27s0f0", count=1), + sendp(Ether()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:1515", src="CDC0:ffff:0:0:0:0:0:0")/TCP()/("X"*480), iface="enp27s0f0", count=1), + + check all the packets received by queue 12. + send mismatched packets:: + + sendp(Ether()/IPv6(src="CDDD:910A:2222:5498:8475:1111:3900:2023")/("X"*480), iface="enp27s0f0", count=1) + sendp(Ether()/IPv6(src="CFCD:910A:2222:5498:8475:1111:3900:2023")/UDP()/("X"*480), iface="enp27s0f0", count=1) + sendp(Ether()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:1515", src="FDCD:0:0:0:0:0:0:ffff")/TCP()/("X"*480), iface="enp27s0f0", count=1) + + check all the packets can't receive by queue 12. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check all the packets can't receive by queue 12. + +Test case: L2 multicast +======================= + +subcase 1: mac dst + mask +-------------------------- + +Test Steps +.......... +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth dst spec 01:00:5e:00:00:00 dst mask ff:ff:ff:80:00:00 / end actions queue index 12 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth dst spec 01:00:5e:00:00:00 dst mask ff:ff:ff:80:00:00 / end actions queue index 12 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp(Ether(dst="01:00:5e:00:00:00")/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(dst="01:00:5e:7f:00:00")/IP()/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(dst="01:00:5e:00:ff:00")/IP()/TCP()/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(src="01:00:5e:00:00:01", dst="01:00:5e:00:00:ff")/IP()/UDP()/Raw("x"*80), iface="enp27s0f0", count=1) + + check all the packets received by queue 12. + send mismatched packets:: + + sendp(Ether(dst="01:00:5e:80:00:00")/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(dst="01:00:ff:00:00:00")/IP()/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(dst="01:ff:5e:00:ff:00")/IP()/TCP()/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(dst="ff:00:5e:00:00:ff")/IP()/UDP()/Raw("x"*80), iface="enp27s0f0", count=1) + + check all the packets can't receive by queue 12. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check all the packets can't receive by queue 12. + +subcase 2: mac src + mask +-------------------------- + +Test Steps +.......... +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth src spec 01:00:5e:00:00:00 src mask ff:ff:ff:80:00:00 / end actions queue index 12 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth src spec 01:00:5e:00:00:00 src mask ff:ff:ff:80:00:00 / end actions queue index 12 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp(Ether(src="01:00:5e:00:00:00")/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(src="01:00:5e:7f:00:00")/IP()/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(src="01:00:5e:00:ff:00")/IP()/TCP()/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(dst="01:00:5e:00:00:01", src="01:00:5e:00:00:ff")/IP()/UDP()/Raw("x"*80), iface="enp27s0f0", count=1) + + check all the packets received by queue 12. + send mismatched packets:: + + sendp(Ether(src="01:00:5e:80:00:00")/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(src="01:00:ff:00:00:00")/IP()/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(src="01:ff:5e:00:ff:00")/IP()/TCP()/Raw("x"*80), iface="enp27s0f0", count=1) + sendp(Ether(src="ff:00:5e:00:00:ff")/IP()/UDP()/Raw("x"*80), iface="enp27s0f0", count=1) + + check all the packets can't receive by queue 12. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check all the packets can't receive by queue 12. \ No newline at end of file diff --git a/tests/TestSuite_ice_switch_filter.py b/tests/TestSuite_ice_switch_filter.py index 76bd630f..85c7a805 100644 --- a/tests/TestSuite_ice_switch_filter.py +++ b/tests/TestSuite_ice_switch_filter.py @@ -4230,6 +4230,167 @@ drop_any_pkt_list = [ "Ether(dst='68:05:CA:BB:26:E0')/IP()/UDP(dport=2152)/GTP_U_Header(gtp_type=255, teid=0x123456)/GTPPDUSessionContainer(type=0, P=1, QFI=0x34)/IP(dst='192.168.0.1', src='192.168.0.2')/UDP(sport=22, dport=33)/('X'*480)", ] +IP_MASK = { + "matched": [ + 'Ether()/IP(dst="224.0.0.0")/Raw("x"*80)', + 'Ether()/IP(dst="224.0.0.255")/Raw("x"*80)', + 'Ether()/IP(src="192.168.0.1", dst="224.0.255.0")/Raw("x"*80)', + 'Ether()/IP(src="192.168.0.1", dst="224.255.0.0")/TCP()/Raw("x"*80)', + 'Ether()/IP(src="192.168.0.1", dst="239.0.0.0")/UDP()/Raw("x"*80)', + ], + "mismatched": [ + 'Ether()/IP(src="192.168.0.1", dst="223.0.0.0")/TCP()/Raw("x"*80)', + 'Ether()/IP(src="192.168.0.1", dst="240.0.0.0")/UDP()/Raw("x"*80)', + 'Ether()/IP(src="192.168.0.1", dst="128.0.0.0")/Raw("x"*80)', + ], +} + +tv_ip_dst_mask = { + "name": "tv_ip_dst_mask", + "rte_flow_pattern": "flow create 0 ingress pattern eth / ipv4 dst spec 224.0.0.0 dst mask 240.0.0.0 / end actions queue index 12 / end", + "configuration": {"is_non_pipeline": True, "is_need_rss_rule": False}, + "matched": { + "scapy_str": IP_MASK["matched"], + "check_func": { + "func": rfc.check_output_log_in_queue, + "param": {"expect_port": 0, "expect_queues": 12}, + }, + "expect_results": {"expect_pkts": 5}, + }, + "mismatched": { + "scapy_str": IP_MASK["mismatched"], + "check_func": { + "func": rfc.check_output_log_in_queue_mismatched, + "param": {"expect_port": 0, "expect_queues": 12}, + }, + "expect_results": {"expect_pkts": 3}, + }, +} + +IPv6_MASK = { + "matched": [ + 'Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*480)', + 'Ether()/IPv6(src="CDCf:0:0:0:0:0:0:0")/("X"*480)', + 'Ether()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:1515", src="CDC0:0:0:0:0:0:0:ffff")/("X"*480)', + 'Ether()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:1515", src="CDC0:0:0:0:0:0:ffff:0")/("X"*480)', + 'Ether()/IPv6(src="CDC0:0:0:0:0:ffff:0:0")/UDP()/("X"*480)', + 'Ether()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:1515", src="CDC0:0:0:0:ffff:0:0:0")/UDP()/("X"*480)', + 'Ether()/IPv6(src="CDC0:0:ffff:0:0:0:0:0")/TCP()/("X"*480)', + 'Ether()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:1515", src="CDC0:ffff:0:0:0:0:0:0")/TCP()/("X"*480)', + ], + "mismatched": [ + 'Ether()/IPv6(src="CDDD:910A:2222:5498:8475:1111:3900:2023")/("X"*480)', + 'Ether()/IPv6(src="CFCD:910A:2222:5498:8475:1111:3900:2023")/UDP()/("X"*480)', + 'Ether()/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:1515", src="FDCD:0:0:0:0:0:0:ffff")/TCP()/("X"*480)', + ], +} + +tv_ipv6_src_mask = { + "name": "tv_ipv6_src_mask", + "rte_flow_pattern": "flow create 0 ingress pattern eth / ipv6 src spec CDCD:910A:2222:5498:8475:1111:3900:2023 src mask fff0:0:0:0:0:0:0:0 / end actions queue index 12 / end", + "configuration": {"is_non_pipeline": True, "is_need_rss_rule": False}, + "matched": { + "scapy_str": IPv6_MASK["matched"], + "check_func": { + "func": rfc.check_output_log_in_queue, + "param": {"expect_port": 0, "expect_queues": 12}, + }, + "expect_results": {"expect_pkts": 8}, + }, + "mismatched": { + "scapy_str": IPv6_MASK["mismatched"], + "check_func": { + "func": rfc.check_output_log_in_queue_mismatched, + "param": {"expect_port": 0, "expect_queues": 12}, + }, + "expect_results": {"expect_pkts": 3}, + }, +} + +tvs_L3_multicast_non_pipeline_mode = [ + tv_ip_dst_mask, + tv_ipv6_src_mask, +] + +L2_DST_MASK = { + "matched": [ + 'Ether(dst="01:00:5e:00:00:00")/Raw("x"*80)', + 'Ether(dst="01:00:5e:7f:00:00")/IP()/Raw("x"*80)', + 'Ether(dst="01:00:5e:00:ff:00")/IP()/TCP()/Raw("x"*80)', + 'Ether(src="01:00:5e:00:00:01", dst="01:00:5e:00:00:ff")/IP()/UDP()/Raw("x"*80)', + ], + "mismatched": [ + 'Ether(dst="01:00:5e:80:00:00")/Raw("x"*80)', + 'Ether(dst="01:00:ff:00:00:00")/IP()/Raw("x"*80)', + 'Ether(dst="01:ff:5e:00:ff:00")/IP()/TCP()/Raw("x"*80)', + 'Ether(dst="ff:00:5e:00:00:ff")/IP()/UDP()/Raw("x"*80)', + ], +} + +tv_eth_dst_mask = { + "name": "tv_eth_dst_mask", + "rte_flow_pattern": "flow create 0 ingress pattern eth dst spec 01:00:5e:00:00:00 dst mask ff:ff:ff:80:00:00 / end actions queue index 12 / end", + "configuration": {"is_non_pipeline": True, "is_need_rss_rule": False}, + "matched": { + "scapy_str": L2_DST_MASK["matched"], + "check_func": { + "func": rfc.check_output_log_in_queue, + "param": {"expect_port": 0, "expect_queues": 12}, + }, + "expect_results": {"expect_pkts": 4}, + }, + "mismatched": { + "scapy_str": L2_DST_MASK["mismatched"], + "check_func": { + "func": rfc.check_output_log_in_queue_mismatched, + "param": {"expect_port": 0, "expect_queues": 12}, + }, + "expect_results": {"expect_pkts": 4}, + }, +} + +L2_SRC_MASK = { + "matched": [ + 'Ether(src="01:00:5e:00:00:00")/Raw("x"*80)', + 'Ether(src="01:00:5e:7f:00:00")/IP()/Raw("x"*80)', + 'Ether(src="01:00:5e:00:ff:00")/IP()/TCP()/Raw("x"*80)', + 'Ether(dst="01:00:5e:00:00:01", src="01:00:5e:00:00:ff")/IP()/UDP()/Raw("x"*80)', + ], + "mismatched": [ + 'Ether(src="01:00:5e:80:00:00")/Raw("x"*80)', + 'Ether(src="01:00:ff:00:00:00")/IP()/Raw("x"*80)', + 'Ether(src="01:ff:5e:00:ff:00")/IP()/TCP()/Raw("x"*80)', + 'Ether(src="ff:00:5e:00:00:ff")/IP()/UDP()/Raw("x"*80)', + ], +} + +tv_eth_src_mask = { + "name": "tv_eth_src_mask", + "rte_flow_pattern": "flow create 0 ingress pattern eth src spec 01:00:5e:00:00:00 src mask ff:ff:ff:80:00:00 / end actions queue index 12 / end", + "configuration": {"is_non_pipeline": True, "is_need_rss_rule": False}, + "matched": { + "scapy_str": L2_SRC_MASK["matched"], + "check_func": { + "func": rfc.check_output_log_in_queue, + "param": {"expect_port": 0, "expect_queues": 12}, + }, + "expect_results": {"expect_pkts": 4}, + }, + "mismatched": { + "scapy_str": L2_SRC_MASK["mismatched"], + "check_func": { + "func": rfc.check_output_log_in_queue_mismatched, + "param": {"expect_port": 0, "expect_queues": 12}, + }, + "expect_results": {"expect_pkts": 4}, + }, +} + +tvs_L2_multicast_non_pipeline_mode = [ + tv_eth_dst_mask, + tv_eth_src_mask, +] + test_results = OrderedDict() @@ -4273,7 +4434,7 @@ class ICESwitchFilterTest(TestCase): self.verify(len(self.dut_ports) >= 1, "Insufficient ports") localPort = self.tester.get_local_port(self.dut_ports[0]) self.__tx_iface = self.tester.get_interface(localPort) - self.dut.send_expect("ifconfig %s up" % self.__tx_iface, "# ") + self.tester.send_expect("ifconfig %s up" % self.__tx_iface, "# ") self.pkt = Packet() self.pmd = PmdOutput(self.dut) @@ -5397,6 +5558,18 @@ class ICESwitchFilterTest(TestCase): not all(rule6), "all rules should create failed, result {}".format(rule6) ) + def test_l3_multicast(self): + """ + Test case: IP multicast + """ + self._rte_flow_validate_pattern(tvs_L3_multicast_non_pipeline_mode) + + def test_l2_multicast(self): + """ + Test case: L2 multicast + """ + self._rte_flow_validate_pattern(tvs_L2_multicast_non_pipeline_mode) + def tear_down(self): """ Run after each test case. -- 2.17.1