From patchwork Thu Dec 10 11:31:42 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: 84939 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 65288A04DB; Thu, 10 Dec 2020 12:28:59 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5F3D0BE75; Thu, 10 Dec 2020 12:28:58 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 0D2D9BC88 for ; Thu, 10 Dec 2020 12:28:54 +0100 (CET) IronPort-SDR: 4Q/CPY9nro2SCqwbFLvyBXmIZertKGsgBrXztT67cKyynpH9kDrjAdmdT6X+/pDEyV5f7meXhE 5R7nHLdH+mTw== X-IronPort-AV: E=McAfee;i="6000,8403,9830"; a="238344680" X-IronPort-AV: E=Sophos;i="5.78,408,1599548400"; d="scan'208";a="238344680" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2020 03:28:52 -0800 IronPort-SDR: MldoTf/7fWmgLN9d+0I63ZdlMnfgQQErPmknHKkbbUrHeldz+N4D1AXLTlozw8K5g/bZviinm8 MmpGVoux7zlg== X-IronPort-AV: E=Sophos;i="5.78,408,1599548400"; d="scan'208";a="542806037" Received: from unknown (HELO localhost.localdomain) ([10.240.183.80]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Dec 2020 03:28:51 -0800 From: Zhou Jun To: dts@dpdk.org Cc: Zhou Jun Date: Thu, 10 Dec 2020 19:31:42 +0800 Message-Id: <20201210113142.22199-1-junx.w.zhou@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/TestSuite_nvgre:Modify the hard coded appparameter 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" Modify the hard coded app parameter to call the platform interface Signed-off-by: Zhou Jun --- tests/TestSuite_nvgre.py | 46 +++++++++++++++++----------------------- 1 file changed, 20 insertions(+), 26 deletions(-) diff --git a/tests/TestSuite_nvgre.py b/tests/TestSuite_nvgre.py index 3bd76910..13018195 100644 --- a/tests/TestSuite_nvgre.py +++ b/tests/TestSuite_nvgre.py @@ -410,10 +410,7 @@ class TestNvgre(TestCase): self.verify(len(ports) >= 2, "Insufficient ports for testing") # Verify that enough threads are available - self.all_cores_mask = utils.create_mask(self.dut.get_core_list("all")) - cores = self.dut.get_core_list("1S/5C/1T") - self.verify(cores is not None, "Insufficient cores for speed testing") - self.coremask = utils.create_mask(cores) + # start testpmd self.pmdout = PmdOutput(self.dut) @@ -485,8 +482,9 @@ class TestNvgre(TestCase): """ send nvgre packet and check whether testpmd detect the correct packet type """ - out = self.dut.send_expect("%s -c %s -n %d -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s" - % (self.path, self.coremask, self.dut.get_memory_channels(), self.portmask), "testpmd>", 30) + self.eal_para = self.dut.create_eal_parameters(cores="1S/5C/1T") + out = self.dut.send_expect(r'%s %s -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s' + % (self.path, self.eal_para, self.portmask), "testpmd>", 30) out = self.dut.send_expect("set fwd rxonly", "testpmd>", 10) self.dut.send_expect("set verbose 1", "testpmd>", 10) @@ -571,8 +569,10 @@ class TestNvgre(TestCase): self.logger.info("chksums_ref:" + str(chksums_default)) # start testpmd with 2queue/1port - out = self.dut.send_expect("%s -c %s -n %d -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s --enable-rx-cksum" - % (self.path, self.coremask, self.dut.get_memory_channels(), self.portmask), "testpmd>", 30) + + self.eal_para = self.dut.create_eal_parameters(cores="1S/5C/1T") + out = self.dut.send_expect(r'%s %s -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s --enable-rx-cksum' + % (self.path, self.eal_para, self.portmask), "testpmd>", 30) # disable vlan filter self.dut.send_expect('vlan set filter off %d' % self.dut_rx_port, "testpmd") @@ -712,9 +712,9 @@ class TestNvgre(TestCase): def test_tunnel_filter(self): # verify tunnel filter feature - self.dut.send_expect("%s -c %s -n %d -- -i --disable-rss --rxq=%d --txq=%d --nb-cores=4 --portmask=%s" - % (self.path, self.coremask, self.dut.get_memory_channels(), - MAX_TXQ_RXQ, MAX_TXQ_RXQ, self.portmask), "testpmd>", 30) + self.eal_para = self.dut.create_eal_parameters(cores="1S/5C/1T") + self.dut.send_expect(r'%s %s -- -i --disable-rss --rxq=%d --txq=%d --nb-cores=4 --portmask=%s' + % (self.path, self.eal_para, MAX_TXQ_RXQ, MAX_TXQ_RXQ, self.portmask), "testpmd>", 30) self.dut.send_expect("set fwd rxonly", "testpmd>", 10) self.dut.send_expect("set verbose 1", "testpmd>", 10) @@ -790,8 +790,9 @@ class TestNvgre(TestCase): config = NvgreTestConfig(self) config.outer_mac_dst = self.dut_rx_port_mac - self.dut.send_expect("%s -c %s -n 4 -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s" - % (self.path, self.coremask, self.portmask), "testpmd>", 30) + self.eal_para = self.dut.create_eal_parameters(cores="1S/5C/1T") + self.dut.send_expect(r'%s %s -- -i --disable-rss --rxq=4 --txq=4 --nb-cores=4 --portmask=%s' + % (self.path, self.eal_para, self.portmask), "testpmd>", 30) self.dut.send_expect("set fwd rxonly", "testpmd>", 10) self.dut.send_expect("set verbose 1", "testpmd>", 10) @@ -881,10 +882,6 @@ class TestNvgre(TestCase): core_list = self.dut.get_core_list('1S/%dC/1T' % (self.tunnel_multiqueue * 2), socket=self.ports_socket) core_mask = utils.create_mask(core_list) - command_line = "%s -c %s -n %d -- -i --disable-rss --coremask=%s --rxq=4 --txq=4 --portmask=%s" % (self.path, - self.all_cores_mask, - self.dut.get_memory_channels(), - core_mask, self.portmask) for perf_config in self.tunnel_perf: pkts = [] config = NvgreTestConfig(self) @@ -895,7 +892,9 @@ class TestNvgre(TestCase): frame_size = config.pcap_len() # restart testpmd in each performance config - self.dut.send_expect(command_line, "testpmd> ", 100) + self.eal_para = self.dut.create_eal_parameters(cores="all") + self.dut.send_expect(r'%s %s -- -i --disable-rss --coremask=%s --rxq=4 --txq=4 --portmask=%s' + % (self.path, self.eal_para, core_mask, self.portmask), "testpmd>", 100) if perf_config['tunnel_filter'] != 'None': self.dut.send_expect("tunnel_filter add %d %s %s %s %d vxlan %s %d %d" % (self.dut_port, config.outer_mac_dst, config.inner_mac_dst, config.inner_ip_dst, config.inner_vlan, @@ -997,14 +996,9 @@ class TestNvgre(TestCase): core_list = self.dut.get_core_list(core_config) core_mask = utils.create_mask(core_list) - - command_line = "%s -c %s -n %d -- -i \ - --disable-rss --coremask=%s --portmask=%s" % (self.path, - all_cores_mask, - self.dut.get_memory_channels(), - core_mask, self.portmask) - - self.dut.send_expect(command_line, "testpmd> ", 100) + self.eal_para = self.dut.create_eal_parameters(cores="all") + self.dut.send_expect(r'%s %s -- -i --disable-rss --coremask=%s --rxq=4 --txq=4 --portmask=%s' + % (self.path, self.eal_para, core_mask, self.portmask), "testpmd>", 100) self.dut.send_expect("set fwd csum", "testpmd>", 10) # different calculate type