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 C6BE445AE3; Tue, 8 Oct 2024 18:54:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 21CBA410DC; Tue, 8 Oct 2024 18:53:19 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id C050440E4C for ; Tue, 8 Oct 2024 18:53:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728406394; x=1759942394; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IrjhvPHvlB19sVCa4FkeTADP6hFlF+4sJiOBzk7Y8PA=; b=MWOqOeB9EVqroiX2AZma5BaHiSzEGKODCfYzxncReOTLkslMwPe4Neg6 xkDcf+vptKB72t2E5tDumtYg0Q2APjPDPp/iCUbu+ZujoayaWCG1mLu5C 9kCG7+AujRzjsYxU3lTxVIBAyQIxa0xWVeHiqMnSv3SC27ZdCLojkNRRb NxKGwVaBbAQ+hP3kURwSSdwE5Bq8XycuIU4v7MLkdLaTH6ZVyMTF3WdCv lYUXmJ4lOV0zuSicoJ73JM0NgAZqhoeFbO0ga1vFj2HCH7s3e6jofIVMg d3W2bZDhZTKXWq0tsqXYiLP5UpVMLzQbtH+zThxDOFU7bcr62lFRae2ye w==; X-CSE-ConnectionGUID: wXRB1t3DTl2c1nNzWRxAkw== X-CSE-MsgGUID: pzDmxb4uQUG18s8sCO6KuQ== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="31517034" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="31517034" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Oct 2024 09:53:13 -0700 X-CSE-ConnectionGUID: l6i9gCC8RteKj6cC09Tshg== X-CSE-MsgGUID: hIVeY+RBQ6mcDJ0yGJ7MGA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79883066" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 09:53:13 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 10/10] net: use global AVX-512 variables Date: Tue, 8 Oct 2024 17:52:58 +0100 Message-ID: <20241008165258.2802099-11-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241008165258.2802099-1-bruce.richardson@intel.com> References: <20240930175033.2283861-1-bruce.richardson@intel.com> <20241008165258.2802099-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Replace some library-specific checks for AVX-512 with the standard variables from config/x86. Signed-off-by: Bruce Richardson --- lib/net/meson.build | 40 ++++------------------------------------ 1 file changed, 4 insertions(+), 36 deletions(-) diff --git a/lib/net/meson.build b/lib/net/meson.build index 0b69138949..f9bef3afc9 100644 --- a/lib/net/meson.build +++ b/lib/net/meson.build @@ -38,25 +38,11 @@ deps += ['mbuf'] if dpdk_conf.has('RTE_ARCH_X86_64') net_crc_sse42_cpu_support = (cc.get_define('__PCLMUL__', args: machine_args) != '') - net_crc_avx512_cpu_support = ( - cc.get_define('__AVX512F__', args: machine_args) != '' and - cc.get_define('__AVX512BW__', args: machine_args) != '' and - cc.get_define('__AVX512DQ__', args: machine_args) != '' and - cc.get_define('__AVX512VL__', args: machine_args) != '' and - cc.get_define('__VPCLMULQDQ__', args: machine_args) != '' + net_crc_avx512_cpu_support = (target_has_avx512 and cc.get_define('__VPCLMULQDQ__', args: machine_args) != '' ) net_crc_sse42_cc_support = (cc.has_argument('-mpclmul') and cc.has_argument('-maes')) - net_crc_avx512_cc_support = ( - not machine_args.contains('-mno-avx512f') and - cc.has_argument('-mavx512f') and - cc.has_argument('-mavx512bw') and - cc.has_argument('-mavx512dq') and - cc.has_argument('-mavx512vl') and - cc.has_argument('-mvpclmulqdq') and - cc.has_argument('-mavx2') and - cc.has_argument('-mavx') - ) + net_crc_avx512_cc_support = (cc.has_argument('-mvpclmulqdq') and cc_has_avx512) build_static_net_crc_sse42_lib = 0 build_static_net_crc_avx512_lib = 0 @@ -69,15 +55,7 @@ if dpdk_conf.has('RTE_ARCH_X86_64') cflags += ['-DCC_X86_64_AVX512_VPCLMULQDQ_SUPPORT'] elif net_crc_avx512_cc_support == true build_static_net_crc_avx512_lib = 1 - net_crc_avx512_lib_cflags = [ - '-mavx512f', - '-mavx512bw', - '-mavx512dq', - '-mavx512vl', - '-mvpclmulqdq', - '-mavx2', - '-mavx', - ] + net_crc_avx512_lib_cflags = cc_avx512_flags + ['-mvpclmulqdq'] cflags += ['-DCC_X86_64_AVX512_VPCLMULQDQ_SUPPORT'] endif elif net_crc_sse42_cc_support == true @@ -86,17 +64,7 @@ if dpdk_conf.has('RTE_ARCH_X86_64') cflags += ['-DCC_X86_64_SSE42_PCLMULQDQ_SUPPORT'] if net_crc_avx512_cc_support == true build_static_net_crc_avx512_lib = 1 - net_crc_avx512_lib_cflags = [ - '-mpclmul', - '-maes', - '-mavx512f', - '-mavx512bw', - '-mavx512dq', - '-mavx512vl', - '-mvpclmulqdq', - '-mavx2', - '-mavx', - ] + net_crc_avx512_lib_cflags = cc_avx512_flags + ['-mvpclmulqdq', '-mpclmul'] cflags += ['-DCC_X86_64_AVX512_VPCLMULQDQ_SUPPORT'] endif endif -- 2.43.0