test suite reviews and discussions
 help / color / mirror / Atom feed
From: lingwei <weix.ling@intel.com>
To: dts@dpdk.org
Cc: lingwei <weix.ling@intel.com>
Subject: [dts] [PATCH V1] tests/dpdk_gro_lib:modify cbdma case set testpmd params after start vm
Date: Tue,  3 Nov 2020 19:02:32 +0800	[thread overview]
Message-ID: <20201103110232.110606-1-weix.ling@intel.com> (raw)

modify cbdma case set testpmd params after start vm

Signed-off-by: lingwei <weix.ling@intel.com>
---
 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


             reply	other threads:[~2020-11-03  3:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-03 11:02 lingwei [this message]
2020-11-03  3:07 ` Ling, WeiX
2020-11-03  4:35 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201103110232.110606-1-weix.ling@intel.com \
    --to=weix.ling@intel.com \
    --cc=dts@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).