From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8AEFFA04B0; Thu, 13 Aug 2020 10:25:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 498351C022; Thu, 13 Aug 2020 10:25:27 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id 1D1DD1C020 for ; Thu, 13 Aug 2020 10:25:24 +0200 (CEST) IronPort-SDR: kgfEv+06RfOfnRRu89HhqS634VVQIgnkOB1V1CAZLzzWbJTyStj3hvDkw5NtEFZVwr9vCA4PAU 0OL3zItK6Ylw== X-IronPort-AV: E=McAfee;i="6000,8403,9711"; a="154143736" X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="154143736" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 Aug 2020 01:25:23 -0700 IronPort-SDR: XzWmbrz/iLiTEJc7N3hrJA6iBIBQD1rkgF4J4b/5OQXpFd6Hzm4qQoly+MKf6VFOHLEZiL0EJR 29meIl2d5O5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,307,1592895600"; d="scan'208";a="399096710" Received: from unknown (HELO localhost.localdomain) ([10.240.183.222]) by fmsmga001.fm.intel.com with ESMTP; 13 Aug 2020 01:25:22 -0700 From: lingwei To: dts@dpdk.org Cc: lingwei Date: Thu, 13 Aug 2020 16:15:48 +0000 Message-Id: <20200813161548.85740-1-weix.ling@intel.com> X-Mailer: git-send-email 2.17.1 Subject: [dts] [PATCH V1] tests/TestSuite_vf_l3fwd:support dpdk meson build X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" support dpdk meson build Signed-off-by: lingwei --- 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