From: Weiyuan Li <weiyuanx.li@intel.com>
To: dts@dpdk.org
Cc: Weiyuan Li <weiyuanx.li@intel.com>
Subject: [dts][PATCH V1] tests/vf_interrupt_pmd: support eal_param -a to avoid running containers conflict
Date: Wed, 31 May 2023 14:41:13 +0000 [thread overview]
Message-ID: <20230531144113.200587-1-weiyuanx.li@intel.com> (raw)
Test suite interrupt case modification script supports eal_param -a to
avoid container conflicts.
Signed-off-by: Weiyuan Li <weiyuanx.li@intel.com>
---
tests/TestSuite_vf_interrupt_pmd.py | 17 +++++++++++------
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/tests/TestSuite_vf_interrupt_pmd.py b/tests/TestSuite_vf_interrupt_pmd.py
index 391b8f9b..249449c5 100644
--- a/tests/TestSuite_vf_interrupt_pmd.py
+++ b/tests/TestSuite_vf_interrupt_pmd.py
@@ -93,13 +93,14 @@ class TestVfInterruptPmd(TestCase):
self.host_intf = self.dut.ports_info[self.used_dut_port]["intf"]
self.dut.send_expect("ifconfig %s up" % self.host_intf, "#", 3)
- def begin_l3fwd_power(self, use_dut):
+ def begin_l3fwd_power(self, use_dut, vf_pci_addr):
"""
begin l3fwd-power
"""
cmd_vhost_net = (
self.path
- + "-n %d -c %s" % (use_dut.get_memory_channels(), self.core_mask_user)
+ + "-n %d -c %s -a %s"
+ % (use_dut.get_memory_channels(), self.core_mask_user, vf_pci_addr)
+ " -- -P -p 1 --config='(0,0,%s)'" % self.core_user
)
try:
@@ -114,7 +115,7 @@ class TestVfInterruptPmd(TestCase):
"ERROR: Failed to launch l3fwd-power sample: %s" % str(e)
)
- def begin_l3fwd_power_multi_queues(self, use_dut):
+ def begin_l3fwd_power_multi_queues(self, use_dut, pci_addr):
"""
begin l3fwd-power
"""
@@ -125,7 +126,7 @@ class TestVfInterruptPmd(TestCase):
config_info += "(0,%d,%d)" % (queue, queue)
cmd_vhost_net = (
self.path
- + "-l 0-%d -n 4 -- -P -p 0x1" % queue
+ + "-l 0-%d -n 4 -a %s -- -P -p 0x1" % (queue, pci_addr)
+ " --config='%s'" % config_info
)
try:
@@ -246,13 +247,15 @@ class TestVfInterruptPmd(TestCase):
self.used_dut_port_0 = self.dut_ports[0]
self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, 1, driver=driver)
self.sriov_vfs_port_0 = self.dut.ports_info[self.used_dut_port_0]["vfs_port"]
+ vf_pci_list = self.dut.ports_info[self.used_dut_port_0].get("sriov_vfs_pci")
+ vf_pci_addr = vf_pci_list[0] if vf_pci_list else ""
for port in self.sriov_vfs_port_0:
port.bind_driver("vfio-pci")
# set vf mac
self.dut.send_expect(
"ip link set %s vf 0 mac %s" % (self.host_intf, self.vf_mac), "# "
)
- self.begin_l3fwd_power(self.dut)
+ self.begin_l3fwd_power(self.dut, vf_pci_addr)
self.send_packet(self.vf_mac, self.rx_intf_0, self.dut)
self.verify(
"lcore %s is waked up from rx interrupt on port 0" % self.core_user
@@ -288,13 +291,15 @@ class TestVfInterruptPmd(TestCase):
self.used_dut_port_0 = self.dut_ports[0]
self.dut.generate_sriov_vfs_by_port(self.used_dut_port_0, 1, driver=driver)
self.sriov_vfs_port_0 = self.dut.ports_info[self.used_dut_port_0]["vfs_port"]
+ vf_pci_list = self.dut.ports_info[self.used_dut_port_0].get("sriov_vfs_pci")
+ vf_pci_addr = vf_pci_list[0] if vf_pci_list else ""
for port in self.sriov_vfs_port_0:
port.bind_driver("vfio-pci")
# set vf mac
self.dut.send_expect(
"ip link set %s vf 0 mac %s" % (self.host_intf, self.vf_mac), "# "
)
- self.begin_l3fwd_power_multi_queues(self.dut)
+ self.begin_l3fwd_power_multi_queues(self.dut, vf_pci_addr)
stroutput = ""
for ip in range(2, 30):
self.send_packet_loop(self.vf_mac, self.rx_intf_0, self.dut, ip)
--
2.34.1
next reply other threads:[~2023-05-31 6:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-31 14:41 Weiyuan Li [this message]
2023-06-07 7:53 ` 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=20230531144113.200587-1-weiyuanx.li@intel.com \
--to=weiyuanx.li@intel.com \
--cc=dts@dpdk.org \
/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).