From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 78712A04E7; Tue, 3 Nov 2020 04:06:14 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 364029B04; Tue, 3 Nov 2020 04:06:13 +0100 (CET) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id A1EE39B02 for ; Tue, 3 Nov 2020 04:06:10 +0100 (CET) IronPort-SDR: GNX5Tu+0SfmK1OInuad73ksPxsuKvE63MLSQ+4K3La8gHC9aunN9JEBAznULmpkn+g5Co5bvjx NhDegCqeBTEA== X-IronPort-AV: E=McAfee;i="6000,8403,9793"; a="155978339" X-IronPort-AV: E=Sophos;i="5.77,446,1596524400"; d="scan'208";a="155978339" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2020 19:06:08 -0800 IronPort-SDR: zrGIZA0AG3aEGrxVD/sJlYOx4DQCKgwrN0y/4+mcpjnfXKVkzAO+Pd+gwDPPGU60yNcJwU0WGB cCujmwktlxhg== X-IronPort-AV: E=Sophos;i="5.77,446,1596524400"; d="scan'208";a="538278949" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Nov 2020 19:06:07 -0800 From: lingwei To: dts@dpdk.org Cc: lingwei Date: Tue, 3 Nov 2020 19:02:32 +0800 Message-Id: <20201103110232.110606-1-weix.ling@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/dpdk_gro_lib:modify cbdma case set testpmd params after start vm 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 cbdma case set testpmd params after start vm Signed-off-by: lingwei --- tests/TestSuite_dpdk_gro_lib.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/tests/TestSuite_dpdk_gro_lib.py b/tests/TestSuite_dpdk_gro_lib.py index 1a4910a..ed3c810 100644 --- a/tests/TestSuite_dpdk_gro_lib.py +++ b/tests/TestSuite_dpdk_gro_lib.py @@ -163,11 +163,17 @@ class TestDPDKGROLib(TestCase): self.dut.send_expect('./usertools/dpdk-devbind.py --force --bind=igb_uio %s' % self.pci, '# ', 20) eal_param = self.dut.create_eal_parameters(cores=self.vhost_list, vdevs=["'net_vhost0,iface=%s/vhost-net,queues=%s,dmas=[%s],dmathr=1024'" % (self.base_dir, queue, self.dmas_info)]) self.testcmd_start = self.path + eal_param + " -- -i --txd=1024 --rxd=1024 --txq=2 --rxq=2" + self.vhost_user = self.dut.new_session(suite="user") + self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120) else: eal_param = self.dut.create_eal_parameters(cores=self.vhost_list, vdevs=['net_vhost0,iface=%s/vhost-net,queues=%s' % (self.base_dir, queue)]) self.testcmd_start = self.path + eal_param + " -- -i --enable-hw-vlan-strip --tx-offloads=0x00 --txd=1024 --rxd=1024" - self.vhost_user = self.dut.new_session(suite="user") - self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120) + self.vhost_user = self.dut.new_session(suite="user") + self.vhost_user.send_expect(self.testcmd_start, "testpmd> ", 120) + self.set_testpmd_params() + + def set_testpmd_params(self, mode=1): + # set testpmd params self.vhost_user.send_expect("set fwd csum", "testpmd> ", 120) self.vhost_user.send_expect("stop", "testpmd> ", 120) self.vhost_user.send_expect("port stop 0", "testpmd> ", 120) @@ -176,10 +182,10 @@ class TestDPDKGROLib(TestCase): self.vhost_user.send_expect("csum set ip hw 0", "testpmd> ", 120) self.vhost_user.send_expect("csum set tcp hw 1", "testpmd> ", 120) self.vhost_user.send_expect("csum set ip hw 1", "testpmd> ", 120) - if(mode == 1 or mode == 5): + if (mode == 1 or mode == 5): self.vhost_user.send_expect("set port 0 gro on", "testpmd> ", 120) self.vhost_user.send_expect("set gro flush 1", "testpmd> ", 120) - elif(mode == 2): + elif (mode == 2): self.vhost_user.send_expect("set port 0 gro on", "testpmd> ", 120) self.vhost_user.send_expect("set gro flush 2", "testpmd> ", 120) elif (mode == 3): @@ -456,9 +462,8 @@ class TestDPDKGROLib(TestCase): 'ifconfig %s %s up' % (self.vm1_intf, self.virtio_ip1), '#', 10) self.vm1_dut.send_expect('ethtool -L %s combined 2' % self.vm1_intf, '#', 10) - self.vm1_dut.send_expect( - 'ethtool -K %s gro off' % - (self.vm1_intf), '#', 10) + self.vm1_dut.send_expect('ethtool -K %s gro off' % (self.vm1_intf), '#', 10) + self.set_testpmd_params() self.vm1_dut.send_expect('iperf -s', '', 10) self.dut.send_expect('rm /root/iperf_client.log', '#', 10) out = self.dut.send_expect( -- 2.17.1