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 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 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/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') -- 2.43.0