test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V2 1/2] tests/vf_daemon: add step dpdk pf set mtu value.
@ 2022-03-07  3:15 Weiyuan Li
  2022-03-07  3:15 ` [dts][PATCH V2 2/2] test_plan/vf_daemon: sync add step dpdk pf set mtu Weiyuan Li
  0 siblings, 1 reply; 3+ messages in thread
From: Weiyuan Li @ 2022-03-07  3:15 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

1.Optimize vf_mtu case does not require driving the VM1 virtual
system.
2.According to dpdk22.03-rc1 commit a4ba773679 net/i40e: enable maximum frame size at port level,
add step DPDK PF set mtu value.
 
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---

v2:
-Modify comment description.

 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dts][PATCH V2 2/2] test_plan/vf_daemon: sync add step dpdk pf set mtu.
  2022-03-07  3:15 [dts][PATCH V2 1/2] tests/vf_daemon: add step dpdk pf set mtu value Weiyuan Li
@ 2022-03-07  3:15 ` Weiyuan Li
  2022-03-11 12:14   ` Tu, Lijuan
  0 siblings, 1 reply; 3+ messages in thread
From: Weiyuan Li @ 2022-03-07  3:15 UTC (permalink / raw)
  To: dts, yuan.peng; +Cc: Weiyuan Li

Sync test plan add step dpdk pf set mtu value.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---

v2:
-Modify comment description.

 test_plans/vf_daemon_test_plan.rst | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/test_plans/vf_daemon_test_plan.rst b/test_plans/vf_daemon_test_plan.rst
index cb7fb41d..42c679ac 100644
--- a/test_plans/vf_daemon_test_plan.rst
+++ b/test_plans/vf_daemon_test_plan.rst
@@ -301,23 +301,29 @@ Test Case 9: Show/Clear stats for VF from PF
 
 Test Case 10: enhancement to identify VF MTU change
 ===================================================
-1. Set VF0 in mac forwarding mode and start testpmd
+1. Set DPDK PF mtu size is 9000.
 
-2. Default mtu size is 1500, send one packet with length bigger than default
+      testpmd> port stop all
+      testpmd> port config mtu 0 9000
+      testpmd> port start all
+
+2. Set VF0 in mac forwarding mode and start testpmd
+
+3. Default mtu size is 1500, send one packet with length bigger than default
    mtu size, such as 2000 from tester, check VF0 can receive but can't transmit
    packet
 
-3. Set VF0 mtu size as 3000, but need to stop then restart port to active mtu::
+4. Set VF0 mtu size as 3000, but need to stop then restart port to active mtu::
 
       testpmd> port stop all
       testpmd> port config mtu 0 3000
       testpmd> port start all
       testpmd> start
 
-4. Send one packet with length 2000 from tester, check VF0 can receive and
+5. Send one packet with length 2000 from tester, check VF0 can receive and
    transmit packet
 
-5. Send one packet with length bigger than configured mtu size, such as 5000
+6. Send one packet with length bigger than configured mtu size, such as 5000
    from tester, check VF0 can receive but can't transmit packet
 
 
-- 
2.27.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: [dts][PATCH V2 2/2] test_plan/vf_daemon: sync add step dpdk pf set mtu.
  2022-03-07  3:15 ` [dts][PATCH V2 2/2] test_plan/vf_daemon: sync add step dpdk pf set mtu Weiyuan Li
@ 2022-03-11 12:14   ` Tu, Lijuan
  0 siblings, 0 replies; 3+ messages in thread
From: Tu, Lijuan @ 2022-03-11 12:14 UTC (permalink / raw)
  To: Li, WeiyuanX, dts, Peng, Yuan; +Cc: Li, WeiyuanX

> -----Original Message-----
> From: Weiyuan Li <weiyuanx.li@intel.com>
> Sent: 2022年3月7日 11:15
> To: dts@dpdk.org; Peng, Yuan <yuan.peng@intel.com>
> Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
> Subject: [dts][PATCH V2 2/2] test_plan/vf_daemon: sync add step dpdk pf set
> mtu.
> 
> Sync test plan add step dpdk pf set mtu value.
> 
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>

Series applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-03-11 12:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-07  3:15 [dts][PATCH V2 1/2] tests/vf_daemon: add step dpdk pf set mtu value Weiyuan Li
2022-03-07  3:15 ` [dts][PATCH V2 2/2] test_plan/vf_daemon: sync add step dpdk pf set mtu Weiyuan Li
2022-03-11 12:14   ` Tu, Lijuan

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).