Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/110185/?format=api
http://patches.dpdk.org/api/patches/110185/?format=api", "web_url": "http://patches.dpdk.org/project/dts/patch/20220424160901.17074-1-zhiminx.huang@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": "<20220424160901.17074-1-zhiminx.huang@intel.com>", "list_archive_url": "https://inbox.dpdk.org/dts/20220424160901.17074-1-zhiminx.huang@intel.com", "date": "2022-04-24T16:09:01", "name": "[V1] tests/cvl_switch_filter:add new cases about pattern any rule", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": false, "hash": "94837c3d791cf8d38736fbe3630457126b8307c5", "submitter": { "id": 1685, "url": "http://patches.dpdk.org/api/people/1685/?format=api", "name": "Huang, ZhiminX", "email": "zhiminx.huang@intel.com" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dts/patch/20220424160901.17074-1-zhiminx.huang@intel.com/mbox/", "series": [ { "id": 22640, "url": "http://patches.dpdk.org/api/series/22640/?format=api", "web_url": "http://patches.dpdk.org/project/dts/list/?series=22640", "date": "2022-04-24T16:09:01", "name": "[V1] tests/cvl_switch_filter:add new cases about pattern any rule", "version": 1, "mbox": "http://patches.dpdk.org/series/22640/mbox/" } ], "comments": "http://patches.dpdk.org/api/patches/110185/comments/", "check": "pending", "checks": "http://patches.dpdk.org/api/patches/110185/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 6CE99A00C4;\n\tSun, 24 Apr 2022 09:44:03 +0200 (CEST)", "from [217.70.189.124] (localhost [127.0.0.1])\n\tby mails.dpdk.org (Postfix) with ESMTP id 6675140042;\n\tSun, 24 Apr 2022 09:44:03 +0200 (CEST)", "from mga01.intel.com (mga01.intel.com [192.55.52.88])\n by mails.dpdk.org (Postfix) with ESMTP id C7F2A4003F\n for <dts@dpdk.org>; Sun, 24 Apr 2022 09:44:00 +0200 (CEST)", "from orsmga006.jf.intel.com ([10.7.209.51])\n by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Apr 2022 00:43:59 -0700", "from unknown (HELO cvl_100g_103.icx.intel.com) ([10.239.251.93])\n by orsmga006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 24 Apr 2022 00:43:55 -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=1650786241; x=1682322241;\n h=from:to:cc:subject:date:message-id;\n bh=k0NnwK6KfMGvUXcgcV85SRhOeMnsCrnsX4aK8iDu66Y=;\n b=extMQRqWxjJTPUuonmS2pQWZQSqHwySxHLvCpe8eaH3WoH2n6Y+KTkOH\n ApOXYIWH1LwOXRG7ekHvxoLawj1r4l/mggGFfvoReKILeA0sKmpyAD5km\n QO3rhX25bdlT4Q4+Cc+IRDbwJqvwUAsiNMJr7NYb00XyN74ub9tUg92mq\n FCKguvsWcIWbsx3P8xLb0aP9Mr2KJ37ek5A+eDibAaHBR2/2TqelqtR7I\n 3Ti1Cfhb7JTZomfy4PYi1PPhijAtZtmnjrOZZSepyRcFZzIiAirtjAw+P\n BIzQuI4/yMCcX8Rbeto1PrQtsLMVcce1uUUvaQoC8j9NtvgGfiqEJ7vBv A==;", "X-IronPort-AV": [ "E=McAfee;i=\"6400,9594,10326\"; a=\"290145570\"", "E=Sophos;i=\"5.90,286,1643702400\"; d=\"scan'208\";a=\"290145570\"", "E=Sophos;i=\"5.90,286,1643702400\"; d=\"scan'208\";a=\"531576952\"" ], "From": "Zhimin Huang <zhiminx.huang@intel.com>", "To": "dts@dpdk.org", "Cc": "Zhimin Huang <zhiminx.huang@intel.com>", "Subject": "[dts][PATCH V1] tests/cvl_switch_filter:add new cases about pattern\n any rule", "Date": "Mon, 25 Apr 2022 00:09:01 +0800", "Message-Id": "<20220424160901.17074-1-zhiminx.huang@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": "dpdk22.03 rte_flow enable new feature to support \"drop any\" and \"steering all to queue\".\nadd 4 new case in cvl_switch_filter suite.\n\nSigned-off-by: Zhimin Huang <zhiminx.huang@intel.com>\n---\n tests/TestSuite_cvl_switch_filter.py | 371 +++++++++++++++++++++++++++\n 1 file changed, 371 insertions(+)", "diff": "diff --git a/tests/TestSuite_cvl_switch_filter.py b/tests/TestSuite_cvl_switch_filter.py\nindex a76b1eea..9b820897 100755\n--- a/tests/TestSuite_cvl_switch_filter.py\n+++ b/tests/TestSuite_cvl_switch_filter.py\n@@ -4217,6 +4217,29 @@ tvs_mac_ipv6_tcp_non_pipeline_mode = [\n tv_mac_ipv6_tcp_drop_queue_02,\n ]\n \n+drop_any_pkt_list = [\n+ \"Ether()/IP(dst='192.168.0.1')/UDP()/VXLAN(vni=2)/Ether()/IP(src='192.168.0.2', dst='192.168.0.3')/Raw('x'*80)\",\n+ \"Ether()/IP(dst='192.168.0.1')/NVGRE(TNI=2)/Ether()/IP(src='192.168.1.2', dst='192.168.1.3')/Raw('x'*80)\",\n+ \"Ether()/IP(src='192.168.0.2', dst='192.168.0.3',tos=4,frag=5)/Raw('x'*80)\",\n+ \"Ether()/IP(src='192.168.0.2',dst='192.168.0.3',tos=4,proto=0x06)/Raw('x'*80)\",\n+ \"Ether()/IPv6(src='CDCD:910A:2222:5498:8475:1111:3900:1515',dst='CDCD:910A:2222:5498:8475:1111:3900:2020',tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)\",\n+ \"Ether()/IPv6(src='CDCD:910A:2222:5498:8475:1111:3900:1515',dst='CDCD:910A:2222:5498:8475:1111:3900:2020',tc=3)/Raw('x'*80)\",\n+ \"Ether(dst='00:11:22:33:44:55')/PPPoED()/Raw('x' *80)\",\n+ \"Ether(dst='00:11:22:33:44:55', type=0x8863)/Raw('x' *80)\",\n+ \"Ether(dst='00:11:22:33:44:55', type=0x8864)/PPPoE(sessionid=3)/Raw('x' *80)\",\n+ \"Ether(dst='00:11:22:33:44:55',type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw('x'*80)\",\n+ \"Ether(dst='00:11:22:33:44:55',type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw('x' * 80)\",\n+ \"Ether(dst='00:11:22:33:44:55',type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw('x' * 80)\",\n+ \"Ether(src='10:22:33:44:55:66', dst='00:11:22:33:44:55',type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(src='CDCD:910A:2222:5498:8475:1111:3900:1536', dst='CDCD:910A:2222:5498:8475:1111:3900:2022')/SCTP(sport=25,dport=23)/Raw('x' * 80)\",\n+ \"Ether(dst='00:11:22:33:44:55')/IPv6(src='CDCD:910A:2222:5498:8475:1111:3900:1536', dst='CDCD:910A:2222:5498:8475:1111:3900:2022', nh=51)/AH(spi=11)/Raw('x'*480)\",\n+ \"Ether(dst='00:11:22:33:44:55')/IPv6(src='CDCD:910A:2222:5498:8475:1111:3900:1536', dst='CDCD:910A:2222:5498:8475:1111:3900:2022')/UDP(dport=4500)/ESP(spi=11)/Raw('x'*480)\",\n+ \"Ether(dst='00:11:22:33:44:55')/IPv6(src='CDCD:910A:2222:5498:8475:1111:3900:1536', dst='CDCD:910A:2222:5498:8475:1111:3900:2022', nh=50)/ESP(spi=11)/Raw('x'*480)\",\n+ \"Ether(dst='00:11:22:33:44:54')/IP(src='192.168.0.25',dst='192.168.0.23')/UDP(sport=23,dport=8805)/PFCP(S=1, seid=1)/Raw('x'*80)\",\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')/('X'*480)\",\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.1.1', src='192.168.0.2')/ICMP()/('X'*480)\",\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 test_results = OrderedDict()\n \n \n@@ -5015,6 +5038,354 @@ class CVLSwitchFilterTest(TestCase):\n \"the rule list is not the same. expect %s, result %s\" % ([], result),\n )\n \n+ def test_rule_program_into_switch(self):\n+ self.launch_testpmd(is_non_pipeline=True)\n+ rule_list = [\n+ \"flow create 0 ingress pattern any / end actions drop / end\",\n+ \"flow create 0 ingress pattern any / end actions queue index 4 / end\",\n+ ]\n+ rule1 = self.create_switch_filter_rule(\n+ rte_flow_pattern=rule_list[0], check_stats=False\n+ )\n+ self.verify(all(rule1), \"all rules should create successed, result {}\".format(rule1))\n+ result = self.check_switch_filter_rule_list(\n+ port_id=self.dut_ports[0], is_need_rss_rule=False, check_stats=False\n+ )\n+ self.verify(result, \"expect rule create successed\")\n+ self.destroy_switch_filter_rule(\n+ port_id=self.dut_ports[0], rule_list=rule1, check_stats=False\n+ )\n+ rule2 = self.create_switch_filter_rule(\n+ rte_flow_pattern=rule_list[1], check_stats=False\n+ )\n+ self.verify(all(rule2), \"all rules should create successed, result {}\".format(rule2))\n+ result = self.check_switch_filter_rule_list(\n+ port_id=self.dut_ports[0], is_need_rss_rule=False, check_stats=False\n+ )\n+ self.verify(result, \"expect rule create successed\")\n+\n+ def test_drop_any(self):\n+ self.launch_testpmd(is_non_pipeline=True)\n+ rule_list = [\n+ \"flow create 0 ingress pattern any / end actions drop / end\",\n+ ]\n+ rule1 = self.create_switch_filter_rule(\n+ rte_flow_pattern=rule_list[0], check_stats=False\n+ )\n+ self.verify(all(rule1), \"all rules should create successed, result {}\".format(rule1))\n+ result = self.check_switch_filter_rule_list(\n+ port_id=self.dut_ports[0], is_need_rss_rule=False, check_stats=False\n+ )\n+ self.verify(result, \"expect rule create successed\")\n+ matched_dic = {\n+ \"scapy_str\": drop_any_pkt_list,\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_drop,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": \"null\"},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 0},\n+ }\n+ self.pmd.wait_link_status_up(self.dut_ports[0])\n+ result_flag, log_msg = self.send_and_check_packets(\n+ matched_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag, \"expect all pkts can be drop, result {}\".format(log_msg)\n+ )\n+ self.destroy_switch_filter_rule(\n+ port_id=self.dut_ports[0], rule_list=rule1, check_stats=False\n+ )\n+ result = self.check_switch_filter_rule_list(\n+ port_id=self.dut_ports[0], is_need_rss_rule=False, check_stats=False\n+ )\n+ self.verify(not result, \"expect rule destroy successed\")\n+ destroy_rule_dic = {\n+ \"scapy_str\": drop_any_pkt_list,\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_drop_mismatched,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": \"null\"},\n+ },\n+ \"expect_results\": {\"expect_pkts\": len(drop_any_pkt_list)},\n+ }\n+ result_flag, log_msg = self.send_and_check_packets(\n+ destroy_rule_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag, \"expect all pkts can be received, result {}\".format(log_msg)\n+ )\n+\n+ def test_steer_all_to_queue(self):\n+ self.launch_testpmd(is_non_pipeline=True)\n+ rule_list = [\n+ \"flow create 0 ingress pattern any / end actions queue index 4 / end\",\n+ ]\n+ rule1 = self.create_switch_filter_rule(\n+ rte_flow_pattern=rule_list[0], check_stats=False\n+ )\n+ self.verify(all(rule1), \"all rules should create successed, result {}\".format(rule1))\n+ result = self.check_switch_filter_rule_list(\n+ port_id=self.dut_ports[0], is_need_rss_rule=False, check_stats=False\n+ )\n+ self.verify(result, \"expect rule create successed\")\n+ matched_dic = {\n+ \"scapy_str\": drop_any_pkt_list,\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 4},\n+ },\n+ \"expect_results\": {\"expect_pkts\": len(drop_any_pkt_list)},\n+ }\n+ self.pmd.wait_link_status_up(self.dut_ports[0])\n+ result_flag, log_msg = self.send_and_check_packets(\n+ matched_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag,\n+ \"expect all pkts can be received by queue 4, result {}\".format(log_msg),\n+ )\n+ self.destroy_switch_filter_rule(\n+ port_id=self.dut_ports[0], rule_list=rule1, check_stats=False\n+ )\n+ result = self.check_switch_filter_rule_list(\n+ port_id=self.dut_ports[0], is_need_rss_rule=False, check_stats=False\n+ )\n+ self.verify(not result, \"expect rule destroy successed\")\n+ destroy_rule_dic = {\n+ \"scapy_str\": drop_any_pkt_list,\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue_mismatched,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 4},\n+ },\n+ \"expect_results\": {\"expect_pkts\": len(drop_any_pkt_list)},\n+ }\n+ result_flag, log_msg = self.send_and_check_packets(\n+ destroy_rule_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag, \"expect all pkts can be receive, result {}\".format(log_msg)\n+ )\n+\n+ def test_flow_priority_check(self):\n+ self.logger.info(\"***********subcase 1: non-pipeline mode***********\")\n+ self.launch_testpmd(is_non_pipeline=True)\n+ rule1_list = [\n+ \"flow create 0 priority 0 ingress pattern any / end actions drop / end\",\n+ \"flow create 0 priority 1 ingress pattern any / end actions queue index 4 / end\",\n+ ]\n+ rule1 = self.create_switch_filter_rule(\n+ rte_flow_pattern=rule1_list, check_stats=False\n+ )\n+ self.verify(all(rule1), \"all rules should create successed, result {}\".format(rule1))\n+ result = self.check_switch_filter_rule_list(\n+ port_id=self.dut_ports[0], is_need_rss_rule=False, check_stats=False\n+ )\n+ self.verify(result, \"expect rule create successed\")\n+ subcase1_drop_dic = {\n+ \"scapy_str\": drop_any_pkt_list,\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_drop,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": \"null\"},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 0},\n+ }\n+ self.pmd.wait_link_status_up(self.dut_ports[0])\n+ result_flag, log_msg = self.send_and_check_packets(\n+ subcase1_drop_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag, \"expect all pkts can be dropped, result {}\".format(log_msg)\n+ )\n+ self.destroy_switch_filter_rule(\n+ port_id=self.dut_ports[0], rule_list=rule1[0], check_stats=False\n+ )\n+ subcase1_queue_4_dic = {\n+ \"scapy_str\": drop_any_pkt_list,\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 4},\n+ },\n+ \"expect_results\": {\"expect_pkts\": len(drop_any_pkt_list)},\n+ }\n+ result_flag, log_msg = self.send_and_check_packets(\n+ subcase1_queue_4_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag,\n+ \"expect all pkts can be received by queue 4, result {}\".format(log_msg),\n+ )\n+ self.destroy_switch_filter_rule(\n+ port_id=self.dut_ports[0], rule_list=rule1[1], check_stats=False\n+ )\n+ subcase1_all_receive_dic = {\n+ \"scapy_str\": drop_any_pkt_list,\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_drop_mismatched,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": \"null\"},\n+ },\n+ \"expect_results\": {\"expect_pkts\": len(drop_any_pkt_list)},\n+ }\n+ result_flag, log_msg = self.send_and_check_packets(\n+ subcase1_all_receive_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag, \"expect all pkts can be received, result {}\".format(log_msg)\n+ )\n+\n+ # change the rule priority\n+ self.dut.send_expect(\"flow flush 0\", \"testpmd> \", 15)\n+ rule2_list = [\n+ \"flow create 0 priority 0 ingress pattern any / end actions queue index 4 / end\",\n+ \"flow create 0 priority 1 ingress pattern any / end actions drop / end\",\n+ ]\n+ rule2 = self.create_switch_filter_rule(\n+ rte_flow_pattern=rule2_list, check_stats=False\n+ )\n+ self.verify(all(rule2), \"all rules should create successed, result {}\".format(rule2))\n+ result = self.check_switch_filter_rule_list(\n+ port_id=self.dut_ports[0], is_need_rss_rule=False, check_stats=False\n+ )\n+ self.verify(result, \"expect rule create successed\")\n+ self.pmd.wait_link_status_up(self.dut_ports[0])\n+ result_flag, log_msg = self.send_and_check_packets(\n+ subcase1_drop_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag, \"expect all pkts can be dropped, result {}\".format(log_msg)\n+ )\n+ self.destroy_switch_filter_rule(\n+ port_id=self.dut_ports[0], rule_list=rule2[0], check_stats=False\n+ )\n+ result_flag, log_msg = self.send_and_check_packets(\n+ subcase1_drop_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag, \"expect all pkts can be dropped, result {}\".format(log_msg)\n+ )\n+ self.destroy_switch_filter_rule(\n+ port_id=self.dut_ports[0], rule_list=rule2[1], check_stats=False\n+ )\n+ result_flag, log_msg = self.send_and_check_packets(\n+ subcase1_all_receive_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag, \"expect all pkts can be received, result {}\".format(log_msg)\n+ )\n+ self.dut.send_expect(\"flow flush 0\", \"testpmd> \", 15)\n+\n+ self.logger.info(\n+ \"***********subcase 2: non-pipeline mode with other rule***********\"\n+ )\n+ rule3_list = [\n+ \"flow create 0 priority 1 ingress pattern any / end actions drop / end\",\n+ \"flow create 0 priority 0 ingress pattern eth / ipv4 src is 1.1.1.2 dst is 1.1.1.3 tos is 4 / udp src is 23 dst is 25 / end actions queue index 2 / end\",\n+ ]\n+ pkts = [\n+ \"Ether()/IP(src='1.1.1.2',dst='1.1.1.3',tos=4)/UDP(sport=23,dport=25)/Raw('x'*80)\"\n+ ]\n+ rule3 = self.create_switch_filter_rule(\n+ rte_flow_pattern=rule3_list, check_stats=False\n+ )\n+ self.verify(all(rule3), \"all rules should create successed, result {}\".format(rule3))\n+ result = self.check_switch_filter_rule_list(\n+ port_id=self.dut_ports[0], is_need_rss_rule=False, check_stats=False\n+ )\n+ self.verify(result, \"expect rule create successed\")\n+ self.pmd.wait_link_status_up(self.dut_ports[0])\n+ subcase2_drop_dic = {\n+ \"scapy_str\": pkts,\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_drop,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": \"null\"},\n+ },\n+ \"expect_results\": {\"expect_pkts\": 0},\n+ }\n+ result_flag, log_msg = self.send_and_check_packets(\n+ subcase2_drop_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag, \"expect all pkts can be dropped, result {}\".format(log_msg)\n+ )\n+ self.destroy_switch_filter_rule(\n+ port_id=self.dut_ports[0], rule_list=rule3[0], check_stats=False\n+ )\n+ subcase2_queue_2_dic = {\n+ \"scapy_str\": pkts,\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 2},\n+ },\n+ \"expect_results\": {\"expect_pkts\": len(pkts)},\n+ }\n+ result_flag, log_msg = self.send_and_check_packets(\n+ subcase2_queue_2_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag,\n+ \"expect all pkts can be received by queue 2, result {}\".format(log_msg),\n+ )\n+ self.dut.send_expect(\"flow flush 0\", \"testpmd> \", 15)\n+ rule4_list = [\n+ \"flow create 0 priority 1 ingress pattern any / end actions queue index 4 / end\",\n+ \"flow create 0 priority 0 ingress pattern eth / ipv4 src is 1.1.1.2 dst is 1.1.1.3 tos is 4 / udp src is 23 dst is 25 / end actions queue index 2 / end\",\n+ ]\n+ pkts = [\n+ \"Ether()/IP(src='1.1.1.2',dst='1.1.1.3',tos=4)/UDP(sport=23,dport=25)/Raw('x'*80)\"\n+ ]\n+ rule4 = self.create_switch_filter_rule(\n+ rte_flow_pattern=rule4_list, check_stats=False\n+ )\n+ self.verify(all(rule4), \"all rules should create successed, result {}\".format(rule4))\n+ result = self.check_switch_filter_rule_list(\n+ port_id=self.dut_ports[0], is_need_rss_rule=False, check_stats=False\n+ )\n+ self.verify(result, \"expect rule create successed\")\n+ self.pmd.wait_link_status_up(self.dut_ports[0])\n+ result_flag, log_msg = self.send_and_check_packets(\n+ subcase2_queue_2_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag,\n+ \"expect all pkts can be received by queue 2, result {}\".format(log_msg),\n+ )\n+ self.destroy_switch_filter_rule(\n+ port_id=self.dut_ports[0], rule_list=rule4[0], check_stats=False\n+ )\n+ subcase2_queue_4_dic = {\n+ \"scapy_str\": pkts,\n+ \"check_func\": {\n+ \"func\": rfc.check_output_log_in_queue,\n+ \"param\": {\"expect_port\": 0, \"expect_queues\": 2},\n+ },\n+ \"expect_results\": {\"expect_pkts\": len(pkts)},\n+ }\n+ result_flag, log_msg = self.send_and_check_packets(\n+ subcase2_queue_4_dic, self.dut_ports[0]\n+ )\n+ self.verify(\n+ result_flag,\n+ \"expect all pkts can be received by queue 2, result {}\".format(log_msg),\n+ )\n+ self.dut.send_expect(\"flow flush 0\", \"testpmd> \", 15)\n+\n+ self.logger.info(\"***********subcase 3: pipeline mode***********\")\n+ self.dut.send_expect(\"quit\", \"#\")\n+ self.launch_testpmd(is_non_pipeline=False)\n+ rule5_list = [\n+ \"flow create 0 priority 0 ingress pattern any / end actions drop / end\",\n+ \"flow create 0 priority 0 ingress pattern any / end actions queue index 4 / end\",\n+ \"flow create 0 priority 1 ingress pattern any / end actions drop / end\",\n+ \"flow create 0 priority 1 ingress pattern any / end actions queue index 4 / end\",\n+ ]\n+ rule5 = self.create_switch_filter_rule(\n+ rte_flow_pattern=rule5_list[0:1], check_stats=False\n+ )\n+ self.verify(not all(rule5), \"all rules should create failed, result {}\".format(rule5))\n+ self.dut.send_expect(\"flow flush 0\", \"testpmd> \", 15)\n+ rule6 = self.create_switch_filter_rule(\n+ rte_flow_pattern=rule5_list[2:3], check_stats=False\n+ )\n+ self.verify(not all(rule6), \"all rules should create failed, result {}\".format(rule6))\n+\n def tear_down(self):\n \"\"\"\n Run after each test case.\n", "prefixes": [ "V1" ] }{ "id": 110185, "url": "