From patchwork Tue Dec 8 10:06:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhou, JunX W" X-Patchwork-Id: 84801 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 92F9AA09E5; Tue, 8 Dec 2020 11:04:01 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 84E2FC996; Tue, 8 Dec 2020 11:03:56 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 0CEDEC97C for ; Tue, 8 Dec 2020 11:03:54 +0100 (CET) IronPort-SDR: 64jfmoghcEV16uRMi4hwwwA0hSB3cO0SzUvBuuExMytRP1FU4j6RIs0lTepkZMu2Pi9fBd1r4o Ja8YfaHH15zQ== X-IronPort-AV: E=McAfee;i="6000,8403,9828"; a="171293389" X-IronPort-AV: E=Sophos;i="5.78,402,1599548400"; d="scan'208";a="171293389" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2020 02:03:53 -0800 IronPort-SDR: rQPBcPNPDpFaTdgZpWxfimsit8GTfiztVpx5XPRxdiort2MF2UWZ3sKrWbTFXAQngY9PUPZabX MMYPJZNY4K/Q== X-IronPort-AV: E=Sophos;i="5.78,402,1599548400"; d="scan'208";a="363575757" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2020 02:03:51 -0800 From: Zhou Jun To: dts@dpdk.org Cc: Zhou Jun Date: Tue, 8 Dec 2020 18:06:12 +0800 Message-Id: <20201208100627.9792-14-junx.w.zhou@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201208100627.9792-1-junx.w.zhou@intel.com> References: <20201208100627.9792-1-junx.w.zhou@intel.com> Subject: [dts] [dts 13/28] tests/TestSuite_metering_and_policing:Modify the hard coded app parameter to call the platform interface 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" Signed-off-by: Zhou Jun --- tests/TestSuite_metering_and_policing.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_metering_and_policing.py b/tests/TestSuite_metering_and_policing.py index c481d451..4dec3198 100644 --- a/tests/TestSuite_metering_and_policing.py +++ b/tests/TestSuite_metering_and_policing.py @@ -149,17 +149,16 @@ class TestMeteringAndPolicing(TestCase): """ if len(self.dut_ports) == 2: portmask = "0x4" - Corelist = "0x7" + Corelist = [0, 1, 2] Servicecorelist = "0x4" if len(self.dut_ports) == 4: portmask = "0x10" - Corelist = "0x1f" + Corelist = [0, 1, 2, 3, 4] Servicecorelist = "0x10" self.path = self.dut.apps_name['test-pmd'] - cmd = self.path + " -c %s -s %s -n %d --vdev 'net_softnic0,firmware=%s' \ - -- -i --rxq=%d --txq=%d --portmask=%s --disable-rss" \ - % (Corelist, Servicecorelist, self.dut.get_memory_channels(), filename, self.port_id, self.port_id, portmask) - self.dut.send_expect(cmd, "testpmd>", 60) + self.pmd_out.start_testpmd(Corelist, "--rxq=%d --txq=%d --portmask=%s --disable-rss" + % (self.port_id, self.port_id, portmask), + eal_param="-s %s --vdev 'net_softnic0,firmware=%s'" % (Servicecorelist, filename)) def add_port_meter_profile(self, profile_id, cbs=400, pbs=500): """ @@ -246,7 +245,6 @@ class TestMeteringAndPolicing(TestCase): Send packet and check the stats. If expect_port == -1, the packet should be dropped. """ # check the ports are UP before sending packets - self.pmd_out = PmdOutput(self.dut) res = self.pmd_out.wait_link_status_up('all', 30) self.verify(res is True, 'there have port link is down') @@ -314,6 +312,7 @@ class TestMeteringAndPolicing(TestCase): if len(self.dut_ports) == 4: self.dut_p2_pci = self.dut.get_port_pci(self.dut_ports[2]) self.dut_p3_pci = self.dut.get_port_pci(self.dut_ports[3]) + self.pmd_out = PmdOutput(self.dut) self.dut_p0_mac = self.dut.get_mac_address(self.dut_ports[0]) self.port_id = len(self.dut_ports) self.copy_config_files_to_dut()