DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: david.marchand@redhat.com, Bruce Richardson <bruce.richardson@intel.com>
Subject: [PATCH v3 10/10] net: use global AVX-512 variables
Date: Tue,  8 Oct 2024 17:52:58 +0100	[thread overview]
Message-ID: <20241008165258.2802099-11-bruce.richardson@intel.com> (raw)
In-Reply-To: <20241008165258.2802099-1-bruce.richardson@intel.com>

Replace some library-specific checks for AVX-512 with the standard
variables from config/x86.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 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
-- 
2.43.0


  parent reply	other threads:[~2024-10-08 16:54 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-30 17:50 [PATCH v1 0/8] centralize AVX-512 feature detection Bruce Richardson
2024-09-30 17:50 ` [PATCH v1 1/8] config/x86: add global defines for checking AVX-512 Bruce Richardson
2024-09-30 17:50 ` [PATCH v1 2/8] event/dlb2: use global AVX-512 variables Bruce Richardson
2024-09-30 17:50 ` [PATCH v1 3/8] common/idpf: " Bruce Richardson
2024-09-30 17:50 ` [PATCH v1 4/8] net/cpfl: " Bruce Richardson
2024-09-30 17:50 ` [PATCH v1 5/8] net/i40e: " Bruce Richardson
2024-09-30 17:50 ` [PATCH v1 6/8] net/iavf: " Bruce Richardson
2024-09-30 17:50 ` [PATCH v1 7/8] net/ice: " Bruce Richardson
2024-09-30 17:50 ` [PATCH v1 8/8] net/idpf: " Bruce Richardson
2024-10-01 11:17 ` [PATCH v2 0/8] centralize AVX-512 feature detection Bruce Richardson
2024-10-01 11:17   ` [PATCH v2 1/8] config/x86: add global defines for checking AVX-512 Bruce Richardson
2024-10-01 11:17   ` [PATCH v2 2/8] event/dlb2: use global AVX-512 variables Bruce Richardson
2024-10-01 11:17   ` [PATCH v2 3/8] common/idpf: " Bruce Richardson
2024-10-01 11:17   ` [PATCH v2 4/8] net/cpfl: " Bruce Richardson
2024-10-01 11:17   ` [PATCH v2 5/8] net/i40e: " Bruce Richardson
2024-10-01 11:17   ` [PATCH v2 6/8] net/iavf: " Bruce Richardson
2024-10-01 11:18   ` [PATCH v2 7/8] net/ice: " Bruce Richardson
2024-10-01 11:18   ` [PATCH v2 8/8] net/idpf: " Bruce Richardson
2024-10-08  8:49   ` [PATCH v2 0/8] centralize AVX-512 feature detection David Marchand
2024-10-08 10:02     ` Bruce Richardson
2024-10-08 11:33       ` David Marchand
2024-10-08 11:35         ` Bruce Richardson
2024-10-08 16:52 ` [PATCH v3 00/10] " Bruce Richardson
2024-10-08 16:52   ` [PATCH v3 01/10] config/x86: add global defines for checking AVX-512 Bruce Richardson
2024-10-08 16:52   ` [PATCH v3 02/10] event/dlb2: use global AVX-512 variables Bruce Richardson
2024-10-08 16:52   ` [PATCH v3 03/10] common/idpf: " Bruce Richardson
2024-10-08 16:52   ` [PATCH v3 04/10] net/cpfl: " Bruce Richardson
2024-10-08 16:52   ` [PATCH v3 05/10] net/i40e: " Bruce Richardson
2024-10-08 16:52   ` [PATCH v3 06/10] net/iavf: " Bruce Richardson
2024-10-08 16:52   ` [PATCH v3 07/10] net/ice: " Bruce Richardson
2024-10-08 16:52   ` [PATCH v3 08/10] net/idpf: " Bruce Richardson
2024-10-08 16:52   ` [PATCH v3 09/10] net/virtio: " Bruce Richardson
2024-10-08 16:52   ` Bruce Richardson [this message]
2024-10-09  9:05   ` [PATCH v3 00/10] centralize AVX-512 feature detection David Marchand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241008165258.2802099-11-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).