test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts][PATCH V2] tests/vf_l2fwd:rebind interfaces to dpdk
@ 2023-01-16  1:51 Yu Jiang
  2023-01-29  1:46 ` lijuan.tu
  0 siblings, 1 reply; 2+ messages in thread
From: Yu Jiang @ 2023-01-16  1:51 UTC (permalink / raw)
  To: lijuan.tu, dts; +Cc: Yu Jiang

rebind interfaces to dpdk to avoid impacting pf suite

Signed-off-by: Yu Jiang <yux.jiang@intel.com>
---
 tests/TestSuite_vf_l2fwd.py | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)

V2: format.sh this suite

diff --git a/tests/TestSuite_vf_l2fwd.py b/tests/TestSuite_vf_l2fwd.py
index 542838c6..3bac3744 100644
--- a/tests/TestSuite_vf_l2fwd.py
+++ b/tests/TestSuite_vf_l2fwd.py
@@ -36,6 +36,7 @@ class TestVfL2fwd(TestCase):
             len(self.dut_ports) >= self.number_of_ports,
             "Not enough ports for " + self.nic,
         )
+        self.vf_ports = ""
         self.ports_socket = self.dut.get_numa_id(self.dut_ports[0])
         # compile
         out = self.dut.build_dpdk_apps("./examples/l2fwd")
@@ -64,7 +65,8 @@ class TestVfL2fwd(TestCase):
         self.verify(len(self.sriov_vfs_port_0) != 0, "VF create failed")
         self.dut.generate_sriov_vfs_by_port(self.dut_ports[1], 1, self.kdriver)
         self.sriov_vfs_port_1 = self.dut.ports_info[self.dut_ports[1]]["vfs_port"]
-        self.vf_ports = [self.sriov_vfs_port_0[0].pci, self.sriov_vfs_port_1[0].pci]
+        self.vf_ports = [self.dut_ports[0], self.dut_ports[1]]
+        self.vf_ports_pci = [self.sriov_vfs_port_0[0].pci, self.sriov_vfs_port_1[0].pci]
         for port in self.sriov_vfs_port_0 + self.sriov_vfs_port_1:
             port.bind_driver(self.drivername)
 
@@ -82,7 +84,9 @@ class TestVfL2fwd(TestCase):
         # the cases use the first two ports
         port_mask = utils.create_mask([self.dut_ports[0], self.dut_ports[1]])
         cores = self.dut.get_core_list(self.core_config, socket=self.ports_socket)
-        eal_params = self.dut.create_eal_parameters(cores=cores, ports=self.vf_ports)
+        eal_params = self.dut.create_eal_parameters(
+            cores=cores, ports=self.vf_ports_pci
+        )
         for queues in self.test_queues:
             command_line = "./%s  %s -- -q %s -p %s &" % (
                 self.app_l2fwd_path,
@@ -133,4 +137,8 @@ class TestVfL2fwd(TestCase):
         """
         Run after each test suite.
         """
-        pass
+        self.dut.kill_all()
+        if self.vf_ports:
+            for item in self.vf_ports:
+                self.dut.destroy_sriov_vfs_by_port(item)
+        self.dut.bind_interfaces_linux(self.drivername)
-- 
2.25.1


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

* [dts][PATCH V2] tests/vf_l2fwd:rebind interfaces to dpdk
  2023-01-16  1:51 [dts][PATCH V2] tests/vf_l2fwd:rebind interfaces to dpdk Yu Jiang
@ 2023-01-29  1:46 ` lijuan.tu
  0 siblings, 0 replies; 2+ messages in thread
From: lijuan.tu @ 2023-01-29  1:46 UTC (permalink / raw)
  To: lijuan.tu, dts, Yu Jiang; +Cc: Yu Jiang

On Mon, 16 Jan 2023 09:51:32 +0800, Yu Jiang <yux.jiang@intel.com> wrote:
> rebind interfaces to dpdk to avoid impacting pf suite
> 
> Signed-off-by: Yu Jiang <yux.jiang@intel.com>


Applied, thanks

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

end of thread, other threads:[~2023-01-29  1:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-16  1:51 [dts][PATCH V2] tests/vf_l2fwd:rebind interfaces to dpdk Yu Jiang
2023-01-29  1:46 ` lijuan.tu

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