[dpdk-dev] [PATCH] rte_trace: fix build on PPC64
Thinh Tran
thinhtr at linux.vnet.ibm.com
Mon Apr 27 23:58:49 CEST 2020
The AltiVec header file breaks boolean type:
In file included from ../lib/librte_mempool/rte_mempool_trace_fp.h:18:0,
from ../lib/librte_mempool/rte_mempool.h:54,
from ../lib/librte_mbuf/rte_mbuf.h:38,
from ../lib/librte_net/rte_ether.h:23,
from ../drivers/common/mlx5/mlx5_nl.h:10,
from ../drivers/common/mlx5/mlx5_nl.c:23:
../lib/librte_eal/include/rte_trace_point.h: In function
‘__rte_trace_point_fp_is_enabled’:
../lib/librte_eal/include/rte_trace_point.h:226:9: error: incompatible
types when returning type ‘int’ but ‘__vector __bool int {aka
__vector(4) __bool int}’ was expected
return false;
This is the same as
https://git.dpdk.org/dpdk/commit/?id=725f5dd
and yet, there is no better solution for it
Signed-off-by: Thinh Tran <thinhtr at linux.vnet.ibm.com>
---
lib/librte_eal/include/rte_trace_point.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/librte_eal/include/rte_trace_point.h b/lib/librte_eal/include/rte_trace_point.h
index 4d956ec16..2ede9e3ba 100644
--- a/lib/librte_eal/include/rte_trace_point.h
+++ b/lib/librte_eal/include/rte_trace_point.h
@@ -26,6 +26,12 @@ extern "C" {
#include <rte_common.h>
#include <rte_compat.h>
+#if defined(__PPC64__) && !defined(__APPLE_ALTIVEC__)
+#undef bool
+/* redefine as in stdbool.h */
+#define bool _Bool
+#endif
+
/** The tracepoint object. */
typedef uint64_t rte_trace_point_t;
--
2.17.1
More information about the dev
mailing list