aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic/pktio/dpdk_parse.c
diff options
context:
space:
mode:
authorMatias Elo <matias.elo@nokia.com>2021-01-12 09:24:24 +0200
committerMatias Elo <matias.elo@nokia.com>2021-01-15 08:18:37 +0200
commitf7f729f1297933c11ca6e65bc380bd495e0572ca (patch)
tree63dd351015a5a15dc25eb671e1f806e0a62713b4 /platform/linux-generic/pktio/dpdk_parse.c
parent71ff75c68a38264b4889ac36be7152d04c1f480b (diff)
linux-dpdk: packet_vector: fix build on ppc64
DPDK ppc64 code may define 'vector' internally through altivec.h. Undef 'vector' after DPDK includes to avoid compilation failures with the new vector APIs, which use the same word. Signed-off-by: Matias Elo <matias.elo@nokia.com> Reviewed-by: Jere Leppänen <jere.leppanen@nokia.com>
Diffstat (limited to 'platform/linux-generic/pktio/dpdk_parse.c')
-rw-r--r--platform/linux-generic/pktio/dpdk_parse.c4
1 files changed, 4 insertions, 0 deletions
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)