[V1] l3fwd: make RX and TX queue size configurable

Message ID 20220311032529.1384459-1-yingyax.han@intel.com (mailing list archive)
State Accepted
Headers
Series [V1] l3fwd: make RX and TX queue size configurable |

Checks

Context Check Description
ci/Intel-dts-suite-test warning SKIPPED

Commit Message

Yingya Han March 11, 2022, 3:25 a.m. UTC
make RX and TX queue sizes configurable from the command line.
please refer to dpdk commit 8efffaec56e30ed92c2c3f6.

Signed-off-by: hanyingya <yingyax.han@intel.com>
---
 conf/l3fwd.cfg                              |  5 +++-
 conf/l3fwd_em.cfg                           |  5 +++-
 conf/l3fwd_lpm_ipv4.cfg                     |  5 +++-
 conf/l3fwd_lpm_ipv4_rfc2544.cfg             |  5 +++-
 conf/l3fwd_lpm_ipv6.cfg                     |  5 +++-
 conf/vf_l3fwd_em_kernelpf.cfg               |  1 +
 conf/vf_l3fwd_kernelpf.cfg                  |  5 +++-
 conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg         |  1 +
 conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg |  1 +
 conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg         |  1 +
 tests/perf_test_base.py                     | 28 ++++++---------------
 11 files changed, 35 insertions(+), 27 deletions(-)
  

Comments

Tu, Lijuan March 15, 2022, 3:06 a.m. UTC | #1
> -----Original Message-----
> From: hanyingya <yingyax.han@intel.com>
> Sent: 2022年3月11日 11:25
> To: dts@dpdk.org
> Cc: Han, YingyaX <yingyax.han@intel.com>
> Subject: [dts][PATCH V1]l3fwd: make RX and TX queue size configurable
> 
> make RX and TX queue sizes configurable from the command line.
> please refer to dpdk commit 8efffaec56e30ed92c2c3f6.
> 
> Signed-off-by: hanyingya <yingyax.han@intel.com>

Reviewed-by: Lijuan Tu <lijuan.tu@intel.com>

Applied, thanks
  

Patch

diff --git a/conf/l3fwd.cfg b/conf/l3fwd.cfg
index 1e3e1ca8..5801acd3 100644
--- a/conf/l3fwd.cfg
+++ b/conf/l3fwd.cfg
@@ -12,6 +12,8 @@ 
 #       ......
 #   }
 #
+#  - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size".
+#
 #  - test_duration is how many seconds each combination performance will
 #  be recorded, default is 60s
 #
@@ -56,6 +58,7 @@ 
 update_expected = True
 
 port_list=None
+rxtx_queue_size = None
 test_duration = 12
 accepted_tolerance = 1
 test_parameters = {
@@ -401,4 +404,4 @@  expected_rfc2544 = {
                 '512': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } },
                 '1024': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } },
                 '1280': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } },
-                '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},}
\ No newline at end of file
+                '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},}
diff --git a/conf/l3fwd_em.cfg b/conf/l3fwd_em.cfg
index 63923454..cfbf4e61 100644
--- a/conf/l3fwd_em.cfg
+++ b/conf/l3fwd_em.cfg
@@ -9,6 +9,8 @@ 
 #       ......
 #   }
 #
+#  - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size".
+#
 #  - test_duration is how many seconds each combination performance will
 #  be recorded, default is 60s
 #
@@ -52,6 +54,7 @@ 
 [suite]
 update_expected = True
 
+rxtx_queue_size = None
 test_duration = 12
 accepted_tolerance = 1
 test_parameters = {
@@ -144,4 +147,4 @@  expected_throughput = {
                  '512': '0.00',
                  '1024': '0.00',
                  '1280': '0.00',
-                 '1518': '0.00', },},},}
\ No newline at end of file
+                 '1518': '0.00', },},},}
diff --git a/conf/l3fwd_lpm_ipv4.cfg b/conf/l3fwd_lpm_ipv4.cfg
index 5935c659..1ceb5157 100644
--- a/conf/l3fwd_lpm_ipv4.cfg
+++ b/conf/l3fwd_lpm_ipv4.cfg
@@ -9,6 +9,8 @@ 
 #       ......
 #   }
 #
+#  - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size".
+#
 #  - test_duration is how many seconds each combination performance will
 #  be recorded, default is 60s
 #
@@ -52,6 +54,7 @@ 
 [suite]
 update_expected = True
 
