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 22480A0540 for ; Mon, 12 Dec 2022 07:44:35 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1C72F42D3A; Mon, 12 Dec 2022 07:44:35 +0100 (CET) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id EA3CE40687; Mon, 12 Dec 2022 07:44:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1670827474; x=1702363474; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=+Q/nt5a9F9/Z8QSPF96CZeLW/dAZwphrYP5vmAe06vM=; b=KXW1EH5w1qGs/ZPPFYIVqKDk0AjMVTh0yZTaoG9WigeUyxSfYlZIx7oX 41gB54yK59Qjt2858Gqv+EIv+0tGrKqC0kNgTzEQvDGEPerVNef4SO2U/ k9P6nDH+gLkxCUXy55auKkiTfKNB1PPdXWerExTEtfbBDcaPHGJgftgeD t4pacOBPP9jplzacFrkoqWSP4V5Kvv0qLBOuTesO0/3nxtnnt0VDG6tDD 3w45LOBiMV2A4hFtz4uLso9ZlyRM+s3CH1/XsKY+kFG0xkh69f2cq8uMm 3mPiX+dQgsWMJNAoyXlp/Zra1/8NzlGvmIiUGOW6QuTpEwP2E9g2y8+Ix w==; X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="317808584" X-IronPort-AV: E=Sophos;i="5.96,237,1665471600"; d="scan'208";a="317808584" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Dec 2022 22:44:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10558"; a="648055878" X-IronPort-AV: E=Sophos;i="5.96,237,1665471600"; d="scan'208";a="648055878" Received: from dpdk-qzhan15-test02.sh.intel.com ([10.67.115.4]) by orsmga002.jf.intel.com with ESMTP; 11 Dec 2022 22:44:30 -0800 From: Qi Zhang To: mb@smartsharesystems.com, bruce.richardson@intel.com, wenzhuo.lu@intel.com Cc: dev@dpdk.org, wenjun1.wu@intel.com, Qi Zhang , stable@dpdk.org Subject: [PATCH v2] net: not build PMD AVX library when no IOVA as PA Date: Mon, 12 Dec 2022 09:55:49 -0500 Message-Id: <20221212145549.1143449-1-qi.z.zhang@intel.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221212121711.857866-1-qi.z.zhang@intel.com> References: <20221212121711.857866-1-qi.z.zhang@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org PMD not announce pmd_supports_disable_iova_as_pa will not be build when RTE_IOVA_AS_PA is not defined, but some AVX library for vector path is not skipped by the build system which cause compile error. The patch modify i40e, iavf, ice's meson file to skip AVX library build when RTE_IOVA_AS_PA is not defined. Cc: stable@dpdk.org Signed-off-by: Qi Zhang --- v2: - fix build error due to wrong type of meson variable. drivers/net/i40e/meson.build | 5 +++-- drivers/net/iavf/meson.build | 5 +++-- drivers/net/ice/meson.build | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build index e00c1a9ef9..ac8a4bd3f8 100644 --- a/drivers/net/i40e/meson.build +++ b/drivers/net/i40e/meson.build @@ -37,6 +37,7 @@ testpmd_sources = files('i40e_testpmd.c') deps += ['hash'] includes += include_directories('base') +iova_as_pa = dpdk_conf.get('RTE_IOVA_AS_PA') if arch_subdir == 'x86' sources += files('i40e_rxtx_vec_sse.c') @@ -51,7 +52,7 @@ if arch_subdir == 'x86' if cc.get_define('__AVX2__', args: machine_args) != '' cflags += ['-DCC_AVX2_SUPPORT'] sources += files('i40e_rxtx_vec_avx2.c') - elif cc.has_argument('-mavx2') + elif iova_as_pa == 1 and cc.has_argument('-mavx2') cflags += ['-DCC_AVX2_SUPPORT'] i40e_avx2_lib = static_library('i40e_avx2_lib', 'i40e_rxtx_vec_avx2.c', @@ -71,7 +72,7 @@ if arch_subdir == 'x86' cc.has_argument('-mavx512f') and cc.has_argument('-mavx512bw')) - if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true + if iova_as_pa == 1 and (i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true) cflags += ['-DCC_AVX512_SUPPORT'] avx512_args = [cflags, '-mavx512f', '-mavx512bw'] if cc.has_argument('-march=skylake-avx512') diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build index 6df771f917..37968200c1 100644 --- a/drivers/net/iavf/meson.build +++ b/drivers/net/iavf/meson.build @@ -6,6 +6,7 @@ cflags += ['-Wno-strict-aliasing'] includes += include_directories('../../common/iavf') deps += ['common_iavf', 'security', 'cryptodev'] +iova_as_pa = dpdk_conf.get('RTE_IOVA_AS_PA') sources = files( 'iavf_ethdev.c', @@ -32,7 +33,7 @@ if arch_subdir == 'x86' if cc.get_define('__AVX2__', args: machine_args) != '' cflags += ['-DCC_AVX2_SUPPORT'] sources += files('iavf_rxtx_vec_avx2.c') - elif cc.has_argument('-mavx2') + elif iova_as_pa == 1 and cc.has_argument('-mavx2') cflags += ['-DCC_AVX2_SUPPORT'] iavf_avx2_lib = static_library('iavf_avx2_lib', 'iavf_rxtx_vec_avx2.c', @@ -52,7 +53,7 @@ if arch_subdir == 'x86' cc.has_argument('-mavx512f') and cc.has_argument('-mavx512bw')) - if iavf_avx512_cpu_support == true or iavf_avx512_cc_support == true + if iova_as_pa == 1 and (iavf_avx512_cpu_support == true or iavf_avx512_cc_support == true) cflags += ['-DCC_AVX512_SUPPORT'] avx512_args = [cflags, '-mavx512f', '-mavx512bw'] if cc.has_argument('-march=skylake-avx512') diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build index 528e77613e..8efa533e0b 100644 --- a/drivers/net/ice/meson.build +++ b/drivers/net/ice/meson.build @@ -20,6 +20,7 @@ testpmd_sources = files('ice_testpmd.c') deps += ['hash', 'net', 'common_iavf'] includes += include_directories('base', '../../common/iavf') +iova_as_pa = dpdk_conf.get('RTE_IOVA_AS_PA') if arch_subdir == 'x86' sources += files('ice_rxtx_vec_sse.c') @@ -34,7 +35,7 @@ if arch_subdir == 'x86' if cc.get_define('__AVX2__', args: machine_args) != '' cflags += ['-DCC_AVX2_SUPPORT'] sources += files('ice_rxtx_vec_avx2.c') - elif cc.has_argument('-mavx2') + elif iova_as_pa == 1 and cc.has_argument('-mavx2') cflags += ['-DCC_AVX2_SUPPORT'] ice_avx2_lib = static_library('ice_avx2_lib', 'ice_rxtx_vec_avx2.c', @@ -55,7 +56,7 @@ if arch_subdir == 'x86' cc.has_argument('-mavx512bw') ) - if ice_avx512_cpu_support == true or ice_avx512_cc_support == true + if iova_as_pa == 1 and (ice_avx512_cpu_support == true or ice_avx512_cc_support == true) cflags += ['-DCC_AVX512_SUPPORT'] avx512_args = [cflags, '-mavx512f', '-mavx512bw'] if cc.has_argument('-march=skylake-avx512') -- 2.31.1