diff mbox series

[V1,2/2] tests/vf_smoke modify ixgbe support vf jumbo verify.

Message ID 20220509074639.4135273-2-weiyuanx.li@intel.com (mailing list archive)
State Superseded
Headers show
Series [V1,1/2] tests/smoke_base modify ixgbe support vf jumbo verify. | expand

Checks

Context Check Description
ci/Intel-dts-format-test success Testing OK
ci/Intel-dts-pylama-test success Testing OK
ci/Intel-dts-suite-test fail Testing issues

Commit Message

Li, WeiyuanX May 9, 2022, 7:46 a.m. UTC
Modify script supports set PF MTU for ixgbe driver.

Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
 tests/TestSuite_vf_smoke.py | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

Comments

Lingli Chen May 10, 2022, 2:46 a.m. UTC | #1
> -----Original Message-----
> From: Weiyuan Li <weiyuanx.li@intel.com>
> Sent: Monday, May 9, 2022 3:47 PM
> To: dts@dpdk.org; Peng, Yuan <yuan.peng@intel.com>
> Cc: Li, WeiyuanX <weiyuanx.li@intel.com>
> Subject: [dts][PATCH V1 2/2] tests/vf_smoke modify ixgbe support vf jumbo
> verify.
> 
> Modify script supports set PF MTU for ixgbe driver.
> 
> Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
> ---

Tested-by: Lingli Chen <linglix.chen@intel.com>
diff mbox series

Patch

diff --git a/tests/TestSuite_vf_smoke.py b/tests/TestSuite_vf_smoke.py
index e4f0c31b..685a54a0 100644
--- a/tests/TestSuite_vf_smoke.py
+++ b/tests/TestSuite_vf_smoke.py
@@ -32,6 +32,7 @@ 
 from framework.packet import Packet
 from framework.pmd_output import PmdOutput
 from framework.test_case import TestCase
+from framework.utils import RED
 
 from .smoke_base import (
     DEFAULT_MTU_VALUE,
@@ -74,6 +75,7 @@  class TestVfSmoke(TestCase):
 
         # generate vf
         self.dut.bind_interfaces_linux(self.kdriver)
+        self.set_pf_mtu()
         self.dut.generate_sriov_vfs_by_port(self.smoke_dut_ports[0], 1, self.kdriver)
         self.vf_ports = self.dut.ports_info[self.smoke_dut_ports[0]]["vfs_port"]
         self.verify(len(self.vf_ports) != 0, "VF create failed")
@@ -121,6 +123,12 @@  class TestVfSmoke(TestCase):
         if out == "" or "No such file or directory" in out:
             self.vf_launch_dpdk_app()
 
+    def set_pf_mtu(self):
+        self.dut.send_expect(f"ifconfig {self.pf_interface} mtu {JUMBO_FRAME_LENGTH}", "# ")
+        out = self.dut.send_expect(f"ip link show {self.pf_interface}", "# ")
+        if '9000' not in out:
+            print(RED("Please set mtu for case vf_jumbo_frames case!"))
+
     def vf_launch_dpdk_app(self):
         self.pmd_out.start_testpmd(cores=self.cores, ports=self.ports, param=self.param)
 
@@ -137,7 +145,7 @@  class TestVfSmoke(TestCase):
         self.dut.send_expect("set fwd mac", "testpmd> ")
         self.dut.send_expect("start", "testpmd> ")
         self.pmd_out.wait_link_status_up(self.smoke_dut_ports[0])
-        result = self.test_func.check_jumbo_frames()
+        result = self.test_func.check_jumbo_frames(self.kdriver)
         self.verify(result, "enable disable jumbo frames failed")
 
     def test_vf_rss(self):