[dpdk-stable] patch 'net/mlx4: fix build on ppc64' has been queued to LTS release 17.11.10

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Dec 19 15:32:33 CET 2019


Hi,

FYI, your patch has been queued to LTS release 17.11.10

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 12/21/19. 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.

Thanks.

Luca Boccassi

---
>From 60d0f2e0794c7b507c4c2f4f9ce5e3ec5a94045a Mon Sep 17 00:00:00 2001
From: Christian Ehrhardt <christian.ehrhardt at canonical.com>
Date: Tue, 13 Aug 2019 13:28:43 +0200
Subject: [PATCH] net/mlx4: fix build on ppc64

[ upstream commit ceadf1a405d9951c6d15ed27e010f5b1a80dbdf5 ]

The AltiVec header file breaks boolean type:

error: incompatible types when initializing type
'__vector _bool int' {aka '_vector(4) __bool int'} using type 'int'

If __APPLE_ALTIVEC__ is defined, then bool type is redefined
and conflicts with stdbool.h.

There is no good solution to fix it for the whole project without
breaking something else, so a workaround is inserted in mlx5 PMD.
This workaround is not compatible with C++ but there is no C++ in DPDK.

Related to: 725f5dd0bfb5 ("net/mlx5: fix build on PPC64")

Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
Tested-by: David Christensen <drc at linux.vnet.ibm.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx4/mlx4_utils.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h
index 4f11405a34..02e6b7be2c 100644
--- a/drivers/net/mlx4/mlx4_utils.h
+++ b/drivers/net/mlx4/mlx4_utils.h
@@ -43,6 +43,16 @@
 
 #include "mlx4.h"
 
+/*
+ * Compilation workaround for PPC64 when AltiVec is fully enabled, e.g. std=c11.
+ * Otherwise there would be a type conflict between stdbool and altivec.
+ */
+#if defined(__PPC64__) && !defined(__APPLE_ALTIVEC__)
+#undef bool
+/* redefine as in stdbool.h */
+#define bool _Bool
+#endif
+
 #ifndef NDEBUG
 
 /*
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-12-19 14:32:26.581472304 +0000
+++ 0006-net-mlx4-fix-build-on-ppc64.patch	2019-12-19 14:32:25.401283865 +0000
@@ -1,8 +1,10 @@
-From ceadf1a405d9951c6d15ed27e010f5b1a80dbdf5 Mon Sep 17 00:00:00 2001
+From 60d0f2e0794c7b507c4c2f4f9ce5e3ec5a94045a Mon Sep 17 00:00:00 2001
 From: Christian Ehrhardt <christian.ehrhardt at canonical.com>
 Date: Tue, 13 Aug 2019 13:28:43 +0200
 Subject: [PATCH] net/mlx4: fix build on ppc64
 
+[ upstream commit ceadf1a405d9951c6d15ed27e010f5b1a80dbdf5 ]
+
 The AltiVec header file breaks boolean type:
 
 error: incompatible types when initializing type
@@ -16,7 +18,6 @@
 This workaround is not compatible with C++ but there is no C++ in DPDK.
 
 Related to: 725f5dd0bfb5 ("net/mlx5: fix build on PPC64")
-Cc: stable at dpdk.org
 
 Signed-off-by: Christian Ehrhardt <christian.ehrhardt at canonical.com>
 Tested-by: David Christensen <drc at linux.vnet.ibm.com>
@@ -26,10 +27,10 @@
  1 file changed, 10 insertions(+)
 
 diff --git a/drivers/net/mlx4/mlx4_utils.h b/drivers/net/mlx4/mlx4_utils.h
-index a49190252f..74b9d2ecdc 100644
+index 4f11405a34..02e6b7be2c 100644
 --- a/drivers/net/mlx4/mlx4_utils.h
 +++ b/drivers/net/mlx4/mlx4_utils.h
-@@ -15,6 +15,16 @@
+@@ -43,6 +43,16 @@
  
  #include "mlx4.h"
  
@@ -43,9 +44,9 @@
 +#define bool _Bool
 +#endif
 +
- extern int mlx4_logtype;
- 
  #ifndef NDEBUG
+ 
+ /*
 -- 
 2.20.1
 


More information about the stable mailing list