patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, stable@dpdk.org,
	Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
Subject: [PATCH] doc: clarify disabling AVX-512 when building on Haswell CPUs
Date: Wed,  2 Jul 2025 09:36:49 -0400	[thread overview]
Message-ID: <20250702133649.1931134-1-14pwcse1224@uetpeshawar.edu.pk> (raw)

Some Intel Xeon processors (e.g., E5 v3 Haswell) do not support AVX-512
instructions, and building DPDK targeting 'native' instruction set can
fail with 'target specific option mismatch' errors.

This patch updates the build guide with instructions for configuring
Meson to disable AVX-512 and target the Haswell architecture.

Bugzilla ID: 1736
Cc: stable@dpdk.org

Signed-off-by: Khadem Ullah <14pwcse1224@uetpeshawar.edu.pk>
---
 doc/guides/linux_gsg/build_dpdk.rst | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/doc/guides/linux_gsg/build_dpdk.rst b/doc/guides/linux_gsg/build_dpdk.rst
index 9c0dd9daf6..57d3fd484b 100644
--- a/doc/guides/linux_gsg/build_dpdk.rst
+++ b/doc/guides/linux_gsg/build_dpdk.rst
@@ -123,6 +123,28 @@ The instruction set will be set automatically by default according to these rule
 
 To override what instruction set will be used, set the ``cpu_instruction_set``
 parameter to the instruction set of your choice (such as ``corei7``, ``power8``, etc.).
+.. note::
+
+   **Disabling AVX-512 instructions when targeting older Intel CPUs**
+
+   On some Intel CPUs (e.g., Xeon E5 v3 "Haswell"), building with
+   ``cpu_instruction_set=native`` or not specifying it at all can cause
+   errors like::
+
+       inlining failed in call to always_inline '_mm512_maskz_broadcast_i32x4': target specific option mismatch
+
+   or::
+
+       AVX512F vector return without AVX512F enabled
+
+   This happens because the compiler tries to use AVX-512 instructions that the CPU does not support.
+
+   To avoid these errors, you can disable AVX-512 explicitly and set the architecture to Haswell by configuring with:
+
+   .. code-block:: console
+
+      meson setup build -Dc_args="-march=haswell -mno-avx512f" -Dcpu_instruction_set=haswell
+
 
 ``cpu_instruction_set`` is not used in Arm builds, as setting the instruction set
 without other parameters leads to inferior builds. The way to tailor Arm builds
-- 
2.43.0


             reply	other threads:[~2025-07-02 13:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-02 13:36 Khadem Ullah [this message]
2025-07-02 13:56 ` Bruce Richardson

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=20250702133649.1931134-1-14pwcse1224@uetpeshawar.edu.pk \
    --to=14pwcse1224@uetpeshawar.edu.pk \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=stable@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).