From patchwork Mon Nov 1 12:00:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 103276 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 C2D5CA0C52; Mon, 1 Nov 2021 04:31:53 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 83C1240E28; Mon, 1 Nov 2021 04:31:53 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 572F540DF6 for ; Mon, 1 Nov 2021 04:31:51 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10154"; a="231202972" X-IronPort-AV: E=Sophos;i="5.87,198,1631602800"; d="scan'208";a="231202972" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2021 20:31:50 -0700 X-IronPort-AV: E=Sophos;i="5.87,198,1631602800"; d="scan'208";a="637668827" Received: from unknown (HELO localhost.localdomain) ([10.240.183.103]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2021 20:31:49 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Mon, 1 Nov 2021 20:00:52 +0800 Message-Id: <20211101120056.12228-1-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1 1/5] test_plans/cvl_iavf_ip_fragment_rte_flow:modify testplan to adapt dpdk changed 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 Sender: "dts" 1.according to 54d78462344e2b3ec0a54cb6f13af0bf3da47032. the default rss not support ipfrag rss, need take a rss rule to enable ipfrag rss for fdir test. 2.according to e4a0a7599d974f05665fec3e4c251659f0b11453. switch have high priority,should take the rule with mark into fdir. Signed-off-by: Zhimin Huang Tested-by: Zhimin Huang --- ...vl_iavf_ip_fragment_rte_flow_test_plan.rst | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/test_plans/cvl_iavf_ip_fragment_rte_flow_test_plan.rst b/test_plans/cvl_iavf_ip_fragment_rte_flow_test_plan.rst index 9813b53c..35e4c03c 100644 --- a/test_plans/cvl_iavf_ip_fragment_rte_flow_test_plan.rst +++ b/test_plans/cvl_iavf_ip_fragment_rte_flow_test_plan.rst @@ -109,8 +109,18 @@ The steps same as FDIR/RSS suites test steps take 'MAC_IPV4_FRAG fdir queue index' for fdir example ------------------------------------------------------ + +.. note:: + + The default rss not support ipfragment, need take a rss rule to enable ipfragment rss. + 1. validate and create rule:: + take a ipfragment rss rule: + flow create 0 ingress pattern eth / ipv4 / end actions rss types eth ipv4-frag end key_len 0 queues end / end + + take fdir rule: + flow validate 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / mark / end Flow rule validated flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / mark / end @@ -290,7 +300,7 @@ Subcase 4: MAC_IPV4_FRAG fdir drop 1. rules:: - flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / end + flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / mark / end 2. matched packets:: @@ -383,7 +393,7 @@ Subcase 4: MAC_IPV6_FRAG fdir drop 1. rules:: - flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / end + flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / mark / end 2. matched packets:: @@ -543,8 +553,8 @@ Subcase 1: exclusive validation fdir rule ----------------------------------------- 1. create fdir filter rules:: - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 / end actions queue index 1 / end - flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / end actions queue index 2 / end + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 / end actions queue index 1 / mark / end + flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / mark / end 2. hit pattern/defined input set id, the pkt received for queue 2:: @@ -554,8 +564,8 @@ Subcase 2: exclusive validation fdir rule ----------------------------------------- 1. create fdir filter rules:: - flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / end actions queue index 2 / end - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 / end actions queue index 1 / end + flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / end actions queue index 2 / mark / end + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 / end actions queue index 1 / mark / end 2. hit pattern/defined input set id, the pkt received for queue 2:: @@ -568,7 +578,7 @@ Subcase 3: exclusive validation rss rule flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end -2. hit pattern/defined input set id, the pkt received for rss same queue:: +2. hit pattern/defined input set id, the pkt received for rss different queue:: p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment6(p, 500) p=Ether()/IP(id=47751)/Raw('X'*666); pkts=fragment6(p, 500) @@ -580,7 +590,7 @@ Subcase 4: exclusive validation rss rule flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end 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 id, the pkt received for rss same queue:: +2. hit pattern/defined input set id, the pkt received for rss different queue:: p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment6(p, 500) p=Ether()/IP(id=47751)/Raw('X'*666); pkts=fragment6(p, 500) From patchwork Mon Nov 1 12:00:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 103277 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 1D2DBA0C55; Mon, 1 Nov 2021 04:31:54 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A77E2410FC; Mon, 1 Nov 2021 04:31:53 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 21B0840DF6 for ; Mon, 1 Nov 2021 04:31:51 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10154"; a="231202978" X-IronPort-AV: E=Sophos;i="5.87,198,1631602800"; d="scan'208";a="231202978" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2021 20:31:51 -0700 X-IronPort-AV: E=Sophos;i="5.87,198,1631602800"; d="scan'208";a="637668835" Received: from unknown (HELO localhost.localdomain) ([10.240.183.103]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2021 20:31:50 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Mon, 1 Nov 2021 20:00:53 +0800 Message-Id: <20211101120056.12228-2-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211101120056.12228-1-zhiminx.huang@intel.com> References: <20211101120056.12228-1-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 2/5] test_plans/cvl_ip_fragment_rte_flow:modify testplan to adapt dpdk changed 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 Sender: "dts" 1.according to b3d95f1817288ca228f09b9164d6d3ff6249b175. the default rss not support ipfrag rss, need take a rss rule to enable ipfrag rss for fdir test. 2.according to e4a0a7599d974f05665fec3e4c251659f0b11453. switch have high priority,should take the rule with mark into fdir. Signed-off-by: Zhimin Huang --- .../cvl_ip_fragment_rte_flow_test_plan.rst | 25 +++++++++++++------ 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/test_plans/cvl_ip_fragment_rte_flow_test_plan.rst b/test_plans/cvl_ip_fragment_rte_flow_test_plan.rst index 704b590c..909692cc 100644 --- a/test_plans/cvl_ip_fragment_rte_flow_test_plan.rst +++ b/test_plans/cvl_ip_fragment_rte_flow_test_plan.rst @@ -102,8 +102,17 @@ The steps same as FDIR/RSS test steps take 'MAC_IPV4_FRAG fdir queue index' for fdir example ------------------------------------------------------ + +.. note:: + + The default rss not support ipfragment, need take a rss rule to enable ipfragment rss. + 1. validate and create rule:: + take a ipfragment rss rule: + flow create 0 ingress pattern eth / ipv4 / end actions rss types eth ipv4-frag end key_len 0 queues end / end + + take fdir rule: flow validate 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / mark / end Flow rule validated flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 1 / mark / end @@ -283,7 +292,7 @@ Subcase 4: MAC_IPV4_FRAG fdir drop 1. rules:: - flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / end + flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / mark / end 2. matched packets:: @@ -376,7 +385,7 @@ Subcase 4: MAC_IPV6_FRAG fdir drop 1. rules:: - flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / end + flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / mark / end 2. matched packets:: @@ -575,8 +584,8 @@ Subcase 1: exclusive validation fdir rule ----------------------------------------- 1. create fdir filter rules:: - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 / end actions queue index 1 / end - flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / end + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 / end actions queue index 1 / mark / end + flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / mark / end 2. hit pattern/defined input set id, the pkt received for queue 2:: @@ -586,8 +595,8 @@ Subcase 2: exclusive validation fdir rule ----------------------------------------- 1. create fdir filter rules:: - flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / end - flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 / end actions queue index 1 / end + flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / mark / end + flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 / end actions queue index 1 / mark / end 2. hit pattern/defined input set id, the pkt received for queue 2:: @@ -600,7 +609,7 @@ Subcase 3: exclusive validation rss rule flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4 end key_len 0 queues end / end flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end -2. hit pattern/defined input set id, the pkt received for rss same queue:: +2. hit pattern/defined input set id, the pkt received for rss different queue:: p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment6(p, 500) p=Ether()/IP(id=47751)/Raw('X'*666); pkts=fragment6(p, 500) @@ -612,7 +621,7 @@ Subcase 4: exclusive validation rss rule flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end 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 id, the pkt received for rss same queue:: +2. hit pattern/defined input set id, the pkt received for rss different queue:: p=Ether()/IP(id=47750)/Raw('X'*666); pkts=fragment6(p, 500) p=Ether()/IP(id=47751)/Raw('X'*666); pkts=fragment6(p, 500) From patchwork Mon Nov 1 12:00:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 103278 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 D4D64A0C56; Mon, 1 Nov 2021 04:31:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C8145410FB; Mon, 1 Nov 2021 04:31:55 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id E6AD4410FF for ; Mon, 1 Nov 2021 04:31:53 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10154"; a="231202981" X-IronPort-AV: E=Sophos;i="5.87,198,1631602800"; d="scan'208";a="231202981" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2021 20:31:53 -0700 X-IronPort-AV: E=Sophos;i="5.87,198,1631602800"; d="scan'208";a="637668842" Received: from unknown (HELO localhost.localdomain) ([10.240.183.103]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2021 20:31:51 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Mon, 1 Nov 2021 20:00:54 +0800 Message-Id: <20211101120056.12228-3-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211101120056.12228-1-zhiminx.huang@intel.com> References: <20211101120056.12228-1-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 3/5] tests/cvl_iavf_ip_fragment_rte_flow:modify testcase to adapt dpdk changed 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 Sender: "dts" 1.according to 54d78462344e2b3ec0a54cb6f13af0bf3da47032. the default rss not support ipfrag rss, need take a rss rule to enable ipfrag rss for fdir test. 2.according to e4a0a7599d974f05665fec3e4c251659f0b11453. switch have high priority,should take the rule with mark into fdir. Signed-off-by: Zhimin Huang --- ...TestSuite_cvl_iavf_ip_fragment_rte_flow.py | 33 ++++++++++--------- 1 file changed, 18 insertions(+), 15 deletions(-) diff --git a/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py b/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py index aa054053..983054c3 100644 --- a/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py +++ b/tests/TestSuite_cvl_iavf_ip_fragment_rte_flow.py @@ -72,7 +72,7 @@ tv_mac_ipv4_frag_fdir_passthru = { tv_mac_ipv4_frag_fdir_drop = { "name": "tv_mac_ipv4_frag_fdir_drop", - "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / end", + "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / mark / end", "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"], "unmatched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"] }, @@ -106,12 +106,12 @@ tvs_mac_ipv4_fragment_fdir = [ tv_mac_ipv4_frag_fdir_mark, ] -tvs_mac_ipv4_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv4_frag', 'mac_ipv4_frag_l3src') +tvs_mac_ipv4_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv4_frag_fdir', 'mac_ipv4_frag_fdir_l3src') .replace('ipv4 fragment_offset', 'ipv4 src is 192.168.1.1 fragment_offset') .replace("IP(id=47750)", "IP(id=47750, src='192.168.1.1')")) for element in tvs_mac_ipv4_fragment_fdir] -tvs_mac_ipv4_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv4_frag', 'mac_ipv4_frag_l3dst') +tvs_mac_ipv4_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv4_frag_fdir', 'mac_ipv4_frag_fdir_l3dst') .replace('ipv4 fragment_offset', 'ipv4 dst is 192.168.1.2 fragment_offset') .replace("IP(id=47750)", "IP(id=47750, dst='192.168.1.2')")) for element in tvs_mac_ipv4_fragment_fdir] @@ -147,7 +147,7 @@ tv_mac_ipv6_frag_fdir_passthru = { tv_mac_ipv6_frag_fdir_drop = { "name": "tv_mac_ipv6_frag_fdir_drop", - "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / end", + "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / mark / end", "scapy_str": {"matched": ["Ether(dst='00:11:22:33:55:66')/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"], "unmatched": ["Ether(dst='00:11:22:33:55:66')/IP(id=47750)/Raw('X'*666)"] }, @@ -181,12 +181,12 @@ tvs_mac_ipv6_fragment_fdir = [ tv_mac_ipv6_frag_fdir_mark, ] -tvs_mac_ipv6_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv6_frag', 'mac_ipv6_frag_l3src') +tvs_mac_ipv6_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv6_frag_fdir', 'mac_ipv6_frag_fdir_l3src') .replace('/ ipv6 /', '/ ipv6 src is 2001::1 /') .replace("IPv6()", "IPv6(src='2001::1')")) for element in tvs_mac_ipv6_fragment_fdir] -tvs_mac_ipv6_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv6_frag', 'mac_ipv6_frag_l3dst') +tvs_mac_ipv6_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv6_frag_fdir', 'mac_ipv6_frag_fdir_l3dst') .replace('/ ipv6 /', '/ ipv6 dst is 2001::2 /') .replace("IPv6()", "IPv6(dst='2001::2')")) for element in tvs_mac_ipv6_fragment_fdir] @@ -373,7 +373,8 @@ class TestCvlIavfIpFragmentRteFlow(TestCase): rule_list_fdir = [ 'flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 / end actions queue index 1 / end', 'flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / end'] - pkt_fdir = "Ether()/IP(src='192.168.0.20', id=47750)/Raw('X'*666)" + pkt_fdir = ["Ether()/IP(src='192.168.0.20', id=47750)/Raw('X'*666)"] + p = re.compile(r"port\s+%s/queue\s+(\d+):\s+received\s+(\d+)\s+packets" % 0) self.logger.info('Subcase 1: exclusive validation fdir rule') self.launch_testpmd(param_fdir=True) @@ -382,11 +383,12 @@ class TestCvlIavfIpFragmentRteFlow(TestCase): except Exception as e: self.logger.warning('Subcase 1 failed: %s' % e) result = False - hashes, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkt_fdir) - for queue in queues: - if '0x2' != queue: + out = self.fdirprocess.send_pkt_get_output(pkt_fdir) + res = p.findall(out) + for queue in res: + if queue[0][0].strip() != '2': result = False - self.logger.error('Error: queue index {} != 2'.format(queue)) + self.logger.error("Error: queue index {} != '2'".format(queue[0][0])) continue result_list.append(result) self.dut.send_expect("quit", "# ") @@ -400,11 +402,12 @@ class TestCvlIavfIpFragmentRteFlow(TestCase): except Exception as e: self.logger.warning('Subcase 2 failed: %s' % e) result = False - hashes, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkt_fdir) - for queue in queues: - if '0x2' != queue: + out = self.fdirprocess.send_pkt_get_output(pkt_fdir) + res = p.findall(out) + for queue in res: + if queue[0][0].strip() != '2': result = False - self.logger.error('Error: queue index {} != 2'.format(queue)) + self.logger.error("Error: queue index {} != '2'".format(queue[0][0])) continue result_list.append(result) self.dut.send_expect("quit", "# ") From patchwork Mon Nov 1 12:00:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 103279 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 000E3A0C52; Mon, 1 Nov 2021 04:31:56 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E90E841101; Mon, 1 Nov 2021 04:31:56 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id E36C040DF6 for ; Mon, 1 Nov 2021 04:31:54 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10154"; a="231202982" X-IronPort-AV: E=Sophos;i="5.87,198,1631602800"; d="scan'208";a="231202982" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2021 20:31:54 -0700 X-IronPort-AV: E=Sophos;i="5.87,198,1631602800"; d="scan'208";a="637668846" Received: from unknown (HELO localhost.localdomain) ([10.240.183.103]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2021 20:31:53 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Mon, 1 Nov 2021 20:00:55 +0800 Message-Id: <20211101120056.12228-4-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211101120056.12228-1-zhiminx.huang@intel.com> References: <20211101120056.12228-1-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 4/5] tests/cvl_ip_fragment_rte_flow:modify testcase to adapt dpdk changed 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 Sender: "dts" 1.according to b3d95f1817288ca228f09b9164d6d3ff6249b175. the default rss not support ipfrag rss, need take a rss rule to enable ipfrag rss for fdir test. 2.according to e4a0a7599d974f05665fec3e4c251659f0b11453. switch have high priority,should take the rule with mark into fdir. Signed-off-by: Zhimin Huang --- tests/TestSuite_cvl_ip_fragment_rte_flow.py | 42 +++++++++++---------- 1 file changed, 23 insertions(+), 19 deletions(-) diff --git a/tests/TestSuite_cvl_ip_fragment_rte_flow.py b/tests/TestSuite_cvl_ip_fragment_rte_flow.py index 181634c3..df67eac4 100644 --- a/tests/TestSuite_cvl_ip_fragment_rte_flow.py +++ b/tests/TestSuite_cvl_ip_fragment_rte_flow.py @@ -31,6 +31,7 @@ import time +import re from scapy.all import * @@ -71,7 +72,7 @@ tv_mac_ipv4_frag_fdir_passthru = { tv_mac_ipv4_frag_fdir_drop = { "name": "tv_mac_ipv4_frag_fdir_drop", - "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / end", + "rule": "flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions drop / mark / end", "scapy_str": {"matched": ["Ether()/IP(id=47750)/Raw('X'*666)"], "unmatched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"] }, @@ -105,7 +106,7 @@ tvs_mac_ipv4_fragment_fdir = [ tv_mac_ipv4_frag_fdir_mark, ] -tvs_mac_ipv4_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv4_frag', 'mac_ipv4_frag_l2dst') +tvs_mac_ipv4_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv4_frag_fdir', 'mac_ipv4_frag_fdir_l2dst') .replace('eth / ipv4 fragment_offset', 'eth dst is 00:00:00:00:00:01 / ipv4 fragment_offset') .replace("Ether()", "Ether(dst='00:00:00:00:00:01')") ) @@ -113,12 +114,12 @@ tvs_mac_ipv4_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv4_frag', ' tvs_mac_ipv4_frag_fdir_with_l2 = tvs_mac_ipv4_fragment_fdir_l2dst -tvs_mac_ipv4_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv4_frag', 'mac_ipv4_frag_l3src') +tvs_mac_ipv4_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv4_frag_fdir', 'mac_ipv4_frag_fdir_l3src') .replace('ipv4 fragment_offset', 'ipv4 src is 192.168.1.1 fragment_offset') .replace("IP(id=47750)", "IP(id=47750, src='192.168.1.1')")) for element in tvs_mac_ipv4_fragment_fdir] -tvs_mac_ipv4_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv4_frag', 'mac_ipv4_frag_l3dst') +tvs_mac_ipv4_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv4_frag_fdir', 'mac_ipv4_frag_fdir_l3dst') .replace('ipv4 fragment_offset', 'ipv4 dst is 192.168.1.2 fragment_offset') .replace("IP(id=47750)", "IP(id=47750, dst='192.168.1.2')")) for element in tvs_mac_ipv4_fragment_fdir] @@ -154,7 +155,7 @@ tv_mac_ipv6_frag_fdir_passthru = { tv_mac_ipv6_frag_fdir_drop = { "name": "tv_mac_ipv6_frag_fdir_drop", - "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / end", + "rule": "flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext frag_data spec 0x0001 frag_data mask 0x0001 / end actions drop / mark / end", "scapy_str": {"matched": ["Ether()/IPv6()/IPv6ExtHdrFragment(id=47750)/Raw('X'*666)"], "unmatched": ["Ether()/IP(id=47750)/Raw('X'*666)"] }, @@ -188,7 +189,7 @@ tvs_mac_ipv6_fragment_fdir = [ tv_mac_ipv6_frag_fdir_mark, ] -tvs_mac_ipv6_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv6_frag', 'mac_ipv6_frag_l2dst') +tvs_mac_ipv6_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv6_frag_fdir', 'mac_ipv6_frag_fdir_l2dst') .replace('eth / ipv6 / ipv6_frag_ext frag_data', 'eth dst is 00:00:00:00:00:01 / ipv6 / ipv6_frag_ext frag_data') .replace("Ether()", "Ether(dst='00:00:00:00:00:01')") ) @@ -196,12 +197,12 @@ tvs_mac_ipv6_fragment_fdir_l2dst = [eval(str(element).replace('mac_ipv6_frag', ' tvs_mac_ipv6_frag_fdir_with_l2 = tvs_mac_ipv6_fragment_fdir_l2dst -tvs_mac_ipv6_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv6_frag', 'mac_ipv6_frag_l3src') +tvs_mac_ipv6_fragment_fdir_l3src = [eval(str(element).replace('mac_ipv6_frag_fdir', 'mac_ipv6_frag_fdir_l3src') .replace('/ ipv6 /', '/ ipv6 src is 2001::1 /') .replace("IPv6()", "IPv6(src='2001::1')")) for element in tvs_mac_ipv6_fragment_fdir] -tvs_mac_ipv6_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv6_frag', 'mac_ipv6_frag_l3dst') +tvs_mac_ipv6_fragment_fdir_l3dst = [eval(str(element).replace('mac_ipv6_frag_fdir', 'mac_ipv6_frag_fdir_l3dst') .replace('/ ipv6 /', '/ ipv6 dst is 2001::2 /') .replace("IPv6()", "IPv6(dst='2001::2')")) for element in tvs_mac_ipv6_fragment_fdir] @@ -366,9 +367,10 @@ class TestCvlIpFragmentRteFlow(TestCase): result = True result_list = [] rule_list_fdir = [ - 'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 / end actions queue index 1 / end', - 'flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / end'] - pkt_fdir = "Ether(dst='00:11:22:33:44:55')/IP(src='192.168.0.20', id=47750)/Raw('X'*666)" + 'flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / ipv4 src is 192.168.0.20 / end actions queue index 1 / mark / end', + 'flow create 0 ingress pattern eth / ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 / end actions queue index 2 / mark / end'] + pkt_fdir = ["Ether(dst='00:11:22:33:44:55')/IP(src='192.168.0.20', id=47750)/Raw('X'*666)"] + p = re.compile(r"port\s+%s/queue\s+(\d+):\s+received\s+(\d+)\s+packets" % 0) self.logger.info('Subcase 1: exclusive validation fdir rule') self.launch_testpmd(param_fdir=True) @@ -377,11 +379,12 @@ class TestCvlIpFragmentRteFlow(TestCase): except Exception as e: self.logger.warning('Subcase 1 failed: %s' % e) result = False - hashes, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkt_fdir) - for queue in queues: - if '0x2' != queue: + out = self.fdirprocess.send_pkt_get_output(pkt_fdir) + res = p.findall(out) + for queue in res: + if queue[0][0].strip() != '2': result = False - self.logger.error('Error: queue index {} != 2'.format(queue)) + self.logger.error("Error: queue index {} != '2'".format(queue[0][0])) continue result_list.append(result) self.dut.send_expect("quit", "# ") @@ -395,11 +398,12 @@ class TestCvlIpFragmentRteFlow(TestCase): except Exception as e: self.logger.warning('Subcase 2 failed: %s' % e) result = False - hashes, queues = self.rssprocess.send_pkt_get_hash_queues(pkts=pkt_fdir) - for queue in queues: - if '0x2' != queue: + out = self.fdirprocess.send_pkt_get_output(pkt_fdir) + res = p.findall(out) + for queue in res: + if queue[0][0].strip() != '2': result = False - self.logger.error('Error: queue index {} != 2'.format(queue)) + self.logger.error("Error: queue index {} != '2'".format(queue[0][0])) continue result_list.append(result) self.dut.send_expect("quit", "# ") From patchwork Mon Nov 1 12:00:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Huang, ZhiminX" X-Patchwork-Id: 103280 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 2888DA0C55; Mon, 1 Nov 2021 04:31:58 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 23E9741104; Mon, 1 Nov 2021 04:31:58 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 5A02640DF6 for ; Mon, 1 Nov 2021 04:31:56 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10154"; a="231202985" X-IronPort-AV: E=Sophos;i="5.87,198,1631602800"; d="scan'208";a="231202985" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2021 20:31:56 -0700 X-IronPort-AV: E=Sophos;i="5.87,198,1631602800"; d="scan'208";a="637668855" Received: from unknown (HELO localhost.localdomain) ([10.240.183.103]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Oct 2021 20:31:54 -0700 From: Zhimin Huang To: dts@dpdk.org Cc: Zhimin Huang Date: Mon, 1 Nov 2021 20:00:56 +0800 Message-Id: <20211101120056.12228-5-zhiminx.huang@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20211101120056.12228-1-zhiminx.huang@intel.com> References: <20211101120056.12228-1-zhiminx.huang@intel.com> Subject: [dts] [PATCH V1 5/5] tests/rte_flow_common:modify flow common to adapt dpdk changed 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 Sender: "dts" 1.according to 54d78462344e2b3ec0a54cb6f13af0bf3da47032. the default rss not support ipfrag rss, need take a rss rule to enable ipfrag rss for fdir test. fix rte flow common code to adapt dts changed. Signed-off-by: Zhimin Huang --- tests/rte_flow_common.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tests/rte_flow_common.py b/tests/rte_flow_common.py index eae24e2e..fb76bf86 100644 --- a/tests/rte_flow_common.py +++ b/tests/rte_flow_common.py @@ -1252,6 +1252,11 @@ class FdirProcessing(object): drop = tv["check_param"].get("drop") # create rule self.test_case.dut.send_expect("flow flush %d" % port_id, "testpmd> ", 120) + rule_rss = [] + if "tv_mac_ipv4_frag_fdir" in tv['name']: + rule_rss = self.create_rule("flow create 0 ingress pattern eth / ipv4 / end actions rss types ipv4-frag end key_len 0 queues end / end") + elif "tv_mac_ipv6_frag_fdir" in tv['name']: + rule_rss = self.create_rule("flow create 0 ingress pattern eth / ipv6 / ipv6_frag_ext / end actions rss types ipv6-frag end key_len 0 queues end / end") rule_li = self.create_rule(tv["rule"]) # send and check match packets out1 = self.send_pkt_get_output(pkts=tv["scapy_str"]["matched"], port_id=port_id, drop=drop) @@ -1274,7 +1279,10 @@ class FdirProcessing(object): self.verify(matched_queue == matched_queue2 and None not in matched_queue, "send twice matched packet, received in deferent queues") # check not rule exists - self.check_rule(port_id=port_id, stats=False) + if rule_rss: + self.check_rule(port_id=tv["check_param"]["port_id"], rule_list=rule_rss) + else: + self.check_rule(port_id=port_id, stats=False) test_results[tv["name"]] = True self.logger.info((GREEN("case passed: %s" % tv["name"]))) except Exception as e: