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 F0FDF45A6C; Mon, 30 Sep 2024 19:50:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2714B40648; Mon, 30 Sep 2024 19:50:51 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id 02182402B3 for ; Mon, 30 Sep 2024 19:50:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727718648; x=1759254648; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=18gfSZsVr7zlOAYQ2CVL8o5ncx1hmtGvDycszfdS7EU=; b=L3+4XiehmKpgNMrUC0F0FY8i/rhNCg7rn4pPWZY+4X5VGOEivFmf/PlF cexAJpam/HS9xa2SyEvueqg1kt2vH5/RulQTRCrQhhPyTp9Tbz/CnxaqQ lS6qnOf5sjMpUUSw9kALuFmuo+6m403RVPFUlnH7nm2ZMMWa3ogkYdFAb fAsIXLTNbN57aq312jWMD37y9vds1uTGMRwc/S+MdOtd5cWEkVFRvhUrK ULa127njxAHU3usbXlLQuQmbntDflfX/jC+pYPcS5RIeRUtygzamZN/Ir bKfWfm8QRoNd4z3hk/yE2sqebGBdIauRlrU7Kl2lr39yh5Jt+jNLsCJbZ g==; X-CSE-ConnectionGUID: JzldvZVeRaeB9FTCmktMGw== X-CSE-MsgGUID: KVtYNtXOS2mXEDdMmvlHvA== X-IronPort-AV: E=McAfee;i="6700,10204,11211"; a="30712527" X-IronPort-AV: E=Sophos;i="6.11,166,1725346800"; d="scan'208";a="30712527" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Sep 2024 10:50:47 -0700 X-CSE-ConnectionGUID: N3LDM7HvQnGpMob46NqxkQ== X-CSE-MsgGUID: zGyS+dxfTWCBROVR5YLAaQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,166,1725346800"; d="scan'208";a="77457750" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 30 Sep 2024 10:50:46 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Abdullah Sevincer Subject: [PATCH v1 2/8] event/dlb2: use global AVX-512 variables Date: Mon, 30 Sep 2024 18:50:26 +0100 Message-ID: <20240930175033.2283861-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240930175033.2283861-1-bruce.richardson@intel.com> References: <20240930175033.2283861-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