test suite reviews and discussions
 help / color / mirror / Atom feed
From: hanyingya <yingyax.han@intel.com>
To: dts@dpdk.org
Cc: hanyingya <yingyax.han@intel.com>
Subject: [dts] [PATCH V1]tests/nic_single_core:rework 16byte configuration
Date: Thu, 29 Oct 2020 13:52:41 +0800	[thread overview]
Message-ID: <20201029055241.44633-1-yingyax.han@intel.com> (raw)

rework 16byte configuration to adapt to the new version of DPDK.

Signed-off-by: hanyingya <yingyax.han@intel.com>
---
 conf/nic_single_core_perf.cfg           |  1 +
 tests/TestSuite_nic_single_core_perf.py | 32 ++++++++++---------------
 2 files changed, 14 insertions(+), 19 deletions(-)

diff --git a/conf/nic_single_core_perf.cfg b/conf/nic_single_core_perf.cfg
index e7bf3b28..4d3279ba 100644
--- a/conf/nic_single_core_perf.cfg
+++ b/conf/nic_single_core_perf.cfg
@@ -32,6 +32,7 @@
 update_expected = True
 test_parameters = {'1C/1T': {64: [512, 2048]},
                     '1C/2T': {64: [512, 2048]}}
+rx_desc_16byte = 'y'
 test_duration = 60
 accepted_tolerance = 1
 expected_throughput = {
diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py
index e93ee46e..eb42fb30 100644
--- a/tests/TestSuite_nic_single_core_perf.py
+++ b/tests/TestSuite_nic_single_core_perf.py
@@ -57,16 +57,13 @@ class TestNicSingleCorePerf(TestCase):
                                  "Not required NIC ")
         self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE['ip']
 
-        # Update DPDK config file and rebuild to get best perf on fortville
-        if self.nic in ["fortville_25g", "fortville_spirit"]:
-            self.dut.send_expect(
-                "sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=y/' ./config/common_base", "#", 20)
-            self.dut.set_build_options({'RTE_LIBRTE_I40E_16BYTE_RX_DESC': 'y'})
-            self.dut.build_install_dpdk(self.target)
-        elif self.nic in ["columbiaville_100g", "columbiaville_25g"]:
-            self.dut.send_expect(
-                "sed -i -e 's/CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC=n/CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC=y/' ./config/common_base", "#", 20)
-            self.dut.set_build_options({'RTE_LIBRTE_ICE_16BYTE_RX_DESC': 'y'})
+        self.rx_desc = self.get_suite_cfg()['rx_desc_16byte']
+        if 'y' == self.rx_desc:
+            # Update DPDK config file and rebuild to get best perf on fortville
+            if self.nic in ["fortville_25g", "fortville_spirit"]:
+                self.dut.set_build_options({'RTE_LIBRTE_I40E_16BYTE_RX_DESC': self.rx_desc})
+            elif self.nic in ["columbiaville_100g", "columbiaville_25g"]:
+                self.dut.set_build_options({'RTE_LIBRTE_ICE_16BYTE_RX_DESC': self.rx_desc})
             self.dut.build_install_dpdk(self.target)
 
         # Based on h/w type, choose how many ports to use
@@ -395,14 +392,11 @@ class TestNicSingleCorePerf(TestCase):
         Run after each test suite.
         """
         # resume setting
-        if self.nic in ["fortville_25g", "fortville_spirit"]:
-            self.dut.send_expect(
-                "sed -i -e 's/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=y/CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n/' ./config/common_base", "#", 20)
-            self.dut.set_build_options({'RTE_LIBRTE_I40E_16BYTE_RX_DESC': 'n'})
-            self.dut.build_install_dpdk(self.target)
-        elif self.nic in ["columbiaville_100g", "columbiaville_25g"]:
-            self.dut.send_expect(
-                "sed -i -e 's/CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC=y/CONFIG_RTE_LIBRTE_ICE_16BYTE_RX_DESC=n/' ./config/common_base", "#", 20)
-            self.dut.set_build_options({'RTE_LIBRTE_ICE_16BYTE_RX_DESC': 'n'})
+        if 'y' == self.rx_desc:
+            self.rx_desc = 'n'
+            if self.nic in ["fortville_25g", "fortville_spirit"]:
+                self.dut.set_build_options({'RTE_LIBRTE_I40E_16BYTE_RX_DESC': self.rx_desc})
+            elif self.nic in ["columbiaville_100g", "columbiaville_25g"]:
+                self.dut.set_build_options({'RTE_LIBRTE_ICE_16BYTE_RX_DESC': self.rx_desc})
             self.dut.build_install_dpdk(self.target)
         self.dut.kill_all()
-- 
2.17.1


             reply	other threads:[~2020-10-29  5:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-29  5:52 hanyingya [this message]
2020-11-03  2:49 ` 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=20201029055241.44633-1-yingyax.han@intel.com \
    --to=yingyax.han@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).