From patchwork Thu Jul 29 13:49:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sun, QinX" X-Patchwork-Id: 96364 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 481E5A0C43; Thu, 29 Jul 2021 07:18:30 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64A4F40683; Thu, 29 Jul 2021 07:18:29 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id DCCAC4014D for ; Thu, 29 Jul 2021 07:18:27 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10059"; a="200022911" X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="200022911" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2021 22:18:25 -0700 X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="499623264" Received: from unknown (HELO localhost.localdomain) ([10.240.183.105]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2021 22:18:23 -0700 From: Qin Sun To: dts@dpdk.org Cc: Qin Sun Date: Thu, 29 Jul 2021 13:49:35 +0000 Message-Id: <20210729134935.4514-1-qinx.sun@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1 1/2] tests/cvl_limit_value_test: modify maximum value of switch rule 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" confirm with developer that CVL support up to 32K FLU entries.Firmware allocates some default entries first, the actual entries can't be calculated and depend on hardware. there is no formula to figure out the specific rule numbers of different environment configurations,so can't acquire the actual number of free entries. dts case needs to modify the maximum value of switch rule to a proper value Signed-off-by: Qin Sun Tested-by: Qin Sun --- tests/TestSuite_cvl_limit_value_test.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_cvl_limit_value_test.py b/tests/TestSuite_cvl_limit_value_test.py index 2d0ad412..f8224258 100644 --- a/tests/TestSuite_cvl_limit_value_test.py +++ b/tests/TestSuite_cvl_limit_value_test.py @@ -48,7 +48,7 @@ tv_max_rule_number = { "matched": {"scapy_str": [], "check_func": {"func": rfc.check_vf_rx_packets_number, "param": {"expect_port": 1}}, - "expect_results": {"expect_pkts": 32563}}, + "expect_results": {"expect_pkts": 32500}}, "mismatched": { "scapy_str": ['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.167.0.1")/TCP(sport=25,dport=23)/("X"*480)'], "check_func": {"func": rfc.check_vf_rx_packets_number, @@ -908,13 +908,13 @@ class TestCvlLimitValue(TestCase): # set up 4 vfs on 1 pf environment self.setup_1pf_vfs_env() - # create 32563 rules with the same pattern, but different input set to file + # create 32500 rules with the same pattern, but different input set to file src_file = 'dep/testpmd_cmds_32k_switch_rules' flows = open(src_file, mode='w') rule_count = 1 for i in range(0, 255): for j in range(0, 255): - if not rule_count > 32563: + if not rule_count > 32500: flows.write( 'flow create 0 ingress pattern eth / ipv4 src is 192.168.%d.%d / end actions vf id 1 / end \n' % ( i, j)) @@ -924,12 +924,12 @@ class TestCvlLimitValue(TestCase): rule_count += 1 else: break - if rule_count > 32563: + if rule_count > 32500: break flows.close() dut_file_dir = '/tmp/' self.dut.session.copy_file_to(src_file, dut_file_dir) - # launch testpmd with 32563 rules + # launch testpmd with 32500 rules vf0_pci = self.sriov_vfs_port_0[0].pci vf1_pci = self.sriov_vfs_port_0[1].pci all_eal_param = self.dut.create_eal_parameters(cores="1S/4C/1T", ports=[vf0_pci, vf1_pci], @@ -939,8 +939,8 @@ class TestCvlLimitValue(TestCase): self.testpmd_status = "running" self.dut.send_expect("set portlist 1", "testpmd> ", 15) self.dut.send_expect("set fwd rxonly", "testpmd> ", 15) - # check the rule list with 32563 rules - rule_list_num = list(range(0, 32563)) + # check the rule list with 32500 rules + rule_list_num = list(range(0, 32500)) rule_list = [str(x) for x in rule_list_num] self.check_switch_filter_rule_list(0, rule_list) # create other rules to make switch filter table full From patchwork Thu Jul 29 13:51:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sun, QinX" X-Patchwork-Id: 96365 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 D2B21A0C43; Thu, 29 Jul 2021 07:20:06 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C33B340683; Thu, 29 Jul 2021 07:20:06 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 5667E4014D for ; Thu, 29 Jul 2021 07:20:05 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10059"; a="200023050" X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="200023050" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2021 22:20:04 -0700 X-IronPort-AV: E=Sophos;i="5.84,278,1620716400"; d="scan'208";a="666205692" Received: from unknown (HELO localhost.localdomain) ([10.240.183.105]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2021 22:20:03 -0700 From: Qin Sun To: dts@dpdk.org Cc: Qin Sun Date: Thu, 29 Jul 2021 13:51:16 +0000 Message-Id: <20210729135116.4575-1-qinx.sun@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1 2/2] test_plans/cvl_limit_value_test: modify maximum value of switch rule 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" confirm with developer that CVL support up to 32K FLU entries. Firmware allocates some default entries first, the actual entries can't be calculated and depend on hardware. there is no formula to figure out the specific rule numbers of different environment configurations,so can't acquire the actual number of free entries. dts case needs to modify the maximum value of switch rule to a proper value Signed-off-by: Qin Sun Tested-by: Qin Sun --- test_plans/cvl_limit_value_test_test_plan.rst | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test_plans/cvl_limit_value_test_test_plan.rst b/test_plans/cvl_limit_value_test_test_plan.rst index 9cb0cf09..9fec36f2 100644 --- a/test_plans/cvl_limit_value_test_test_plan.rst +++ b/test_plans/cvl_limit_value_test_test_plan.rst @@ -556,14 +556,14 @@ Description: 32k switch filter rules can be created on a CVL card, and all PFs and VFs share the 32k rules. But the system will first create some MAC_VLAN rules in switch table, and as the number of rules increased, the hash conflicts in the switch filter table are increased, so we can -create a total of 32563 switch filter rules on a DCF. +create a total of 32500 switch filter rules on a DCF. -1. create 32563 rules with the same pattern, but different input set:: +1. create 32500 rules with the same pattern, but different input set:: testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 / end actions vf id 1 / end testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.1 / end actions vf id 1 / end ...... - testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.127.177 / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.127.114 / end actions vf id 1 / end testpmd> flow list 0 check the rules exist in the list. @@ -584,14 +584,14 @@ create a total of 32563 switch filter rules on a DCF. check the rule in step 2 not exists in the list. -4. send 32563 matched packets for rule 0-32562:: +4. send 32500 matched packets for rule 0-32499:: sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.0")/TCP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1")/TCP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) ...... - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.127.177")/TCP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.127.114")/TCP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) - check port 1 receive the 32563 packets. + check port 1 receive the 32500 packets. send 1 mismatched packet:: sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.167.0.1")/TCP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) @@ -604,4 +604,4 @@ create a total of 32563 switch filter rules on a DCF. testpmd> flow list 0 check the rules not exist in the list. - send 32563 matched packets, check the packets are not to port 1. + send 32500 matched packets, check the packets are not to port 1.