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 8967645AE3; Tue, 8 Oct 2024 18:53:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2899C40E11; Tue, 8 Oct 2024 18:53:10 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id 5FEE740A84 for ; Tue, 8 Oct 2024 18:53:06 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728406387; x=1759942387; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=18gfSZsVr7zlOAYQ2CVL8o5ncx1hmtGvDycszfdS7EU=; b=GZnZ+NU8iBKqOOIESBaAj/IV54s7pNR03zdKeOojW9rc3D11NGanADMt LOjRuiDjsjJlmK5mCabpkPQKUTm0LC2TBchEb6p3ydUhpPRMl46euNLOf hmfdCdwubzoObrUG18wjTvrXpSp4Bw4V3yiYWMly8BRqocmsQ0NTB+fwl h2wgQ/hy/Isw4J61CR6/aolMa3T+9sD3UHt5cr8RczPSBiyqX/bqmlbQQ ttgpcK4qt6PtDyNt41UUkRyOzmPObmfsfAEFo+TOm3YywgWYGcaW4vQh8 y62n+WKxDLbXI1IbN2pT5q4PYWCVDrjgWw/zOzAXoG3s+I/yRtSEHVhtV A==; X-CSE-ConnectionGUID: 1q/9dRmxRNy5r+VI3CMApg== X-CSE-MsgGUID: qlblO8c5S4y5q/xjc5XU2w== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="31516998" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="31516998" 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:05 -0700 X-CSE-ConnectionGUID: g8xKTYQGTZipTq6JnBb/zA== X-CSE-MsgGUID: GVSJwEwZQBK3BNMqn/6SfA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79883030" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 09:53:05 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 02/10] event/dlb2: use global AVX-512 variables Date: Tue, 8 Oct 2024 17:52:50 +0100 Message-ID: <20241008165258.2802099-3-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 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