From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7A760A0A02; Thu, 25 Mar 2021 09:49:10 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 74B56140D36; Thu, 25 Mar 2021 09:49:10 +0100 (CET) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 7E7D1140D29 for ; Thu, 25 Mar 2021 09:49:08 +0100 (CET) IronPort-SDR: 6ubL7qxXPDOaaAXjF5TKNCWLTeW63E9Q7IDFS5zV66HsXJkN/24Fxk/fLrCK3MvDAnIG0AJGWY Tyc76CFEiWFg== X-IronPort-AV: E=McAfee;i="6000,8403,9933"; a="276009477" X-IronPort-AV: E=Sophos;i="5.81,277,1610438400"; d="scan'208";a="276009477" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Mar 2021 01:49:08 -0700 IronPort-SDR: aVFMScAmXzeGN99YxmYN0i8nG23oRlGzzItJa6TCj9rTwrd7hIyBDD4P3S4gRqfqJ4Pdoxbalt 3vcjrjqxzv0w== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.81,277,1610438400"; d="scan'208";a="376759017" Received: from dpdk-moyufen06.sh.intel.com ([10.67.116.208]) by orsmga006.jf.intel.com with ESMTP; 25 Mar 2021 01:49:06 -0700 From: yufengmx To: dts@dpdk.org, lijuan.tu@intel.com Cc: yufengmx Date: Thu, 25 Mar 2021 16:41:51 +0800 Message-Id: <20210325084202.17856-3-yufengx.mo@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210325084202.17856-1-yufengx.mo@intel.com> References: <20210325084202.17856-1-yufengx.mo@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dts] [PATCH V2 02/13] tests/perf_test_base: extend vf l3fwd content X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" #. unify vf l3fwd nic support list. #. add suite series name method. #. remove comiple restore limitation. #. rename host testpmd whitelist method. Signed-off-by: yufengmx --- 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