test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lijuan Tu <lijuan.tu@intel.com>
To: dliu@iol.unh.edu, ohilyard@iol.unh.edu, alialnu@nvidia.com
Cc: dts@dpdk.org, Lijuan Tu <lijuan.tu@intel.com>
Subject: [dts] [v3 6/6] tests/nic_single_core_perf: revise rx desc size
Date: Wed, 31 Mar 2021 10:16:59 +0000
Message-ID: <20210331101659.506185-7-lijuan.tu@intel.com> (raw)
In-Reply-To: <20210331101659.506185-1-lijuan.tu@intel.com>

rx_desc_16byte uses  'y' indicates the rx descriptor size to 16B, and
other string for 32B. but 'y' is a reserved string in INI, misuse it
will casuse the write-back configurattion file can't be read correctly.
so rename rx_desc_16byte to rx_desc_size and the type is integer.

Signed-off-by: Lijuan Tu <lijuan.tu@intel.com>
---
 conf/nic_single_core_perf.cfg           |  4 +++-
 tests/TestSuite_nic_single_core_perf.py | 17 +++++++++--------
 2 files changed, 12 insertions(+), 9 deletions(-)

diff --git a/conf/nic_single_core_perf.cfg b/conf/nic_single_core_perf.cfg
index 72b8c533..7970995e 100644
--- a/conf/nic_single_core_perf.cfg
+++ b/conf/nic_single_core_perf.cfg
@@ -5,6 +5,8 @@
 # numbers, and the pattern is
 #    {'frame size': ['descriptor number #1', 'descriptor number #2']}
 #
+#  - rx_desc_size defines the rx descriptor size which is 16B or 32B.
+#
 #  - throughput_stat_sample_interval defines interval of get throughput
 #  statistics (second). If not set, it is 5 seconds by default.
 #
@@ -39,7 +41,7 @@
 update_expected = True
 test_parameters = {'1C/1T': {64: [512, 2048]},
                     '1C/2T': {64: [512, 2048]}}
-rx_desc_16byte = 'y'
+rx_desc_size = 16
 test_duration = 60
 throughput_stat_sample_interval = 2
 accepted_tolerance = 0.05
diff --git a/tests/TestSuite_nic_single_core_perf.py b/tests/TestSuite_nic_single_core_perf.py
index 8606f599..ee022054 100644
--- a/tests/TestSuite_nic_single_core_perf.py
+++ b/tests/TestSuite_nic_single_core_perf.py
@@ -58,13 +58,15 @@ class TestNicSingleCorePerf(TestCase):
                                  "Not required NIC ")
         self.headers_size = HEADER_SIZE['eth'] + HEADER_SIZE['ip']
 
-        self.rx_desc = self.get_suite_cfg()['rx_desc_16byte']
-        if 'y' == self.rx_desc:
+        self.rx_desc_size = self.get_suite_cfg().get('rx_desc_size', 32)
+        err_msg = "Rx desc only has 16B and 32B size, %d is not valid" % self.rx_desc_size
+        self.verify(self.rx_desc_size == 16 or self.rx_desc_size == 32, err_msg)
+        if self.rx_desc_size == 16:
             # 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})
+                self.dut.set_build_options({'RTE_LIBRTE_I40E_16BYTE_RX_DESC': 'y'})
             elif self.nic in ["columbiaville_100g", "columbiaville_25g", "columbiaville_25gx2"]:
-                self.dut.set_build_options({'RTE_LIBRTE_ICE_16BYTE_RX_DESC': self.rx_desc})
+                self.dut.set_build_options({'RTE_LIBRTE_ICE_16BYTE_RX_DESC': 'y'})
             self.dut.build_install_dpdk(self.target)
 
         # Based on h/w type, choose how many ports to use
@@ -417,11 +419,10 @@ class TestNicSingleCorePerf(TestCase):
         Run after each test suite.
         """
         # resume setting
-        if 'y' == self.rx_desc:
-            self.rx_desc = 'n'
+        if self.rx_desc_size == 16:
             if self.nic in ["fortville_25g", "fortville_spirit"]:
-                self.dut.set_build_options({'RTE_LIBRTE_I40E_16BYTE_RX_DESC': self.rx_desc})
+                self.dut.set_build_options({'RTE_LIBRTE_I40E_16BYTE_RX_DESC': 'n'})
             elif self.nic in ["columbiaville_100g", "columbiaville_25g", "columbiaville_25gx2"]:
-                self.dut.set_build_options({'RTE_LIBRTE_ICE_16BYTE_RX_DESC': self.rx_desc})
+                self.dut.set_build_options({'RTE_LIBRTE_ICE_16BYTE_RX_DESC': 'n'})
             self.dut.build_install_dpdk(self.target)
         self.dut.kill_all()
-- 
2.25.1


  parent reply	other threads:[~2021-03-31  2:18 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31 10:16 [dts] [v3 0/6] revise tests/nic_signle_core_perf Lijuan Tu
2021-03-31 10:16 ` [dts] [v3 1/6] tests/nic_single_core_perf: beauty JSON string Lijuan Tu
2021-03-31 10:16 ` [dts] [v3 2/6] tests/nic_single_core_perf: get better throughput stats Lijuan Tu
2021-03-31 10:16 ` [dts] [v3 3/6] tests/nic_single_core_perf: revise rst table Lijuan Tu
2021-03-31 10:16 ` [dts] [v3 4/6] tests/nic_single_core_perf: revise delta to ratio Lijuan Tu
2021-03-31 10:16 ` [dts] [v3 5/6] tests/nic_single_core_perf: add expected mpps into JSON Lijuan Tu
2021-03-31 10:16 ` Lijuan Tu [this message]
2021-06-17 13:39 ` [dts] [v3 0/6] revise tests/nic_signle_core_perf Ali Alnubani
2021-06-29  6:33   ` 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=20210331101659.506185-7-lijuan.tu@intel.com \
    --to=lijuan.tu@intel.com \
    --cc=alialnu@nvidia.com \
    --cc=dliu@iol.unh.edu \
    --cc=dts@dpdk.org \
    --cc=ohilyard@iol.unh.edu \
    /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

test suite reviews and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dts/0 dts/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dts dts/ https://inbox.dpdk.org/dts \
		dts@dpdk.org
	public-inbox-index dts

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dts


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git