test suite reviews and discussions
 help / color / mirror / Atom feed
From: Weiyuan Li <weiyuanx.li@intel.com>
To: dts@dpdk.org, yuan.peng@intel.com
Cc: Weiyuan Li <weiyuanx.li@intel.com>
Subject: [dts][PATCH V1 1/2] tests/vf_daemon: add step dpdk pf set mtu value.
Date: Mon,  7 Mar 2022 10:26:27 +0800	[thread overview]
Message-ID: <20220307022628.3829950-1-weiyuanx.li@intel.com> (raw)

1.Optimizing vf_mtu case does not require driving the VM1 virtual
system.
2.Add step DPDK PF set MTU valuei.
 
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 tests/TestSuite_vf_daemon.py | 37 ++++++++++++++++++++++--------------
 1 file changed, 23 insertions(+), 14 deletions(-)

diff --git a/tests/TestSuite_vf_daemon.py b/tests/TestSuite_vf_daemon.py
index 19cecddf..51e61720 100644
--- a/tests/TestSuite_vf_daemon.py
+++ b/tests/TestSuite_vf_daemon.py
@@ -50,7 +50,6 @@ class TestVfDaemon(TestCase):
     supported_vf_driver = ['pci-stub', 'vfio-pci']
 
     def set_up_all(self):
-
         self.dut_ports = self.dut.get_ports(self.nic)
         self.verify(len(self.dut_ports) >= 1, "Insufficient ports")
         self.vm0 = None
@@ -126,17 +125,19 @@ class TestVfDaemon(TestCase):
         self.vm0_testpmd = PmdOutput(self.vm0_dut)
 
         vf1_prop = {'opt_host': self.sriov_vfs_port[1].pci}
-        self.vm1 = QEMUKvm(self.dut, 'vm1', 'vf_daemon')
-        self.vm1.set_vm_device(driver=self.vf_assign_method, **vf1_prop)
-        try:
-            self.vm1_dut = self.vm1.start()
-            if self.vm1_dut is None:
-                raise Exception("Set up VM1 ENV failed!")
-        except Exception as e:
-            self.destroy_vm_env()
-            raise Exception(e)
-        self.vm1_dut_ports = self.vm1_dut.get_ports('any')
-        self.vm1_testpmd = PmdOutput(self.vm1_dut)
+
+        if self.running_case != 'test_vf_mtu':
+            self.vm1 = QEMUKvm(self.dut, 'vm1', 'vf_daemon')
+            self.vm1.set_vm_device(driver=self.vf_assign_method, **vf1_prop)
+            try:
+                self.vm1_dut = self.vm1.start()
+                if self.vm1_dut is None:
+                    raise Exception("Set up VM1 ENV failed!")
+            except Exception as e:
+                self.destroy_vm_env()
+                raise Exception(e)
+            self.vm1_dut_ports = self.vm1_dut.get_ports('any')
+            self.vm1_testpmd = PmdOutput(self.vm1_dut)
         
         self.env_done = True
         self.dut_testpmd.quit()
@@ -372,6 +373,12 @@ class TestVfDaemon(TestCase):
         self.tester.send_expect("ifconfig %s mtu 9000" % self.tester_intf, "#")
         self.check_vf_link_status()
         time.sleep(10)
+        self.dut_testpmd.execute_cmd("port stop all")
+        self.dut_testpmd.execute_cmd("port config mtu 0 9000")
+        self.dut_testpmd.execute_cmd("port start all")
+        out = self.dut_testpmd.execute_cmd("show port info 0")
+        self.verify("MTU: 9000" in out, "DPDK PF SET MTU FAILED!")
+
         self.vf0_mac = self.vm0_testpmd.get_port_mac(0)
 
         self.vm0_testpmd.execute_cmd('set fwd mac')
@@ -753,11 +760,13 @@ class TestVfDaemon(TestCase):
 
     def tear_down(self):
         self.vm0_testpmd.quit()
-        self.vm1_testpmd.quit()
+        if self.running_case != 'test_vf_mtu':
+            self.vm1_testpmd.quit()
         self.dut_testpmd.quit()
         time.sleep(3)
         self.vm0_dut.kill_all()
-        self.vm1_dut.kill_all()
+        if self.running_case != 'test_vf_mtu':
+            self.vm1_dut.kill_all()
 
 
     def tear_down_all(self):
-- 
2.27.0


             reply	other threads:[~2022-03-07  2:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-07  2:26 Weiyuan Li [this message]
2022-03-07  2:26 ` [dts][PATCH V1 2/2] test_plan/vf_daemon: sync add step dpdk pf set mtu Weiyuan Li

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=20220307022628.3829950-1-weiyuanx.li@intel.com \
    --to=weiyuanx.li@intel.com \
    --cc=dts@dpdk.org \
    --cc=yuan.peng@intel.com \
    /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).