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 V2 02/13] tests/perf_test_base: extend vf l3fwd content
Date: Thu, 25 Mar 2021 16:41:51 +0800
Message-ID: <20210325084202.17856-3-yufengx.mo@intel.com> (raw)
In-Reply-To: <20210325084202.17856-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-25  8:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-25  8:41 [dts] [PATCH V2 00/13] vf_l3fwd_kernelpf: add more test scenario yufengmx
2021-03-25  8:41 ` [dts] [PATCH V2 01/13] conf/vf_l3fwd_base: add more flows yufengmx
2021-03-25  8:41 ` yufengmx [this message]
2021-03-25  8:41 ` [dts] [PATCH V2 03/13] conf/vf_l3fwd_em_kernelpf: configuration yufengmx
2021-03-25  8:41 ` [dts] [PATCH V2 04/13] tests/vf_l3fwd_em_kernelpf: script yufengmx
2021-03-25  8:41 ` [dts] [PATCH V2 05/13] conf/vf_l3fwd_kernelpf: configuration yufengmx
2021-03-25  8:41 ` [dts] [PATCH V2 06/13] tests/vf_l3fwd_kernelpf: add more test scenario yufengmx
2021-03-25  8:41 ` [dts] [PATCH V2 07/13] conf/vf_l3fwd_lpm_ipv4_kernelpf: configuration yufengmx
2021-03-25  8:41 ` [dts] [PATCH V2 08/13] tests/vf_l3fwd_lpm_ipv4_kernelpf: script yufengmx
2021-03-25  8:41 ` [dts] [PATCH V2 09/13] conf/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf: configuration yufengmx
2021-03-25  8:41 ` [dts] [PATCH V2 10/13] tests/vf_l3fwd_lpm_ipv4_rfc2544_kernelpf: script yufengmx
2021-03-25  8:42 ` [dts] [PATCH V2 11/13] conf/vf_l3fwd_lpm_ipv6_kernelpf: configuration yufengmx
2021-03-25  8:42 ` [dts] [PATCH V2 12/13] tests/vf_l3fwd_lpm_ipv6_kernelpf: script yufengmx
2021-03-25  8:42 ` [dts] [PATCH V2 13/13] tests/perf_test_base: script yufengmx

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=20210325084202.17856-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

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