From: lingwei <weix.ling@intel.com>
To: dts@dpdk.org
Cc: lingwei <weix.ling@intel.com>
Subject: [dts] [PATCH V1] tests/TestSuite_vf_l3fwd:support dpdk meson build
Date: Thu, 13 Aug 2020 16:15:48 +0000 [thread overview]
Message-ID: <20200813161548.85740-1-weix.ling@intel.com> (raw)
support dpdk meson build
Signed-off-by: lingwei <weix.ling@intel.com>
---
tests/TestSuite_vf_l3fwd.py | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
diff --git a/tests/TestSuite_vf_l3fwd.py b/tests/TestSuite_vf_l3fwd.py
index 471fe61..60a2bea 100644
--- a/tests/TestSuite_vf_l3fwd.py
+++ b/tests/TestSuite_vf_l3fwd.py
@@ -69,14 +69,6 @@ class TestVfL3fwd(TestCase):
self.l3fwd_methods = ['lpm']
self.l3fwd_test_results = {'header': [], 'data': []}
- self.logger.info("Configure RX/TX descriptor to 2048, and re-build ./examples/l3fwd")
- self.dut.send_expect("sed -i -e 's/define RTE_TEST_RX_DESC_DEFAULT.*$/"
- + "define RTE_TEST_RX_DESC_DEFAULT 2048/' ./examples/l3fwd/l3fwd.h", "#", 20)
- self.dut.send_expect("sed -i -e 's/define RTE_TEST_TX_DESC_DEFAULT.*$/"
- + "define RTE_TEST_TX_DESC_DEFAULT 2048/' ./examples/l3fwd/l3fwd.h", "#", 20)
- out = self.dut.build_dpdk_apps("./examples/l3fwd")
- self.verify("Error" not in out, "compilation error 1")
- self.verify("No such file" not in out, "compilation error 2")
# set vf assign method and vf driver
self.vf_driver = self.get_suite_cfg()['vf_driver']
@@ -278,7 +270,8 @@ class TestVfL3fwd(TestCase):
for j in range(self.queue):
queue_config += "({0}, {1}, {2})," .format(i, j, core_list[m])
m += 1
- cmdline = "./examples/l3fwd/build/l3fwd -c {0} -n 4 {1} -- -p {2} --config '{3}' --parse-ptype". \
+ app_name = self.dut.apps_name['l3fwd']
+ cmdline = app_name + "-c {0} -n 4 {1} -- -p {2} --config '{3}' --parse-ptype". \
format(core_mask, eal_param, port_mask, queue_config)
self.perf_test(cmdline)
@@ -292,12 +285,14 @@ class TestVfL3fwd(TestCase):
return vf_driver
def test_perf_kernel_pf_dpdk_vf_perf_host_only(self):
+ self.set_rxtx_descriptor_2048_and_rebuild_l3fwd()
self.measure_vf_performance(host_driver='default', vf_driver=self.get_kernel_pf_vf_driver())
def test_perf_dpdk_pf_dpdk_vf_perf_host_only(self):
for idx in self.dut_ports:
self.verify(self.dut.ports_info[idx]['port'].default_driver != 'ice', 'Columbiaville do not support generate vfs from igb_uio')
+ self.set_rxtx_descriptor_2048_and_rebuild_l3fwd()
if self.drivername != "igb_uio":
self.logger.warning("Use igb_uio as host driver for testing instead of %s" % self.drivername)
@@ -313,7 +308,7 @@ class TestVfL3fwd(TestCase):
self.verify(self.dut.ports_info[idx]['port'].default_driver == 'i40e', 'The case is only designed for Fortville')
self.build_iavf()
- self.dut.build_dpdk_apps("./examples/l3fwd")
+ self.set_rxtx_descriptor_2048_and_rebuild_l3fwd()
self.measure_vf_performance(host_driver='default', vf_driver=self.get_kernel_pf_vf_driver())
def build_iavf(self):
@@ -327,6 +322,19 @@ class TestVfL3fwd(TestCase):
self.dut.send_expect("sed -i -e '/I40E_DEV_ID_VF/s/0x164C/0x154C/g' drivers/net/i40e/base/i40e_devids.h", "# ")
self.dut.build_install_dpdk(self.target)
+ def set_rxtx_descriptor_2048_and_rebuild_l3fwd(self):
+ """
+ Set RX/TX descriptor to 2048 and rebuild l3fwd
+ """
+ self.logger.info("Configure RX/TX descriptor to 2048, and re-build ./examples/l3fwd")
+ self.dut.send_expect("sed -i -e 's/define RTE_TEST_RX_DESC_DEFAULT.*$/"
+ + "define RTE_TEST_RX_DESC_DEFAULT 2048/' ./examples/l3fwd/l3fwd.h", "#", 20)
+ self.dut.send_expect("sed -i -e 's/define RTE_TEST_TX_DESC_DEFAULT.*$/"
+ + "define RTE_TEST_TX_DESC_DEFAULT 2048/' ./examples/l3fwd/l3fwd.h", "#", 20)
+ out = self.dut.build_dpdk_apps("./examples/l3fwd")
+ self.verify("Error" not in out, "compilation error 1")
+ self.verify("No such file" not in out, "compilation error 2")
+
def set_fields(self):
"""
set ip protocol field behavior
--
2.17.1
next reply other threads:[~2020-08-13 8:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 16:15 lingwei [this message]
2020-08-21 2:56 ` 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=20200813161548.85740-1-weix.ling@intel.com \
--to=weix.ling@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).