From patchwork Tue Oct 8 16:52:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 145463 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 88FA145AE3; Tue, 8 Oct 2024 18:53:11 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 213F340DC9; Tue, 8 Oct 2024 18:53:09 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id 1A63D4060A for ; Tue, 8 Oct 2024 18:53:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728406385; x=1759942385; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=X1O2Bv6YmvFR10aY3fP27Qrz81ZuRRTkHkAsQyPy5KY=; b=X1WZS7Hy+waj6VSf1ccdCnicOFNUgepcVUn8UV/Da7vd3ywYOxOPOM/h 9d5NcLzmMAN5n9xLTzC9gCnutVQhruzDQtc0Pm4rP+oup/5c2lF/oteob LXCBim/QUVw8nQdZAITGyA8BkClmw3174aksu4zLMu/x0Iz4nce03ybiJ 4DRSt8PjTixAmdn86LWVa5eahJw8jvElL3HF29YFWksXrOtMyiNmD88CB JSzaSPjVMj/3scZsyppdSVBM3zyqnoA4wdiUhTNMGwLd/o2vek7Mo4j7S T0owp9k+b6XSoUCDgl2hXjbasw8wfrzq1IFopFBbDrv97SljP9mMMTJHr g==; X-CSE-ConnectionGUID: 5fBZh1ilSjGQNw7MTBX7UA== X-CSE-MsgGUID: zSZyal1aTQuS6MQI8uHhVw== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="31516994" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="31516994" 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: 9G8p2xMUR6CU7a0uvuwnLw== X-CSE-MsgGUID: 2/DwGx+TRF6XBtqnEz1n/A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79883025" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 09:53:04 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 01/10] config/x86: add global defines for checking AVX-512 Date: Tue, 8 Oct 2024 17:52:49 +0100 Message-ID: <20241008165258.2802099-2-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 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 Rather than having each driver do its own checking for AVX-512 support, let's do it once in config/x86/meson.build and let all drivers re-use that result. Signed-off-by: Bruce Richardson --- config/x86/meson.build | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/config/x86/meson.build b/config/x86/meson.build index 8087b9ae91..265580a555 100644 --- a/config/x86/meson.build +++ b/config/x86/meson.build @@ -14,16 +14,27 @@ if is_linux or cc.get_id() == 'gcc' endif endif -# check if compiler is working with _mm512_extracti64x4_epi64 -# Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82887 -if cc.has_argument('-mavx512f') +cc_avx512_flags = ['-mavx512f', '-mavx512vl', '-mavx512dq', '-mavx512bw'] +cc_has_avx512 = false +target_has_avx512 = false +if binutils_ok and cc.has_multi_arguments(cc_avx512_flags) + # check if compiler is working with _mm512_extracti64x4_epi64 + # Ref: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82887 code = '''#include void test(__m512i zmm){ __m256i ymm = _mm512_extracti64x4_epi64(zmm, 0);}''' - result = cc.compiles(code, args : '-mavx512f', name : 'AVX512 checking') + result = cc.compiles(code, args : cc_avx512_flags, name : 'AVX512 checking') if result == false machine_args += '-mno-avx512f' warning('Broken _mm512_extracti64x4_epi64, disabling AVX512 support') + else + cc_has_avx512 = true + target_has_avx512 = ( + 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) != '' + ) endif endif From patchwork Tue Oct 8 16:52:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 145464 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org 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 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') From patchwork Tue Oct 8 16:52:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 145465 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1B54845AE3; Tue, 8 Oct 2024 18:53:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6982F40E24; Tue, 8 Oct 2024 18:53:11 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id D7BA940B8C 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=N8AkMNuRa83pXyHNqKN6fESWEjNh4RrwFqLOiDv4ezk=; b=UUxv2UdlOJO/SpEDPMaqNx2SPTQOtMYwWfULzCshuU8O0fAjR0ZWIcsR 8LquwECGwUnUb41eagkbNEQCVx9DpsJ5aqEik2fHtewcWWRkbY5No0F0V A6TPfvLII5x9APX/WK49sOgK4pFzqLlZ6u3MbiJJhfPq0bfV47mrclRDs rbwJgzpJx6Ihhz6qL2BMkzUQVNgiYWXKEmYIYRXx22hNPfNYu9069Evz1 6/mp80LUNLApAH3ccx6Lqgvyu+PWutSGI2+YM4SwRxIyrnbhyAcq3XvVH BX1xicir55gXk4drMa5d8u9uQ6ZFFJyiwtpmo8F2joZUbIXAQC2QD11pU A==; X-CSE-ConnectionGUID: XT0anTGZR4e3RFG5lpD2Vw== X-CSE-MsgGUID: QcbiDy2tTL+YtZfgc+7Csg== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="31517002" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="31517002" 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:06 -0700 X-CSE-ConnectionGUID: CJFsGpoXTv+aAEfnCXOZ1w== X-CSE-MsgGUID: kY2aJLwzR/uF0BP5sGEUFw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79883034" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 09:53:06 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 03/10] common/idpf: use global AVX-512 variables Date: Tue, 8 Oct 2024 17:52:51 +0100 Message-ID: <20241008165258.2802099-4-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 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/common/idpf/meson.build | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/drivers/common/idpf/meson.build b/drivers/common/idpf/meson.build index 80c8906f80..46fd45c03b 100644 --- a/drivers/common/idpf/meson.build +++ b/drivers/common/idpf/meson.build @@ -16,22 +16,9 @@ sources = files( ) if arch_subdir == 'x86' - idpf_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) != '' - ) - - idpf_avx512_cc_support = ( - not machine_args.contains('-mno-avx512f') and - cc.has_argument('-mavx512f') and - cc.has_argument('-mavx512bw') and - cc.has_argument('-mavx512dq') - ) - - if idpf_avx512_cpu_support == true or idpf_avx512_cc_support == true + if cc_has_avx512 cflags += ['-DCC_AVX512_SUPPORT'] - avx512_args = [cflags, '-mavx512f', '-mavx512bw', '-mavx512dq'] + avx512_args = cflags + cc_avx512_flags if cc.has_argument('-march=skylake-avx512') avx512_args += '-march=skylake-avx512' endif From patchwork Tue Oct 8 16:52:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 145466 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9386945AE3; Tue, 8 Oct 2024 18:53:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 910AC40E2A; Tue, 8 Oct 2024 18:53:12 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id 49DC340659 for ; Tue, 8 Oct 2024 18:53:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728406388; x=1759942388; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=gTzYQXWgFvBqavQVlUMy46PW20g2yy1byPty5unEh0Y=; b=aj6FDaCWj0ZL6qcSOoG7W2KjWE91Q4VRDK8M/8Vv5zCSnEtkvQQKcJaL GfzJ480H9TYaOZiIFbZE0Ln/gVUtqZxnqjxKgIXrc7JZSE6LetDbmgLOx +vKvyuoF17d/PqhUTPCHtyzjg+Xp2dc/5LiPJJxb9CWdi0xhOThkXTo2H 1xqb0/9/yrBbv67YXWM6n+9ufWNEWSOoWrUnelpGyZfEq5gzW6Pc/2PHV PMouua0nw7WOKIJA5lOz1R6kANO9UXJLszk5EZfoUkEnyFtCMuyZfkEca dTwGTw7fPXQHpWfV/4zCcPacskkzf8GlU2vgPw5BsDtSXPy3H/V9enE+E w==; X-CSE-ConnectionGUID: ynaKABuWQ3OHa4ANESvbJw== X-CSE-MsgGUID: 2S0r2hOxTUOG64gartERMg== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="31517005" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="31517005" 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:07 -0700 X-CSE-ConnectionGUID: H8Xrp5NbS4iwrtirTt+Uyg== X-CSE-MsgGUID: OlMNEOKYTYSQqxx1JS0pDw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79883038" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 09:53:07 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 04/10] net/cpfl: use global AVX-512 variables Date: Tue, 8 Oct 2024 17:52:52 +0100 Message-ID: <20241008165258.2802099-5-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 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/net/cpfl/meson.build | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build index e4e0e269bd..87fcfe0bb1 100644 --- a/drivers/net/cpfl/meson.build +++ b/drivers/net/cpfl/meson.build @@ -22,23 +22,8 @@ sources = files( 'cpfl_rules.c', ) -if arch_subdir == 'x86' - cpfl_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) != '' - ) - - cpfl_avx512_cc_support = ( - not machine_args.contains('-mno-avx512f') and - cc.has_argument('-mavx512f') and - cc.has_argument('-mavx512bw') and - cc.has_argument('-mavx512dq') - ) - - if cpfl_avx512_cpu_support == true or cpfl_avx512_cc_support == true - cflags += ['-DCC_AVX512_SUPPORT'] - endif +if arch_subdir == 'x86' and cc_has_avx512 + cflags += ['-DCC_AVX512_SUPPORT'] endif if dpdk_conf.has('RTE_HAS_JANSSON') From patchwork Tue Oct 8 16:52:53 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 145467 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id C528C45AE3; Tue, 8 Oct 2024 18:53:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B13DF40E43; Tue, 8 Oct 2024 18:53:13 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id E67E540659 for ; Tue, 8 Oct 2024 18:53:08 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728406389; x=1759942389; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=0I9OyarlESUJNTZ1B8YKEjiA6Zw0jtL0IHbp1FqaDX0=; b=IKcpS/YthFe7NHnjU1SMsrX8xo6u5832iXlNZTT1XhjIlTPTFcEK0cBs eqYqIRB84Fkc0bPhL4WPMGWv/WcYmKbSPdmpI1PEdsgKvhYHaGts/ic7Y y5DaS1p7yRMZ95WmeoaqCDfq32bOrlmguLl1Xy8eI4fjo4mZHemnvehUP dSrOWU3guTOJLWUJNMOHk2G0ktX/eXUNeaPk+/lVkQ0p8bIiVEewV3uQn G0vpEVIVSP5tnw9tIjnsT3Wdp2HJie59aHqfqlW3lPo3UMK5Ruiqsx+rg a3Lf7GpVo/sBVlpULo+aQoonq9WfQYtpY2fKE5mvwtZ1ym2sw4ML5VG9m A==; X-CSE-ConnectionGUID: zQH21rEMS0qjA2kKge3jaQ== X-CSE-MsgGUID: 9MzkWdk6SfabaDRqg1hylg== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="31517008" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="31517008" 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:08 -0700 X-CSE-ConnectionGUID: D7AQ61hKSt+lk96ac1ttTQ== X-CSE-MsgGUID: 0mDdX7XlQgiDNThfbRGNYA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79883042" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 09:53:08 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 05/10] net/i40e: use global AVX-512 variables Date: Tue, 8 Oct 2024 17:52:53 +0100 Message-ID: <20241008165258.2802099-6-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 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/net/i40e/meson.build | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build index 80171b9dc6..ef7b1f5d34 100644 --- a/drivers/net/i40e/meson.build +++ b/drivers/net/i40e/meson.build @@ -57,18 +57,9 @@ if arch_subdir == 'x86' c_args: [cflags, '-mavx2']) objs += i40e_avx2_lib.extract_objects('i40e_rxtx_vec_avx2.c') - i40e_avx512_cpu_support = ( - cc.get_define('__AVX512F__', args: machine_args) != '' and - cc.get_define('__AVX512BW__', args: machine_args) != '') - - i40e_avx512_cc_support = ( - not machine_args.contains('-mno-avx512f') and - cc.has_argument('-mavx512f') and - cc.has_argument('-mavx512bw')) - - if i40e_avx512_cpu_support == true or i40e_avx512_cc_support == true + if cc_has_avx512 cflags += ['-DCC_AVX512_SUPPORT'] - avx512_args = [cflags, '-mavx512f', '-mavx512bw'] + avx512_args = cflags + cc_avx512_flags if cc.has_argument('-march=skylake-avx512') avx512_args += '-march=skylake-avx512' endif From patchwork Tue Oct 8 16:52:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 145468 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 73FB645AE3; Tue, 8 Oct 2024 18:53:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D0A2E40E4C; Tue, 8 Oct 2024 18:53:14 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id BFA0540B8C for ; Tue, 8 Oct 2024 18:53:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728406390; x=1759942390; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=faeqMyLq6aiRx0SUZQq5dZ/jlxY34EQdyxGnTN9xB94=; b=fRI8Xje/2SL4UKNa7qhZT0GIzpmF+GMyx4YB58ve7eR7+RUQSELQR3BD /hB6MDCKo4/8y4J9sE6E0EkU54RUnhcbn5q4WrUPtO+/cISmDPZTizfDX bXm3Z0rmPyWhKA0kRFietHCw/IUiYu5PhC0/an/TnbtYPoXaCHpfMC/Rl jR/Gn96x/sQsm0k9gi11mIaolI1lZcbqOCiXDWIP/w27BD1FHDPWxaCev QuDAt1VaenFz1ZYXbludg/Vni/r88tw5/j6knyv8KTcXesDTby2bP97z9 QYjhs86xABLTBWrkIr6rj6n0S/QbZrVdcYQF//E1SUtv+KgtmLzSx49Rw A==; X-CSE-ConnectionGUID: zsJLppdnTH6nmIAcQgnk6Q== X-CSE-MsgGUID: dcdvm6wlR+6MLxjWJTztqg== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="31517013" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="31517013" 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:09 -0700 X-CSE-ConnectionGUID: QtDoBAfdQLqRWRxDTl62Fw== X-CSE-MsgGUID: bY2ZuIbDRx+ySQGqG8YjRw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79883045" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 09:53:09 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 06/10] net/iavf: use global AVX-512 variables Date: Tue, 8 Oct 2024 17:52:54 +0100 Message-ID: <20241008165258.2802099-7-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 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/net/iavf/meson.build | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build index 83aebd5596..27d104cc12 100644 --- a/drivers/net/iavf/meson.build +++ b/drivers/net/iavf/meson.build @@ -39,18 +39,9 @@ if arch_subdir == 'x86' c_args: [cflags, '-mavx2']) objs += iavf_avx2_lib.extract_objects('iavf_rxtx_vec_avx2.c') - iavf_avx512_cpu_support = ( - cc.get_define('__AVX512F__', args: machine_args) != '' and - cc.get_define('__AVX512BW__', args: machine_args) != '') - - iavf_avx512_cc_support = ( - not machine_args.contains('-mno-avx512f') and - cc.has_argument('-mavx512f') and - cc.has_argument('-mavx512bw')) - - if iavf_avx512_cpu_support == true or iavf_avx512_cc_support == true + if cc_has_avx512 cflags += ['-DCC_AVX512_SUPPORT'] - avx512_args = [cflags, '-mavx512f', '-mavx512bw'] + avx512_args = cflags + cc_avx512_flags if cc.has_argument('-march=skylake-avx512') avx512_args += '-march=skylake-avx512' endif From patchwork Tue Oct 8 16:52:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 145469 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C43245AE3; Tue, 8 Oct 2024 18:53:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1BA5740EE1; Tue, 8 Oct 2024 18:53:16 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id BB93040E24 for ; Tue, 8 Oct 2024 18:53:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728406391; x=1759942391; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=jbY8jQtM5kr7SCD0OcoJ05lGNLE1QLeOaeCUaVyl39o=; b=BVK5Rct9PbRM91ddzvNjczGFDDptxuB7X860D6M3AhfdLRLgMYkLWQT0 yM12N+U46kLtdbY1FutCjn1nja8/MYTLNon5DEGCUNlJ+cFaT4kh+Dz4Z h5t49RaV/zXiinIwA0ogy9XpbYtT1em8S2teF040kCpo8BiJNRfyBNuYQ 09nZnbLUbiJY4ammXICuFnCfguDgNSnuXP5yaKE2GHH7FbtYcGj52CGRw rxbfAapHGFIpD6+yUbY/Kq4m+Cfm/j2rZ+89DxI1sYHKMGJvmBe2Jg0mM IjzNbJNByBZJzctOeC0jy1cxgHr+H4mXPnv5/BpKOWjIELM9WtLqNzI6Z g==; X-CSE-ConnectionGUID: g6CpVQHARkSoH5X/lsSy7A== X-CSE-MsgGUID: DRskneoBRLiPrAqG8z1ClQ== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="31517016" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="31517016" 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:10 -0700 X-CSE-ConnectionGUID: P18GAIQ7TTGR83Sn7NnbtA== X-CSE-MsgGUID: KVk7crzTQC+NHklDFtzs3g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79883051" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 09:53:10 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 07/10] net/ice: use global AVX-512 variables Date: Tue, 8 Oct 2024 17:52:55 +0100 Message-ID: <20241008165258.2802099-8-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 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/net/ice/meson.build | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build index b7f2188e62..1c9dc0cc6d 100644 --- a/drivers/net/ice/meson.build +++ b/drivers/net/ice/meson.build @@ -35,20 +35,9 @@ if arch_subdir == 'x86' c_args: [cflags, '-mavx2']) objs += ice_avx2_lib.extract_objects('ice_rxtx_vec_avx2.c') - ice_avx512_cpu_support = ( - cc.get_define('__AVX512F__', args: machine_args) != '' and - cc.get_define('__AVX512BW__', args: machine_args) != '' - ) - - ice_avx512_cc_support = ( - not machine_args.contains('-mno-avx512f') and - cc.has_argument('-mavx512f') and - cc.has_argument('-mavx512bw') - ) - - if ice_avx512_cpu_support == true or ice_avx512_cc_support == true + if cc_has_avx512 cflags += ['-DCC_AVX512_SUPPORT'] - avx512_args = [cflags, '-mavx512f', '-mavx512bw'] + avx512_args = cflags + cc_avx512_flags if cc.has_argument('-march=skylake-avx512') avx512_args += '-march=skylake-avx512' endif From patchwork Tue Oct 8 16:52:56 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 145470 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9C76E45AE3; Tue, 8 Oct 2024 18:54:05 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1D62840ED9; Tue, 8 Oct 2024 18:53:17 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id CC31040E2A for ; Tue, 8 Oct 2024 18:53: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=1728406392; x=1759942392; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Lst06Y65vzNeyqtaSv3LNJfEQUyuATN1vY9ZqmD/D6U=; b=TyqFF+8zNhMNrcLAKnrA1P4Dt2OLOp0YmZK9/WGznydOhX8bQ5xTjbtC S8vRayQlHeGMjidwrhhaLqF+nP3ZOLvDryVGUW02Iq+L57j7YOerXsius 7MPZfcajY0QEKm0cKt3XQcd8k0gnhM+1r4Ky+BOvHbQgT8OAMNOZIc9lO fnJuiHRj9kmgxxs3WN1POOXfcTpb367sc5NMEZBdOQTncpek9gmNvB6mB 2jMmABu97B+NuM6+VUI8O4FcUQWRfMt4cf3kQNyNEMvq55RddyvUH5cpF VtZT0DuF5EJegw4KgwW97TiGNbhK14E/zkPN/deMu+IH5PyuvxuluPL8h w==; X-CSE-ConnectionGUID: r4NjuofQTtmDr/hPTEWP4Q== X-CSE-MsgGUID: nRglYVojRICnb/78dE3z3Q== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="31517021" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="31517021" 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:11 -0700 X-CSE-ConnectionGUID: FGnXD74sRXCtLI/h8PXC2w== X-CSE-MsgGUID: akHZGBavSC6jMdXppMZ6sw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79883055" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 09:53:11 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 08/10] net/idpf: use global AVX-512 variables Date: Tue, 8 Oct 2024 17:52:56 +0100 Message-ID: <20241008165258.2802099-9-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 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/net/idpf/meson.build | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/drivers/net/idpf/meson.build b/drivers/net/idpf/meson.build index cf49ef167d..34cbdc4da0 100644 --- a/drivers/net/idpf/meson.build +++ b/drivers/net/idpf/meson.build @@ -14,21 +14,6 @@ sources = files( 'idpf_rxtx.c', ) -if arch_subdir == 'x86' - idpf_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) != '' - ) - - idpf_avx512_cc_support = ( - not machine_args.contains('-mno-avx512f') and - cc.has_argument('-mavx512f') and - cc.has_argument('-mavx512bw') and - cc.has_argument('-mavx512dq') - ) - - if idpf_avx512_cpu_support == true or idpf_avx512_cc_support == true - cflags += ['-DCC_AVX512_SUPPORT'] - endif +if arch_subdir == 'x86'and cc_has_avx512 + cflags += ['-DCC_AVX512_SUPPORT'] endif From patchwork Tue Oct 8 16:52:57 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 145471 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0A6CF45AE3; Tue, 8 Oct 2024 18:54:13 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1A38540E68; Tue, 8 Oct 2024 18:53:18 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.12]) by mails.dpdk.org (Postfix) with ESMTP id B237D40E36 for ; Tue, 8 Oct 2024 18:53:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1728406393; x=1759942393; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2jpqyz+I+Xbw2/I1+IBxfxamciOslQ4zejNszDRcMU8=; b=WxyC9OvbuIlbpnJ9UShMxBrwxUBmJXXcuhdny3E307/v5XL8UDJq6/Nj ntzUdRTbBBDsYjPFi9antRHdEaXyYdQv/MgUcXZfRtxQIZXqV6XrlwS+P FB+eqPG464QmRCQZ2V2zppeUA0PUkPZIqh2IIGJ/fctGAthnVoxDppAkl zAIMKekwWXLQ20EKpcO7daljfxHwbuJWJVAccmwCVkcUlQEi6P+A5mrFq EmsxTQuAr2GE/RsEirV3DV4SlpRIq84DCVCKXOS9Ln8Dpuo6HAH4jJZf2 UO76/WS+xK4JQl7DQb7k92fo4Lf/sJ6z02Y05DDUZoGNJONgBLh0F1NBI w==; X-CSE-ConnectionGUID: qGB1LmAYStasaskvtKwdCg== X-CSE-MsgGUID: JMNIvRCIT4ixYSJOWeHSrw== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="31517026" X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="31517026" 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:12 -0700 X-CSE-ConnectionGUID: cExNn5afRdGprT7eRSTf3A== X-CSE-MsgGUID: lh7wQaDiS3+VxDbImAdHPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,187,1725346800"; d="scan'208";a="79883062" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.25]) by fmviesa003.fm.intel.com with ESMTP; 08 Oct 2024 09:53:12 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: david.marchand@redhat.com, Bruce Richardson Subject: [PATCH v3 09/10] net/virtio: use global AVX-512 variables Date: Tue, 8 Oct 2024 17:52:57 +0100 Message-ID: <20241008165258.2802099-10-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 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/net/virtio/meson.build | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build index ef016c1566..02742da5c2 100644 --- a/drivers/net/virtio/meson.build +++ b/drivers/net/virtio/meson.build @@ -24,23 +24,21 @@ sources += files( deps += ['kvargs', 'bus_pci'] if arch_subdir == 'x86' - if not machine_args.contains('-mno-avx512f') - if cc.has_argument('-mavx512f') and cc.has_argument('-mavx512vl') and cc.has_argument('-mavx512bw') - cflags += ['-DCC_AVX512_SUPPORT'] - virtio_avx512_lib = static_library('virtio_avx512_lib', - 'virtio_rxtx_packed.c', - dependencies: [static_rte_ethdev, - static_rte_kvargs, static_rte_bus_pci], - include_directories: includes, - c_args: [cflags, '-mavx512f', '-mavx512bw', '-mavx512vl']) - objs += virtio_avx512_lib.extract_objects('virtio_rxtx_packed.c') - if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0')) - cflags += '-DVIRTIO_GCC_UNROLL_PRAGMA' - elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0')) - cflags += '-DVIRTIO_CLANG_UNROLL_PRAGMA' - elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0')) - cflags += '-DVIRTIO_ICC_UNROLL_PRAGMA' - endif + if cc_has_avx512 + cflags += ['-DCC_AVX512_SUPPORT'] + virtio_avx512_lib = static_library('virtio_avx512_lib', + 'virtio_rxtx_packed.c', + dependencies: [static_rte_ethdev, + static_rte_kvargs, static_rte_bus_pci], + include_directories: includes, + c_args: cflags + cc_avx512_flags) + objs += virtio_avx512_lib.extract_objects('virtio_rxtx_packed.c') + if (toolchain == 'gcc' and cc.version().version_compare('>=8.3.0')) + cflags += '-DVIRTIO_GCC_UNROLL_PRAGMA' + elif (toolchain == 'clang' and cc.version().version_compare('>=3.7.0')) + cflags += '-DVIRTIO_CLANG_UNROLL_PRAGMA' + elif (toolchain == 'icc' and cc.version().version_compare('>=16.0.0')) + cflags += '-DVIRTIO_ICC_UNROLL_PRAGMA' endif endif sources += files('virtio_rxtx_simple_sse.c') From patchwork Tue Oct 8 16:52:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 145472 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org 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 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