+rxtx_queue_size = None
 test_duration = 60
 accepted_tolerance = 1
 test_parameters = {
@@ -102,4 +105,4 @@  expected_throughput = {
                  '512': '0.00',
                  '1024': '0.00',
                  '1280': '0.00',
-                 '1518': '0.00', },},}, }
\ No newline at end of file
+                 '1518': '0.00', },},}, }
diff --git a/conf/l3fwd_lpm_ipv4_rfc2544.cfg b/conf/l3fwd_lpm_ipv4_rfc2544.cfg
index 3518e94f..1d767716 100644
--- a/conf/l3fwd_lpm_ipv4_rfc2544.cfg
+++ b/conf/l3fwd_lpm_ipv4_rfc2544.cfg
@@ -9,6 +9,8 @@ 
 #       ......
 #   }
 #
+#  - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size".
+#
 #  - test_duration is how many seconds each combination performance will
 #  be recorded, default is 60s
 #
@@ -52,6 +54,7 @@ 
 [suite]
 update_expected = True
 
+rxtx_queue_size = None
 test_duration = 60
 accepted_tolerance = 1
 test_parameters = {
@@ -102,4 +105,4 @@  expected_rfc2544 = {
                 '512': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } },
                 '1024': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } },
                 '1280': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } },
-                '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},}
\ No newline at end of file
+                '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},}
diff --git a/conf/l3fwd_lpm_ipv6.cfg b/conf/l3fwd_lpm_ipv6.cfg
index 04d1aaca..2bbd47fe 100644
--- a/conf/l3fwd_lpm_ipv6.cfg
+++ b/conf/l3fwd_lpm_ipv6.cfg
@@ -9,6 +9,8 @@ 
 #       ......
 #   }
 #
+#  - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size".
+#
 #  - test_duration is how many seconds each combination performance will
 #  be recorded, default is 60s
 #
@@ -52,6 +54,7 @@ 
 [suite]
 update_expected = True
 
+rxtx_queue_size = None
 test_duration = 60
 accepted_tolerance = 1
 test_parameters = {
@@ -102,4 +105,4 @@  expected_throughput = {
                  '512': '0.00',
                  '1024': '0.00',
                  '1280': '0.00',
-                 '1518': '0.00', },},}, }
\ No newline at end of file
+                 '1518': '0.00', },},}, }
diff --git a/conf/vf_l3fwd_em_kernelpf.cfg b/conf/vf_l3fwd_em_kernelpf.cfg
index 4a6c0e9f..da9422b4 100644
--- a/conf/vf_l3fwd_em_kernelpf.cfg
+++ b/conf/vf_l3fwd_em_kernelpf.cfg
@@ -6,6 +6,7 @@ 
 [suite]
 test_duration = 60
 accepted_tolerance = '1%%'
+rxtx_queue_size = None
 
 test_parameters = {
     '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',],
diff --git a/conf/vf_l3fwd_kernelpf.cfg b/conf/vf_l3fwd_kernelpf.cfg
index 283ed8c9..c86e4709 100644
--- a/conf/vf_l3fwd_kernelpf.cfg
+++ b/conf/vf_l3fwd_kernelpf.cfg
@@ -9,6 +9,8 @@ 
 #       ......
 #   }
 #
+#  - rxtx_queue_size defines the l3fwd new parameters "--rx-queue-size" and "--tx-queue-size".
+#
 #  - test_duration is how many seconds each combination performance will
 #  be recorded, default is 60s
 #
@@ -52,6 +54,7 @@ 
 [suite]
 test_duration = 60
 accepted_tolerance = '1%%'
+rxtx_queue_size = None
 
 test_parameters = {
     '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',],
@@ -398,4 +401,4 @@  expected_rfc2544 = {
                 '512': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } },
                 '1024': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } },
                 '1280': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } },
-                '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},}
\ No newline at end of file
+                '1518': { 'rate' :'100.00', 'traffic_opt': {'min_rate': '10.0', 'max_rate': '100.0', 'pdr': '0.01', 'accuracy': '5', } } },},},}
diff --git a/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg b/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg
index fae8f10d..8390dd7a 100644
--- a/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg
+++ b/conf/vf_l3fwd_lpm_ipv4_kernelpf.cfg
@@ -6,6 +6,7 @@ 
 [suite]
 test_duration = 60
 accepted_tolerance = '1%%'
+rxtx_queue_size = None
 
 test_parameters = {
     '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',],
