From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id E5754A04E6; Wed, 18 Nov 2020 07:07:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 099AA5947; Wed, 18 Nov 2020 07:07:06 +0100 (CET) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by dpdk.org (Postfix) with ESMTP id 295B05946 for ; Wed, 18 Nov 2020 07:07:03 +0100 (CET) IronPort-SDR: F358XhISL+3g4XZ6wDmK7KLWSTiEOlvs+PcvkfzbOAHRMAwXfgH/vXMBkaqzbeUuklRAEK3pG1 jjt+GyoGoaqA== X-IronPort-AV: E=McAfee;i="6000,8403,9808"; a="150340398" X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="150340398" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 22:07:01 -0800 IronPort-SDR: j4xuYymsNhPfOC94Iv2BqR9xlIJsnGQLkhaDOvcvzZCb8/ujbPg5qRX37OfsWHP8Ny2iZraxQG eKysGZapBDHw== X-IronPort-AV: E=Sophos;i="5.77,486,1596524400"; d="scan'208";a="476192213" Received: from unknown (HELO localhost.localdomain) ([10.240.183.57]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Nov 2020 22:06:59 -0800 From: Haiyang Zhao To: dts@dpdk.org, lijuan.tu@intel.com Cc: Haiyang Zhao Date: Wed, 18 Nov 2020 14:01:13 +0800 Message-Id: <20201118060114.14553-2-haiyangx.zhao@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201118060114.14553-1-haiyangx.zhao@intel.com> References: <20201118060114.14553-1-haiyangx.zhao@intel.com> Subject: [dts] [PATCH V1 1/2] framework/project_dpdk: fix meson compile failed when set rx mode X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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" rx mode is supported dynamically since DPDK 20.11, and modify the rte_config.h to compile DPDK by meson will be failed. so add a jugement for build type to fix this issue and update the doc. Signed-off-by: Haiyang Zhao --- framework/project_dpdk.py | 43 ++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/framework/project_dpdk.py b/framework/project_dpdk.py index fbbc78d..259282f 100644 --- a/framework/project_dpdk.py +++ b/framework/project_dpdk.py @@ -187,28 +187,33 @@ class DPDKdut(Dut): def set_rxtx_mode(self): """ Set default RX/TX PMD function, - only i40e support scalar/full RX/TX model. - ixgbe and fm10k only support vector and no vector model - all NIC default rx/tx model is vector PMD + the rx mode scalar/full/novector are supported dynamically since DPDK 20.11, + The DPDK version should be <=20.08 when compiling DPDK by makefile to use these rx modes, + Rx mode avx512 is only supported in DPDK 20.11 and later version. """ mode = load_global_setting(DPDK_RXMODE_SETTING) - if mode == 'scalar': - self.set_build_options({'RTE_LIBRTE_I40E_INC_VECTOR': 'n', - 'RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC': 'y'}) - if mode == 'full': - self.set_build_options({'RTE_LIBRTE_I40E_INC_VECTOR': 'n', - 'RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC': 'n'}) - if mode == 'novector': - self.set_build_options({'RTE_IXGBE_INC_VECTOR': 'n', - 'RTE_LIBRTE_I40E_INC_VECTOR': 'n', - 'RTE_LIBRTE_FM10K_INC_VECTOR': 'n'}) - if mode == 'avx512': - out = self.send_expect('lscpu | grep avx512', '#') - if 'avx512f' not in out or 'no-avx512f' in out: - self.logger.warning(RED('*********The DUT CPU do not support AVX512 test!!!********')) - self.logger.warning(RED('*********Now set the rx_mode to default!!!**********')) - save_global_setting(DPDK_RXMODE_SETTING, 'default') + build_type = load_global_setting(HOST_BUILD_TYPE_SETTING) + if build_type == 'makefile': + if mode == 'scalar': + self.set_build_options({'RTE_LIBRTE_I40E_INC_VECTOR': 'n', + 'RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC': 'y'}) + elif mode == 'full': + self.set_build_options({'RTE_LIBRTE_I40E_INC_VECTOR': 'n', + 'RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC': 'n'}) + elif mode == 'novector': + self.set_build_options({'RTE_IXGBE_INC_VECTOR': 'n', + 'RTE_LIBRTE_I40E_INC_VECTOR': 'n', + 'RTE_LIBRTE_FM10K_INC_VECTOR': 'n'}) + elif mode == 'avx512': + self.logger.warning(RED('*********AVX512 is not supported by makefile!!!********')) + else: + if mode == 'avx512': + out = self.send_expect('lscpu | grep avx512', '#') + if 'avx512f' not in out or 'no-avx512f' in out: + self.logger.warning(RED('*********The DUT CPU do not support AVX512 test!!!********')) + self.logger.warning(RED('*********Now set the rx_mode to default!!!**********')) + save_global_setting(DPDK_RXMODE_SETTING, 'default') def set_package(self, pkg_name="", patch_list=[]): self.package = pkg_name -- 2.17.1