From patchwork Tue Sep 1 10:33:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Mei, JianweiX" X-Patchwork-Id: 76185 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id AB998A04AC; Tue, 1 Sep 2020 04:08:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5D7571C0D2; Tue, 1 Sep 2020 04:08:57 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by dpdk.org (Postfix) with ESMTP id 9E3C71C0CF for ; Tue, 1 Sep 2020 04:08:55 +0200 (CEST) IronPort-SDR: GNiUw3yKpPlX+Uej28099lUgPnIBaf8XvWjsggRotiOOZIFexveT8ux9dcCLIhwd/a2aFtaLdu J/wRXBU6A42A== X-IronPort-AV: E=McAfee;i="6000,8403,9730"; a="137138661" X-IronPort-AV: E=Sophos;i="5.76,377,1592895600"; d="scan'208";a="137138661" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Aug 2020 19:08:53 -0700 IronPort-SDR: 40pKdO10QuhfoGUT1vcHnvbyTAzOrA3cifBBKKno7loln8OcWPQHq1EjPf3dDovAtKNL05V0Na kX7Mv4UWgqBA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,377,1592895600"; d="scan'208";a="314566535" Received: from unknown (HELO localhost.localdomain) ([10.240.183.106]) by orsmga002.jf.intel.com with ESMTP; 31 Aug 2020 19:08:51 -0700 From: Jianwei Mei To: dts@dpdk.org Cc: Jianwei Mei Date: Tue, 1 Sep 2020 10:33:49 +0000 Message-Id: <20200901103349.1438-1-jianweix.mei@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/cvl_switch_filter: hard code will have problems on 4 ports. X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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" Hard code has porblems on NIC 4 ports. Signed-off-by: Jianwei Mei Acked-by: Nannan Lu --- tests/TestSuite_cvl_switch_filter.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_cvl_switch_filter.py b/tests/TestSuite_cvl_switch_filter.py index 339dae6..a4509b3 100644 --- a/tests/TestSuite_cvl_switch_filter.py +++ b/tests/TestSuite_cvl_switch_filter.py @@ -4546,18 +4546,18 @@ class CVLSwitchFilterTest(TestCase): """ generate file with fdir rules to make fdir table full, then test switch filter """ - fdir_rule_number = 14336 + int(2048/(len(self.dut_ports))) + self.fdir_rule_number = 14336 + int(2048/(len(self.dut_ports))) src_file = 'dep/testpmd_cmds_rte_flow_fdir_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 > fdir_rule_number: + if not rule_count > self.fdir_rule_number: flows.write('flow create 0 ingress pattern eth / ipv4 src is 192.168.%d.%d dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end \n' % (i, j)) rule_count += 1 else: break - if rule_count > fdir_rule_number: + if rule_count > self.fdir_rule_number: break flows.close() self.dut_file_dir = '/tmp' @@ -4749,7 +4749,7 @@ class CVLSwitchFilterTest(TestCase): result = [i.group(1) for i in res] if is_non_pipeline: #remove 15360 fdir rules id - del result[:15360] + del result[:self.fdir_rule_number] if is_need_rss_rule: #remove rss rule id del result[0]