patch 'dma/idxd: fix non-AVX builds with old compilers' has been queued to stable release 21.11.2
Kevin Traynor
ktraynor at redhat.com
Tue Jun 28 17:19:16 CEST 2022
Hi,
FYI, your patch has been queued to stable release 21.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 06/30/22. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable
This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/1b31f49983824786d4c579fd71c80da10faf376a
Thanks.
Kevin
---
>From 1b31f49983824786d4c579fd71c80da10faf376a Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson at intel.com>
Date: Thu, 23 Jun 2022 14:49:33 +0100
Subject: [PATCH] dma/idxd: fix non-AVX builds with old compilers
[ upstream commit 86f89b626b7ccb250b7688559922e942f413d0a0 ]
When building without AVX2 support using an older compiler e.g. gcc 4.8
on Centos/RHEL 7, we get build errors due to the use of AVX2 intrinsics.
This is because the compiler does not support
"__attribute__((target(AVX2)))" function attribute. Disable build of
this driver such edge cases.
Generic builds using recent compilers, and all builds with a minimum
baseline of AVX2 are unaffected by this change.
Fixes: aa802b10237c ("dma/idxd: fix AVX2 in non-datapath functions")
Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
Tested-by: Yu Jiang <yux.jiang at intel.com>
---
drivers/dma/idxd/meson.build | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/dma/idxd/meson.build b/drivers/dma/idxd/meson.build
index dcc0a297d7..c5403b431c 100644
--- a/drivers/dma/idxd/meson.build
+++ b/drivers/dma/idxd/meson.build
@@ -5,4 +5,15 @@ build = dpdk_conf.has('RTE_ARCH_X86')
reason = 'only supported on x86'
+test_avx2_code = '''
+#include <x86intrin.h>
+__attribute__((target("avx2")))
+__m256i fn(void *x) { return _mm256_loadu_si256(x); }
+'''
+if build and not cc.compiles(test_avx2_code, args:machine_args)
+ build = false
+ reason = 'missing support for AVX2 function attribute'
+ subdir_done()
+endif
+
deps += ['bus_pci']
sources = files(
--
2.34.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2022-06-28 16:18:04.150368619 +0100
+++ 0004-dma-idxd-fix-non-AVX-builds-with-old-compilers.patch 2022-06-28 16:18:03.999387177 +0100
@@ -1 +1 @@
-From 86f89b626b7ccb250b7688559922e942f413d0a0 Mon Sep 17 00:00:00 2001
+From 1b31f49983824786d4c579fd71c80da10faf376a Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 86f89b626b7ccb250b7688559922e942f413d0a0 ]
+
@@ -16 +17,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list