diff --git a/conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg b/conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg
index afd039ed..f39feb9e 100644
--- a/conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg
+++ b/conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf.cfg
@@ -6,6 +6,7 @@ 
 [suite]
 test_duration = 60
 accepted_tolerance = '1%%'
+rxtx_queue_size = None
 
 test_parameters = {
     '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',],
diff --git a/conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg b/conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg
index ac20f6fc..1039c86f 100644
--- a/conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg
+++ b/conf/vf_l3fwd_lpm_ipv6_kernelpf.cfg
@@ -6,6 +6,7 @@ 
 [suite]
 test_duration = 60
 accepted_tolerance = '1%%'
+rxtx_queue_size = None
 
 test_parameters = {
     '1C/1T-1Q': ['64', '128', '256', '512', '1024', '1280', '1518',],
diff --git a/tests/perf_test_base.py b/tests/perf_test_base.py
index c2d6041d..e6d68f45 100644
--- a/tests/perf_test_base.py
+++ b/tests/perf_test_base.py
@@ -146,6 +146,7 @@  class PerfTestBase(object):
         self.__bin_type = bin_type or BIN_TYPE.L3FWD
         self.__compile_rx_desc = None
         self.__compile_avx = None
+        self.__rxtx_queue_size = None
         self.__mode = mode or SUITE_TYPE.PF
         self.__suite = None
         self.__valports = valports
@@ -663,21 +664,9 @@  class PerfTestBase(object):
         self.dut.set_build_options(compile_flags)
         self.dut.build_install_dpdk(self.target)
 
-    def __preset_l3fwd_compilation(self):
-        # init l3fwd binary file
-        if self.nic not in ["columbiaville_100g", "columbiaville_25g", "columbiaville_25gx2"]:
-            self.logger.info(
-                "Configure RX/TX descriptor to 2048, re-build ./examples/l3fwd")
-            self.d_con((
-                "sed -i -e 's/"
-                "define RTE_TEST_RX_DESC_DEFAULT.*$/"
-                "define RTE_TEST_RX_DESC_DEFAULT 2048/' "
-                "./examples/l3fwd/l3fwd.h"))
-            self.d_con((
-                "sed -i -e 's/"
-                "define RTE_TEST_TX_DESC_DEFAULT.*$/"
-                "define RTE_TEST_TX_DESC_DEFAULT 2048/' "
-                "./examples/l3fwd/l3fwd.h"))
+    def __preset_compilation(self):
+        # Update compile config file and rebuild to get best perf on different nics
+        self.__preset_dpdk_compilation()
         if self.__mode is SUITE_TYPE.VF:
             # init testpmd
             if self.__pf_driver is not NIC_DRV.PCI_STUB:
@@ -685,12 +674,6 @@  class PerfTestBase(object):
         self.__l3fwd_em = self.__l3fwd_init(MATCH_MODE.EM)
         self.__l3fwd_lpm = self.__l3fwd_init(MATCH_MODE.LPM)
 
-    def __preset_compilation(self):
-        # Update compile config file and rebuild to get best perf on different nics
-        self.__preset_dpdk_compilation()
-        if self.__bin_type is BIN_TYPE.L3FWD:
-            self.__preset_l3fwd_compilation()
-
     def __init_host_testpmd(self):
         '''
         apply under vf testing scenario
@@ -847,6 +830,8 @@  class PerfTestBase(object):
             "niantic",
             "columbiaville_100g", "columbiaville_25g", "columbiaville_25gx2",
         ]
+        if self.__rxtx_queue_size:
+            command_line += " --rx-queue-size {rxtx} --tx-queue-size {rxtx}". format(rxtx= self.__rxtx_queue_size)
         if self.nic in suppored_nics or self.__mode is SUITE_TYPE.VF:
             command_line += " --parse-ptype"
         if frame_size > 1518:
@@ -1376,6 +1361,7 @@  class PerfTestBase(object):
         if self.__bin_type is BIN_TYPE.L3FWD:
             self.__bin_ps_wait_up = test_content.get('l3fwd_wait_up', 0)
             self.__bin_ps_restart = test_content.get('l3fwd_restart', True)
+            self.__rxtx_queue_size = test_content.get('rxtx_queue_size', None)
         else:
             self.__bin_ps_wait_up = test_content.get('bin_ps_wait_up', 0)
             self.__bin_ps_restart = test_content.get('bin_ps_restart', True)