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 81BAC45A7B; Tue, 1 Oct 2024 13:18:23 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5219F4065C; Tue, 1 Oct 2024 13:18:14 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.14]) by mails.dpdk.org (Postfix) with ESMTP id 008404027E for ; Tue, 1 Oct 2024 13:18:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727781492; x=1759317492; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=18gfSZsVr7zlOAYQ2CVL8o5ncx1hmtGvDycszfdS7EU=; b=AeIvf92EyoBXg/L9v4nrbBQwDlbKORs3y9oO5cqDIQQIMpFA7gEkpU6E EXxAmmzuuT4bHON5GK+OBvsZjjY51iW8G5AS/0jZ5HBLQ8O817zSET+Qx qJtSFcyDxjrN1Znm+KOROWGRJt5E2cxgrbS7TT3OnxW1mk4pas5/6qIc4 EfJCMuWrJHROCReflfKezEhi3iqTptc4CVxlpPural/XnTbX+41PqIMle aqRNBBoGtcM/mm9P1rTxvIMnfzIraH1DXADi/f5r+BsTgHB73jDvF6bzX tvtv3WX3j7ha9127zsOH0MPQUg3XTeMz8WiF96HiIZOi69UIgstaqAIKe Q==; X-CSE-ConnectionGUID: gVrjQJohRIqMFoeCFhJaeA== X-CSE-MsgGUID: uBIyF71hQmK13/n/PC6xwg== X-IronPort-AV: E=McAfee;i="6700,10204,11211"; a="27084536" X-IronPort-AV: E=Sophos;i="6.11,167,1725346800"; d="scan'208";a="27084536" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa108.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2024 04:18:11 -0700 X-CSE-ConnectionGUID: SmBO4gcFQ1iKs2yE3VEYgg== X-CSE-MsgGUID: +wSjiGzDQ3+fI/NY66adHw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,167,1725346800"; d="scan'208";a="74047080" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by orviesa007.jf.intel.com with ESMTP; 01 Oct 2024 04:18:11 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Abdullah Sevincer Subject: [PATCH v2 2/8] event/dlb2: use global AVX-512 variables Date: Tue, 1 Oct 2024 12:17:55 +0100 Message-ID: <20241001111802.2728765-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241001111802.2728765-1-bruce.richardson@intel.com> References: <20240930175033.2283861-1-bruce.richardson@intel.com> <20241001111802.2728765-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 per-driver checks for AVX-512 with the standard variables from config/x86. Signed-off-by: Bruce Richardson --- drivers/event/dlb2/meson.build | 42 ++++++++-------------------------- 1 file changed, 9 insertions(+), 33 deletions(-) diff --git a/drivers/event/dlb2/meson.build b/drivers/event/dlb2/meson.build index 515d1795fe..34131fd18b 100644 --- a/drivers/event/dlb2/meson.build +++ b/drivers/event/dlb2/meson.build @@ -26,43 +26,19 @@ sources = files( # we are building 64-bit binary (checked above) AND binutils # can generate proper code -if binutils_ok +if target_has_avx512 + sources += files('dlb2_avx512.c') + cflags += '-DCC_AVX512_SUPPORT' - # compile AVX512 version if either: - # a. we have AVX512VL supported in minimum instruction set - # baseline - # b. it's not minimum instruction set, but supported by - # compiler - # - # in former case, just add avx512 C file to files list - # in latter case, compile c file to static lib, using correct - # compiler flags, and then have the .o file from static lib - # linked into main lib. - - # check if all required flags already enabled (variant a). - dlb2_avx512_on = false - if cc.get_define('__AVX512VL__', args: machine_args) != '' - dlb2_avx512_on = true - endif - - if dlb2_avx512_on == true - - sources += files('dlb2_avx512.c') - cflags += '-DCC_AVX512_SUPPORT' - - elif cc.has_multi_arguments('-mavx512vl') - - cflags += '-DCC_AVX512_SUPPORT' - avx512_tmplib = static_library('avx512_tmp', +elif cc_has_avx512 + cflags += '-DCC_AVX512_SUPPORT' + avx512_tmplib = static_library('avx512_tmp', 'dlb2_avx512.c', dependencies: [static_rte_eal, static_rte_eventdev], - c_args: cflags + ['-mavx512vl']) - objs += avx512_tmplib.extract_objects('dlb2_avx512.c') - else - sources += files('dlb2_sse.c') - endif + c_args: cflags + cc_avx512_flags) + objs += avx512_tmplib.extract_objects('dlb2_avx512.c') else - sources += files('dlb2_sse.c') + sources += files('dlb2_sse.c') endif headers = files('rte_pmd_dlb2.h') -- 2.43.0