Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/113932/?format=api
http://patches.dpdk.org/api/patches/113932/?format=api", "web_url": "http://patches.dpdk.org/project/dts/patch/20220713153520.30586-1-songx.jiale@intel.com/", "project": { "id": 3, "url": "http://patches.dpdk.org/api/projects/3/?format=api", "name": "DTS", "link_name": "dts", "list_id": "dts.dpdk.org", "list_email": "dts@dpdk.org", "web_url": "", "scm_url": "git://dpdk.org/tools/dts", "webscm_url": "http://git.dpdk.org/tools/dts/", "list_archive_url": "https://inbox.dpdk.org/dts", "list_archive_url_format": "https://inbox.dpdk.org/dts/{}", "commit_url_format": "" }, "msgid": "<20220713153520.30586-1-songx.jiale@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20220713153520.30586-1-songx.jiale@intel.com", "date": "2022-07-13T15:35:20", "name": "[V1] tests/ice_switch_filter: add 2 case", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "4266a74615cb4c785329cf31a3bf4d1058b186cb", "submitter": { "id": 2352, "url": "http://patches.dpdk.org/api/people/2352/?format=api", "name": "Jiale, SongX", "email": "songx.jiale@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dts/patch/20220713153520.30586-1-songx.jiale@intel.com/mbox/", "series": [ { "id": 23977, "url": "http://patches.dpdk.org/api/series/23977/?format=api", "web_url": "http://patches.dpdk.org/project/dts/list/?series=23977", "date": "2022-07-13T15:35:20", "name": "[V1] tests/ice_switch_filter: add 2 case", "version": 1, "mbox": "http://patches.dpdk.org/series/23977/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/113932/comments/", "check": "fail", "checks": "http://patches.dpdk.org/api/patches/113932/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dts-bounces@dpdk.org>", "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])\n\tby inbox.dpdk.org (Postfix) with ESMTP id EEFD7A0032;\n\tWed, 13 Jul 2022 09:13:39 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id AAE7F42B72;\n\tWed, 13 Jul 2022 09:13:39 +0200 (CEST)", "from mga14.intel.com (mga14.intel.com [192.55.52.115])\n by mails.dpdk.org (Postfix) with ESMTP id EF47742836\n for <dts@dpdk.org>; Wed, 13 Jul 2022 09:13:37 +0200 (CEST)", "from orsmga007.jf.intel.com ([10.7.209.58])\n by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Jul 2022 00:13:29 -0700", "from unknown (HELO localhost.localdomain) ([10.239.252.94])\n by orsmga007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 13 Jul 2022 00:13:27 -0700" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1657696418; x=1689232418;\n h=from:to:cc:subject:date:message-id;\n bh=LnRpfd0/HwVU8oJZHBU8mE/mUZL1vdmg+1OIqaIBamk=;\n b=OBM8VonKhMb3D1Ll/l7lH0z7c1LJ/tvP+7nMfhhK2aNcekelYGJmcR0y\n 3Q9z6shwJqh438KR0WSuMqouBQ9iYVzi7RjWV2YKTdvQy5RVQRwNDmKMT\n LlJvDxYmFub9UQ/V47dJSMjaoKzdSj/CD6qecoe1V0AGq2+nnp1Y1Wgmo\n yTeUMoRRv55YsKmDxEIxuZ9dwgum5KDDY2goIpWPxqwYy+QAFFZXGVqQy\n xQR7+B0ZPwqD1pGd3LRgwg/FUQEPvZT6wxbSiwusC0+yrKTsL7FB8qnb7\n 0kMzm4kS0pQIoTfJF9QoZRBQhP7c41vH12osBNAZBwgyXYwwq+JTyGCV5 g==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10406\"; a=\"285157818\"", "E=Sophos;i=\"5.92,267,1650956400\"; d=\"scan'208\";a=\"285157818\"", "E=Sophos;i=\"5.92,267,1650956400\"; d=\"scan'208\";a=\"592897166\"" ], "From": "Jiale Song <songx.jiale@intel.com>", "To": "dts@dpdk.org", "Cc": "Jiale Song <songx.jiale@intel.com>", "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 <dts.dpdk.org>", "List-Unsubscribe": "<https://mails.dpdk.org/options/dts>,\n <mailto:dts-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://mails.dpdk.org/archives/dts/>", "List-Post": "<mailto:dts@dpdk.org>", "List-Help": "<mailto:dts-request@dpdk.org?subject=help>", "List-Subscribe": "<https://mails.dpdk.org/listinfo/dts>,\n <mailto:dts-request@dpdk.org?subject=subscribe>", "Errors-To": "dts-bounces@dpdk.org" }, "content": "add case to test the switch rule of l2 mask and l3 mask.\nadd case test_l2_multicast and test_l3_multicast.\n\nSigned-off-by: Jiale Song <songx.jiale@intel.com>\n---\n test_plans/ice_switch_filter_test_plan.rst | 237 ++++++++++++++++++++-\n tests/TestSuite_ice_switch_filter.py | 175 ++++++++++++++-\n 2 files changed, 408 insertions(+), 4 deletions(-)", "diff": "diff --git a/test_plans/ice_switch_filter_test_plan.rst b/test_plans/ice_switch_filter_test_plan.rst\nindex 599174ba..fcb1902a 100644\n--- a/test_plans/ice_switch_filter_test_plan.rst\n+++ b/test_plans/ice_switch_filter_test_plan.rst\n@@ -96,6 +96,10 @@ Pattern and input set\n +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+\n | ethertype filter | ethertype filter_PPPOED | [Ether type] | [Ether type] |\n +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+\n+ | | L3 multicast | [Dest IPv4], [Source IPv6] | N/A |\n+ | multicast +-------------------------------+-------------------------------------------+-------------------------------------------+\n+ | | L2 multicast | [Dest MAC], [Source MAC] | N/A |\n+ +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+\n \n .. note::\n \n@@ -5596,6 +5600,8 @@ Pattern Any Test Case\n Test case 1: check rule is programmed to switch\n -----------------------------------------------\n \n+Test Steps\n+..........\n 1. launch testpmd with --log-level=\"ice,7\" create a rule::\n \n testpmd> flow create 0 ingress pattern any / end actions drop / end\n@@ -5614,6 +5620,9 @@ Test case 1: check rule is programmed to switch\n \n Test case 2: drop any rule\n --------------------------\n+\n+Test Steps\n+..........\n 1. create a rule::\n \n testpmd> flow create 0 ingress pattern any / end actions drop / end\n@@ -5656,6 +5665,9 @@ Test case 2: drop any rule\n \n Test case 3: any to queue rule\n ------------------------------\n+\n+Test Steps\n+..........\n 1. create a rule::\n \n testpmd> flow create 0 ingress pattern any / end actions queue index 4 / end\n@@ -5677,8 +5689,10 @@ Test case 4: pattern any priority check\n ---------------------------------------\n \n subcase 1: non-pipeline mode\n-............................\n+----------------------------\n \n+Test Steps\n+..........\n 1. create drop any rule with priority 0, to queue rule with priority 1::\n \n testpmd> flow create 0 priority 0 ingress pattern any / end actions drop / end\n@@ -5703,8 +5717,10 @@ subcase 1: non-pipeline mode\n 5. change the rule priority, repeat step 2-4, check the result is same.\n \n subcase 2: non-pipeline mode with other rule\n-............................................\n+--------------------------------------------\n \n+Test Steps\n+..........\n 1. create 2 rules::\n \n testpmd> flow create 0 priority 1 ingress pattern any / end actions drop / end\n@@ -5732,8 +5748,10 @@ subcase 2: non-pipeline mode with other rule\n testpmd> flow destroy 0 rule 1\n \n subcase 3: pipeline mode\n-........................\n+------------------------\n \n+Test Steps\n+..........\n 1. launch testpmd with pipeline mode, create rule, check the rule can be created::\n \n testpmd> flow create 0 priority 0 ingress pattern any / end actions drop / end\n@@ -5761,3 +5779,216 @@ subcase 3: pipeline mode\n 7. create rule, check the rule can not be created::\n \n testpmd> flow create 0 priority 1 ingress pattern any / end actions queue index 4 / end\n+\n+Test case: L3 multicast\n+=======================\n+\n+subcase 1: ipv4 dst + mask\n+--------------------------\n+\n+Test Steps\n+..........\n+1. validate a rule::\n+\n+ 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\n+\n+ get the message::\n+\n+ Flow rule validated\n+\n+ check the flow list::\n+\n+ testpmd> flow list 0\n+\n+ check the rule not exists in the list.\n+\n+2. create a rule::\n+\n+ 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\n+ testpmd> flow list 0\n+\n+ check the rule exists in the list.\n+\n+3. send matched packets::\n+\n+ sendp(Ether()/IP(dst=\"224.0.0.0\")/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1),\n+ sendp(Ether()/IP(dst=\"224.0.0.255\")/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1),\n+ sendp(Ether()/IP(src=\"192.168.0.1\", dst=\"224.0.255.0\")/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1),\n+ sendp(Ether()/IP(src=\"192.168.0.1\", dst=\"224.255.0.0\")/TCP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1),\n+ sendp(Ether()/IP(src=\"192.168.0.1\", dst=\"239.0.0.0\")/UDP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1),\n+\n+ check all the packets received by queue 12.\n+ send mismatched packets::\n+\n+ sendp(Ether()/IP(src=\"192.168.0.1\", dst=\"223.0.0.0\")/TCP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether()/IP(src=\"192.168.0.1\", dst=\"240.0.0.0\")/UDP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether()/IP(src=\"192.168.0.1\", dst=\"128.0.0.0\")/Raw(\"x\"*80)], iface=\"enp27s0f0\", count=1)\n+\n+ check all the packets can't received by queue 12.\n+\n+4. verify rules can be destroyed::\n+\n+ testpmd> flow destroy 0 rule 0\n+ testpmd> flow list 0\n+\n+ check the rule not exists in the list.\n+ send matched packets, check all the packets can't received by queue 12.\n+\n+subcase 2: ipv6 src + mask\n+--------------------------\n+\n+Test Steps\n+..........\n+1. validate a rule::\n+\n+ 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\n+\n+ get the message::\n+\n+ Flow rule validated\n+\n+ check the flow list::\n+\n+ testpmd> flow list 0\n+\n+ check the rule not exists in the list.\n+\n+2. create a rule::\n+\n+ 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\n+ testpmd> flow list 0\n+\n+ check the rule exists in the list.\n+\n+3. send matched packets::\n+\n+ sendp(Ether()/IPv6(src=\"CDCD:910A:2222:5498:8475:1111:3900:2023\")/(\"X\"*480), iface=\"enp27s0f0\", count=1),\n+ sendp(Ether()/IPv6(src=\"CDCf:0:0:0:0:0:0:0\")/(\"X\"*480), iface=\"enp27s0f0\", count=1),\n+ 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),\n+ 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),\n+ sendp(Ether()/IPv6(src=\"CDC0:0:0:0:0:ffff:0:0\")/UDP()/(\"X\"*480), iface=\"enp27s0f0\", count=1),\n+ 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),\n+ sendp(Ether()/IPv6(src=\"CDC0:0:ffff:0:0:0:0:0\")/TCP()/(\"X\"*480), iface=\"enp27s0f0\", count=1),\n+ 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),\n+\n+ check all the packets received by queue 12.\n+ send mismatched packets::\n+\n+ sendp(Ether()/IPv6(src=\"CDDD:910A:2222:5498:8475:1111:3900:2023\")/(\"X\"*480), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether()/IPv6(src=\"CFCD:910A:2222:5498:8475:1111:3900:2023\")/UDP()/(\"X\"*480), iface=\"enp27s0f0\", count=1)\n+ 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)\n+\n+ check all the packets can't receive by queue 12.\n+\n+4. verify rules can be destroyed::\n+\n+ testpmd> flow destroy 0 rule 0\n+ testpmd> flow list 0\n+\n+ check the rule not exists in the list.\n+ send matched packets, check all the packets can't receive by queue 12.\n+\n+Test case: L2 multicast\n+=======================\n+\n+subcase 1: mac dst + mask\n+--------------------------\n+\n+Test Steps\n+..........\n+1. validate a rule::\n+\n+ 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\n+\n+ get the message::\n+\n+ Flow rule validated\n+\n+ check the flow list::\n+\n+ testpmd> flow list 0\n+\n+ check the rule not exists in the list.\n+\n+2. create a rule::\n+\n+ 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\n+ testpmd> flow list 0\n+\n+ check the rule exists in the list.\n+\n+3. send matched packets::\n+\n+ sendp(Ether(dst=\"01:00:5e:00:00:00\")/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether(dst=\"01:00:5e:7f:00:00\")/IP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether(dst=\"01:00:5e:00:ff:00\")/IP()/TCP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ 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)\n+\n+ check all the packets received by queue 12.\n+ send mismatched packets::\n+\n+ sendp(Ether(dst=\"01:00:5e:80:00:00\")/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether(dst=\"01:00:ff:00:00:00\")/IP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether(dst=\"01:ff:5e:00:ff:00\")/IP()/TCP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether(dst=\"ff:00:5e:00:00:ff\")/IP()/UDP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+\n+ check all the packets can't receive by queue 12.\n+\n+4. verify rules can be destroyed::\n+\n+ testpmd> flow destroy 0 rule 0\n+ testpmd> flow list 0\n+\n+ check the rule not exists in the list.\n+ send matched packets, check all the packets can't receive by queue 12.\n+\n+subcase 2: mac src + mask\n+--------------------------\n+\n+Test Steps\n+..........\n+1. validate a rule::\n+\n+ 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\n+\n+ get the message::\n+\n+ Flow rule validated\n+\n+ check the flow list::\n+\n+ testpmd> flow list 0\n+\n+ check the rule not exists in the list.\n+\n+2. create a rule::\n+\n+ 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\n+ testpmd> flow list 0\n+\n+ check the rule exists in the list.\n+\n+3. send matched packets::\n+\n+ sendp(Ether(src=\"01:00:5e:00:00:00\")/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether(src=\"01:00:5e:7f:00:00\")/IP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether(src=\"01:00:5e:00:ff:00\")/IP()/TCP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ 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)\n+\n+ check all the packets received by queue 12.\n+ send mismatched packets::\n+\n+ sendp(Ether(src=\"01:00:5e:80:00:00\")/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether(src=\"01:00:ff:00:00:00\")/IP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether(src=\"01:ff:5e:00:ff:00\")/IP()/TCP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+ sendp(Ether(src=\"ff:00:5e:00:00:ff\")/IP()/UDP()/Raw(\"x\"*80), iface=\"enp27s0f0\", count=1)\n+\n+ check all the packets can't receive by queue 12.\n+\n+4. verify rules can be destroyed::\n+\n+ testpmd> flow destroy 0 rule 0\n+ testpmd> flow list 0\n+\n+ check the rule not exists in the list.\n+ send matched packets, check all the packets can't receive by queue 12.\n\\ No newline at end of file\ndiff --git a/tests/TestSuite_ice_switch_filter.py b/tests/TestSuite_ice_switch_filter.py\nindex 76bd630f..85c7a805 100644\n--- a/tests/TestSuite_ice_switch_filter.py\n+++ b/tests/TestSuite_ice_switch_filter.py\n@@ -4230,6 +4230,167 @@ drop_any_pkt_list = [\n \"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)\",\n ]\n \n+IP_MASK = {\n+ \"matched\": [\n+ 'Ether()/IP(dst=\"224.0.0.0\")/Raw(\"x\"*80)',\n+ 'Ether()/IP(dst=\"224.0.0.255\")/Raw(\"x\"*80)',\n+ 'Ether()/IP(src=\"192.168.0.1\", dst=\"224.0.255.0\")/Raw(\"x\"*80)',\n+ 'Ether()/IP(src=\"192.168.0.1\", dst=\"224.255.0.0\")/TCP()/Raw(\"x\"*80)',\n+ 'Ether()/IP(src=\"192.168.0.1\", dst=\"239.0.0.0\")/UDP()/Raw(\"x\"*80)',\n+ ],\n+ \"mismatched\": [\n+ 'Ether()/IP(src=\"192.168.0.1\", dst=\"223.0.0.0\")/TCP()/Raw(\"x\"*80)',\n+ 'Ether()/IP(src=\"192.168.0.1\", dst=\"240.0.0.0\")/UDP()/Raw(\"x\"*80)',\n+ 'Ether()/IP(src=\"192.168.0.1\", dst=\"128.0.0.0\")/Raw(\"x\"*80)',\n+ ],\n+}\n+\n+tv_ip_dst_mask = {\n+ \"name\": \"tv_ip_dst_mask\",\n+ \"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\",\n+ \"configuration\": {\"is_non_pipeline\": True, \"is_need_rss_rule\": False},\n+ \"matched\": {\n+ \"scapy_str\": IP_MASK[\"matched\"],\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 12},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 5},\n+ },\n+ \"mismatched\": {\n+ \"scapy_str\": IP_MASK[\"mismatched\"],\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue_mismatched,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 12},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 3},\n+ },\n+}\n+\n+IPv6_MASK = {\n+ \"matched\": [\n+ 'Ether()/IPv6(src=\"CDCD:910A:2222:5498:8475:1111:3900:2023\")/(\"X\"*480)',\n+ 'Ether()/IPv6(src=\"CDCf:0:0:0:0:0:0:0\")/(\"X\"*480)',\n+ 'Ether()/IPv6(dst=\"CDCD:910A:2222:5498:8475:1111:3900:1515\", src=\"CDC0:0:0:0:0:0:0:ffff\")/(\"X\"*480)',\n+ 'Ether()/IPv6(dst=\"CDCD:910A:2222:5498:8475:1111:3900:1515\", src=\"CDC0:0:0:0:0:0:ffff:0\")/(\"X\"*480)',\n+ 'Ether()/IPv6(src=\"CDC0:0:0:0:0:ffff:0:0\")/UDP()/(\"X\"*480)',\n+ 'Ether()/IPv6(dst=\"CDCD:910A:2222:5498:8475:1111:3900:1515\", src=\"CDC0:0:0:0:ffff:0:0:0\")/UDP()/(\"X\"*480)',\n+ 'Ether()/IPv6(src=\"CDC0:0:ffff:0:0:0:0:0\")/TCP()/(\"X\"*480)',\n+ 'Ether()/IPv6(dst=\"CDCD:910A:2222:5498:8475:1111:3900:1515\", src=\"CDC0:ffff:0:0:0:0:0:0\")/TCP()/(\"X\"*480)',\n+ ],\n+ \"mismatched\": [\n+ 'Ether()/IPv6(src=\"CDDD:910A:2222:5498:8475:1111:3900:2023\")/(\"X\"*480)',\n+ 'Ether()/IPv6(src=\"CFCD:910A:2222:5498:8475:1111:3900:2023\")/UDP()/(\"X\"*480)',\n+ 'Ether()/IPv6(dst=\"CDCD:910A:2222:5498:8475:1111:3900:1515\", src=\"FDCD:0:0:0:0:0:0:ffff\")/TCP()/(\"X\"*480)',\n+ ],\n+}\n+\n+tv_ipv6_src_mask = {\n+ \"name\": \"tv_ipv6_src_mask\",\n+ \"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\",\n+ \"configuration\": {\"is_non_pipeline\": True, \"is_need_rss_rule\": False},\n+ \"matched\": {\n+ \"scapy_str\": IPv6_MASK[\"matched\"],\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 12},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 8},\n+ },\n+ \"mismatched\": {\n+ \"scapy_str\": IPv6_MASK[\"mismatched\"],\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue_mismatched,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 12},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 3},\n+ },\n+}\n+\n+tvs_L3_multicast_non_pipeline_mode = [\n+ tv_ip_dst_mask,\n+ tv_ipv6_src_mask,\n+]\n+\n+L2_DST_MASK = {\n+ \"matched\": [\n+ 'Ether(dst=\"01:00:5e:00:00:00\")/Raw(\"x\"*80)',\n+ 'Ether(dst=\"01:00:5e:7f:00:00\")/IP()/Raw(\"x\"*80)',\n+ 'Ether(dst=\"01:00:5e:00:ff:00\")/IP()/TCP()/Raw(\"x\"*80)',\n+ 'Ether(src=\"01:00:5e:00:00:01\", dst=\"01:00:5e:00:00:ff\")/IP()/UDP()/Raw(\"x\"*80)',\n+ ],\n+ \"mismatched\": [\n+ 'Ether(dst=\"01:00:5e:80:00:00\")/Raw(\"x\"*80)',\n+ 'Ether(dst=\"01:00:ff:00:00:00\")/IP()/Raw(\"x\"*80)',\n+ 'Ether(dst=\"01:ff:5e:00:ff:00\")/IP()/TCP()/Raw(\"x\"*80)',\n+ 'Ether(dst=\"ff:00:5e:00:00:ff\")/IP()/UDP()/Raw(\"x\"*80)',\n+ ],\n+}\n+\n+tv_eth_dst_mask = {\n+ \"name\": \"tv_eth_dst_mask\",\n+ \"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\",\n+ \"configuration\": {\"is_non_pipeline\": True, \"is_need_rss_rule\": False},\n+ \"matched\": {\n+ \"scapy_str\": L2_DST_MASK[\"matched\"],\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 12},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 4},\n+ },\n+ \"mismatched\": {\n+ \"scapy_str\": L2_DST_MASK[\"mismatched\"],\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue_mismatched,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 12},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 4},\n+ },\n+}\n+\n+L2_SRC_MASK = {\n+ \"matched\": [\n+ 'Ether(src=\"01:00:5e:00:00:00\")/Raw(\"x\"*80)',\n+ 'Ether(src=\"01:00:5e:7f:00:00\")/IP()/Raw(\"x\"*80)',\n+ 'Ether(src=\"01:00:5e:00:ff:00\")/IP()/TCP()/Raw(\"x\"*80)',\n+ 'Ether(dst=\"01:00:5e:00:00:01\", src=\"01:00:5e:00:00:ff\")/IP()/UDP()/Raw(\"x\"*80)',\n+ ],\n+ \"mismatched\": [\n+ 'Ether(src=\"01:00:5e:80:00:00\")/Raw(\"x\"*80)',\n+ 'Ether(src=\"01:00:ff:00:00:00\")/IP()/Raw(\"x\"*80)',\n+ 'Ether(src=\"01:ff:5e:00:ff:00\")/IP()/TCP()/Raw(\"x\"*80)',\n+ 'Ether(src=\"ff:00:5e:00:00:ff\")/IP()/UDP()/Raw(\"x\"*80)',\n+ ],\n+}\n+\n+tv_eth_src_mask = {\n+ \"name\": \"tv_eth_src_mask\",\n+ \"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\",\n+ \"configuration\": {\"is_non_pipeline\": True, \"is_need_rss_rule\": False},\n+ \"matched\": {\n+ \"scapy_str\": L2_SRC_MASK[\"matched\"],\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 12},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 4},\n+ },\n+ \"mismatched\": {\n+ \"scapy_str\": L2_SRC_MASK[\"mismatched\"],\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue_mismatched,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 12},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 4},\n+ },\n+}\n+\n+tvs_L2_multicast_non_pipeline_mode = [\n+ tv_eth_dst_mask,\n+ tv_eth_src_mask,\n+]\n+\n test_results = OrderedDict()\n \n \n@@ -4273,7 +4434,7 @@ class ICESwitchFilterTest(TestCase):\n self.verify(len(self.dut_ports) >= 1, \"Insufficient ports\")\n localPort = self.tester.get_local_port(self.dut_ports[0])\n self.__tx_iface = self.tester.get_interface(localPort)\n- self.dut.send_expect(\"ifconfig %s up\" % self.__tx_iface, \"# \")\n+ self.tester.send_expect(\"ifconfig %s up\" % self.__tx_iface, \"# \")\n self.pkt = Packet()\n self.pmd = PmdOutput(self.dut)\n \n@@ -5397,6 +5558,18 @@ class ICESwitchFilterTest(TestCase):\n not all(rule6), \"all rules should create failed, result {}\".format(rule6)\n )\n \n+ def test_l3_multicast(self):\n+ \"\"\"\n+ Test case: IP multicast\n+ \"\"\"\n+ self._rte_flow_validate_pattern(tvs_L3_multicast_non_pipeline_mode)\n+\n+ def test_l2_multicast(self):\n+ \"\"\"\n+ Test case: L2 multicast\n+ \"\"\"\n+ self._rte_flow_validate_pattern(tvs_L2_multicast_non_pipeline_mode)\n+\n def tear_down(self):\n \"\"\"\n Run after each test case.\n", "prefixes": [ "V1" ] }{ "id": 113932, "url": "