test suite reviews and discussions
 help / color / mirror / Atom feed
From: yufengmx <yufengx.mo@intel.com>
To: dts@dpdk.org, lijuan.tu@intel.com
Cc: yufengmx <yufengx.mo@intel.com>
Subject: [dts] [PATCH V4 02/13] tests/perf_test_base: extend vf l3fwd content
Date: Tue, 30 Mar 2021 15:05:14 +0800	[thread overview]
Message-ID: <20210330070525.5056-3-yufengx.mo@intel.com> (raw)
In-Reply-To: <20210330070525.5056-1-yufengx.mo@intel.com>


#. unify vf l3fwd nic support list.
#. add suite series name method.
#. remove comiple restore limitation.
#. rename host testpmd whitelist method.

Signed-off-by: yufengmx <yufengx.mo@intel.com>
---
 tests/perf_test_base.py | 38 ++++++++++++++++++++++++++++----------
 1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/tests/perf_test_base.py b/tests/perf_test_base.py
index 20f3e152..4b76e6b1 100644
--- a/tests/perf_test_base.py
+++ b/tests/perf_test_base.py
@@ -51,6 +51,17 @@ from exception import VerifyFailure
 import utils
 
 
+VF_L3FWD_NIC_SUPPORT = frozenset((
+    "niantic",
+    "fortville_spirit",
+    "fortville_25g",
+    "fortville_eagle",
+    "columbiaville_100g",
+    "columbiaville_25g",
+    "columbiaville_25gx2",
+))
+
+
 @unique
 class BIN_TYPE(Enum):
     L3FWD = 'l3fwd'
@@ -625,14 +636,11 @@ class PerfTestBase(object):
                 "define RTE_TEST_TX_DESC_DEFAULT 2048/' "
                 "./examples/l3fwd/l3fwd.h"))
         if self.__mode is SUITE_TYPE.VF:
-            self.__l3fwd_lpm = self.__l3fwd_em = \
-                self.__l3fwd_init(MATCH_MODE.EM, rename=False)
             # init testpmd
             if self.__pf_driver is not NIC_DRV.PCI_STUB:
                 self.__init_host_testpmd()
-        else:
-            self.__l3fwd_em = self.__l3fwd_init(MATCH_MODE.EM)
-            self.__l3fwd_lpm = self.__l3fwd_init(MATCH_MODE.LPM)
+        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
@@ -673,7 +681,7 @@ class PerfTestBase(object):
                 'core_mask': core_mask,
                 'mem_channel': self.dut.get_memory_channels(),
                 'memsize': mem_size,
-                'whitelist': self.__get_testpmd_whitelist(),
+                'whitelist': self.__get_host_testpmd_whitelist(),
                 'prefix': 'pf', })
         self.__host_pmd_con([cmd, "testpmd> ", 120])
         self.__is_pmd_on = True
@@ -1238,8 +1246,19 @@ class PerfTestBase(object):
             vf_driver = test_content.get('vf_driver')
         return pf_driver, vf_driver
 
+    def __set_suite_series_name(self):
+        pat = "vf_l3fwd.*_kernelpf"
+        if re.match(pat, self.suite_name):
+            self.__suite = SUITE_NAME.VF_KERNELPF
+            return
+        pat = "testpmd*_perf"
+        if re.match(pat, self.suite_name):
+            self.__suite = SUITE_NAME.TESTPMD_PERF
+            return
+        self.__suite = None
+
     def __get_vf_test_content_from_cfg(self, test_content):
-        self.__suite = get_enum_name(self.suite_name, SUITE_NAME)
+        self.__set_suite_series_name()
         # pf driver
         pf_driver, vf_driver = self.__get_suite_vf_pf_driver(test_content)
         if pf_driver and isinstance(pf_driver, str):
@@ -1356,7 +1375,7 @@ class PerfTestBase(object):
 
         return whitelist
 
-    def __get_testpmd_whitelist(self):
+    def __get_host_testpmd_whitelist(self):
         whitelist = ''.join(['-w {} '.format(info.get('pf_pci'))
                              for _, info in self.__vf_ports_info.items()])
         return whitelist
@@ -1404,8 +1423,7 @@ class PerfTestBase(object):
                     self.dut.close_session(self.__pmd_session)
                     self.__pmd_session = None
             self.__vf_destroy()
-        if self.__mode is SUITE_TYPE.PF:
-            self.__restore_compilation()
+        self.__restore_compilation()
 
     def perf_set_cur_case(self, name):
         self.__cur_case = name
-- 
2.21.0


  parent reply	other threads:[~2021-03-30  7:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-30  7:05 [dts] [PATCH V4 00/13] vf_l3fwd_kernelpf: add more test scenario yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 01/13] conf/vf_l3fwd_base: add more flows yufengmx
2021-03-30  7:05 ` yufengmx [this message]
2021-03-30  7:05 ` [dts] [PATCH V4 03/13] conf/vf_l3fwd_em_kernelpf: configuration yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 04/13] tests/vf_l3fwd_em_kernelpf: script yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 05/13] conf/vf_l3fwd_kernelpf: configuration yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 06/13] tests/vf_l3fwd_kernelpf: add more test scenario yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 07/13] conf/vf_l3fwd_lpm_ipv4_kernelpf: configuration yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 08/13] tests/vf_l3fwd_lpm_ipv4_kernelpf: script yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 09/13] conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf: configuration yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 10/13] tests/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf: script yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 11/13] conf/vf_l3fwd_lpm_ipv6_kernelpf: configuration yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 12/13] tests/vf_l3fwd_lpm_ipv6_kernelpf: script yufengmx
2021-03-30  7:05 ` [dts] [PATCH V4 13/13] tests/perf_test_base: script yufengmx
2021-03-31  5:54 ` [dts] [PATCH V4 00/13] vf_l3fwd_kernelpf: add more test scenario 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=20210330070525.5056-3-yufengx.mo@intel.com \
    --to=yufengx.mo@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    /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).