diff options
6 files changed, 27 insertions, 3 deletions
diff --git a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h index 149ca1574..9a7e52dd4 100644 --- a/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h +++ b/platform/linux-dpdk/include/odp/api/plat/packet_inlines.h @@ -36,12 +36,16 @@ extern "C" { #include <rte_config.h> #include <rte_mbuf.h> -/* ppc64 rte_memcpy.h may overwrite bool with incompatible type */ +/* ppc64 rte_memcpy.h may overwrite bool with an incompatible type and define + * vector */ #include <rte_memcpy.h> #if defined(__PPC64__) && defined(bool) #undef bool #define bool _Bool #endif +#if defined(__PPC64__) && defined(vector) + #undef vector +#endif /** @cond _ODP_HIDE_FROM_DOXYGEN_ */ diff --git a/platform/linux-dpdk/include/odp/api/plat/std_clib_inlines.h b/platform/linux-dpdk/include/odp/api/plat/std_clib_inlines.h index aed77b780..7dbba2be8 100644 --- a/platform/linux-dpdk/include/odp/api/plat/std_clib_inlines.h +++ b/platform/linux-dpdk/include/odp/api/plat/std_clib_inlines.h @@ -15,12 +15,16 @@ #if defined(__clang__) #undef RTE_TOOLCHAIN_GCC #endif -/* ppc64 rte_memcpy.h may overwrite bool with incompatible type */ +/* ppc64 rte_memcpy.h may overwrite bool with an incompatible type and define + * vector */ #include <rte_memcpy.h> #if defined(__PPC64__) && defined(bool) #undef bool #define bool _Bool #endif +#if defined(__PPC64__) && defined(vector) + #undef vector +#endif #ifndef _ODP_NO_INLINE /* Inline functions by default */ diff --git a/platform/linux-dpdk/include/odp_buffer_internal.h b/platform/linux-dpdk/include/odp_buffer_internal.h index f9e36e69b..834913fe1 100644 --- a/platform/linux-dpdk/include/odp_buffer_internal.h +++ b/platform/linux-dpdk/include/odp_buffer_internal.h @@ -38,6 +38,10 @@ extern "C" { #undef RTE_TOOLCHAIN_GCC #endif #include <rte_mbuf.h> +/* ppc64 rte_memcpy.h (included through rte_mbuf.h) may define vector */ +#if defined(__PPC64__) && defined(vector) + #undef vector +#endif ODP_STATIC_ASSERT(CONFIG_PACKET_SEG_LEN_MIN >= 256, "ODP Segment size must be a minimum of 256 bytes"); diff --git a/platform/linux-dpdk/include/odp_packet_internal.h b/platform/linux-dpdk/include/odp_packet_internal.h index cdaf6b5ef..20a46a577 100644 --- a/platform/linux-dpdk/include/odp_packet_internal.h +++ b/platform/linux-dpdk/include/odp_packet_internal.h @@ -38,6 +38,10 @@ extern "C" { #endif #include <rte_mbuf.h> #include <rte_memory.h> +/* ppc64 rte_memcpy.h (included through rte_mbuf.h) may define vector */ +#if defined(__PPC64__) && defined(vector) + #undef vector +#endif /** Minimum segment length expected by packet_parse_common() */ #define PACKET_PARSE_SEG_LEN 96 diff --git a/platform/linux-dpdk/include/odp_pool_internal.h b/platform/linux-dpdk/include/odp_pool_internal.h index 3450a3ffd..5cd3ed713 100644 --- a/platform/linux-dpdk/include/odp_pool_internal.h +++ b/platform/linux-dpdk/include/odp_pool_internal.h @@ -33,11 +33,15 @@ extern "C" { #include <rte_config.h> #include <rte_mbuf.h> #include <rte_mempool.h> -/* ppc64 rte_memcpy.h may overwrite bool with incompatible type */ +/* ppc64 rte_memcpy.h may overwrite bool with an incompatible type and define + * vector */ #if defined(__PPC64__) && defined(bool) #undef bool #define bool _Bool #endif +#if defined(__PPC64__) && defined(vector) + #undef vector +#endif /* Use ticketlock instead of spinlock */ #define POOL_USE_TICKETLOCK diff --git a/platform/linux-generic/pktio/dpdk_parse.c b/platform/linux-generic/pktio/dpdk_parse.c index 9dad1a7ae..2b41b14a2 100644 --- a/platform/linux-generic/pktio/dpdk_parse.c +++ b/platform/linux-generic/pktio/dpdk_parse.c @@ -19,6 +19,10 @@ #include <rte_config.h> #include <rte_mbuf.h> +/* ppc64 rte_memcpy.h (included through rte_mbuf.h) may define vector */ +#if defined(__PPC64__) && defined(vector) + #undef vector +#endif #define IP4_CSUM_RESULT(ol_flags) (ol_flags & PKT_RX_IP_CKSUM_MASK) #define L4_CSUM_RESULT(ol_flags) (ol_flags & PKT_RX_L4_CKSUM_MASK) |