From: Yu Jiang <yux.jiang@intel.com>
To: lijuan.tu@intel.com, dts@dpdk.org
Cc: Yu Jiang <yux.jiang@intel.com>
Subject: [dts][PATCH V2] tests/vf_l2fwd:rebind interfaces to dpdk
Date: Mon, 16 Jan 2023 09:51:32 +0800 [thread overview]
Message-ID: <20230116015132.663834-1-yux.jiang@intel.com> (raw)
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
next reply other threads:[~2023-01-16 1:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-16 1:51 Yu Jiang [this message]
2023-01-29 1:46 ` lijuan.tu
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=20230116015132.663834-1-yux.jiang@intel.com \
--to=yux.jiang@intel.com \
--cc=dts@dpdk.org \
--cc=lijuan.tu@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).