From: Wenjie Li <wenjiex.a.li@intel.com>
To: dts@dpdk.org
Cc: Wenjie Li <wenjiex.a.li@intel.com>
Subject: [dts] [PATCH V1] tests/ip_pipeline: change the config file
Date: Tue, 26 Mar 2019 14:34:00 +0800 [thread overview]
Message-ID: <1553582040-86433-1-git-send-email-wenjiex.a.li@intel.com> (raw)
1. install vfio-pci driver to VF before test
2. change the config file l2fwd.cli
Signed-off-by: Wenjie Li <wenjiex.a.li@intel.com>
---
tests/TestSuite_ip_pipeline.py | 19 +++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/tests/TestSuite_ip_pipeline.py b/tests/TestSuite_ip_pipeline.py
index 37f5e3f..390c69d 100644
--- a/tests/TestSuite_ip_pipeline.py
+++ b/tests/TestSuite_ip_pipeline.py
@@ -127,6 +127,7 @@ class TestIPPipeline(TestCase):
This is to set up vf environment.
The pf is bound to dpdk driver.
"""
+ self.dut.send_expect("modprobe vfio-pci","# ")
if driver == 'default':
for port_id in self.dut_ports:
port = self.dut.ports_info[port_id]['port']
@@ -488,13 +489,14 @@ class TestIPPipeline(TestCase):
VF l2fwd pipeline, PF bound to DPDK driver
"""
self.setup_env(self.port_nums, driver=self.drivername)
- cmd = "sed -i -e 's/0000:02:00.0/%s/' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[0][0].pci
+ self.dut.send_expect("sed -i '/^link LINK/d' ./examples/ip_pipeline/examples/l2fwd.cli", "# ", 20)
+ cmd = "sed -i '/mempool MEMPOOL0/a\link LINK3 dev %s rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[3][0].pci
self.dut.send_expect(cmd, "# ", 20)
- cmd = "sed -i -e 's/0000:02:00.1/%s/' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[1][0].pci
+ cmd = "sed -i '/mempool MEMPOOL0/a\link LINK2 dev %s rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[2][0].pci
self.dut.send_expect(cmd, "# ", 20)
- cmd = "sed -i -e 's/0000:06:00.0/%s/' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[2][0].pci
+ cmd = "sed -i '/mempool MEMPOOL0/a\link LINK1 dev %s rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[1][0].pci
self.dut.send_expect(cmd, "# ", 20)
- cmd = "sed -i -e 's/0000:06:00.1/%s/' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[3][0].pci
+ cmd = "sed -i '/mempool MEMPOOL0/a\link LINK0 dev %s rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[0][0].pci
self.dut.send_expect(cmd, "# ", 20)
TESTPMD = "./%s/app/testpmd" % self.target
@@ -569,13 +571,14 @@ class TestIPPipeline(TestCase):
VF l2fwd pipeline, PF bound to kernel driver
"""
self.setup_env(self.port_nums, driver='default')
- cmd = "sed -i -e 's/0000:02:00.0/%s/' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[0][0].pci
+ self.dut.send_expect("sed -i '/^link LINK/d' ./examples/ip_pipeline/examples/l2fwd.cli", "# ", 20)
+ cmd = "sed -i '/mempool MEMPOOL0/a\link LINK3 dev %s rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[3][0].pci
self.dut.send_expect(cmd, "# ", 20)
- cmd = "sed -i -e 's/0000:02:00.1/%s/' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[1][0].pci
+ cmd = "sed -i '/mempool MEMPOOL0/a\link LINK2 dev %s rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[2][0].pci
self.dut.send_expect(cmd, "# ", 20)
- cmd = "sed -i -e 's/0000:06:00.0/%s/' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[2][0].pci
+ cmd = "sed -i '/mempool MEMPOOL0/a\link LINK1 dev %s rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[1][0].pci
self.dut.send_expect(cmd, "# ", 20)
- cmd = "sed -i -e 's/0000:06:00.1/%s/' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[3][0].pci
+ cmd = "sed -i '/mempool MEMPOOL0/a\link LINK0 dev %s rxq 1 128 MEMPOOL0 txq 1 512 promiscuous on' ./examples/ip_pipeline/examples/l2fwd.cli" % self.sriov_vfs_port[0][0].pci
self.dut.send_expect(cmd, "# ", 20)
IP_PIPELINE = "./examples/ip_pipeline/build/ip_pipeline"
--
2.17.2
next reply other threads:[~2019-03-26 6:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-26 6:34 Wenjie Li [this message]
2019-03-26 7:55 ` Zhu, ShuaiX
2019-04-01 3:16 ` Li, WenjieX A
2019-04-03 16:52 ` Tu, Lijuan
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=1553582040-86433-1-git-send-email-wenjiex.a.li@intel.com \
--to=wenjiex.a.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).