From a8b8a863179e0a8478d488bb8545e632ed163456 Mon Sep 17 00:00:00 2001 From: Nithin Dabilpuram Date: Wed, 13 May 2020 17:36:04 +0530 Subject: [PATCH] node: fix arm64 build with old gcc MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Older GCC(~4) complains about uninitialized 'dip' var though all the lanes of the vec register are set. Hence this patch explicitly initializes vec register to fix the issue. In file included from ip4_lookup.c:34:0: ip4_lookup_neon.h: n function ‘ip4_lookup_node_process’: \ ip4_lookup_neon.h:25:12: error: ‘dip’ may be used uninitialized in \ this function [-Werror=maybe-uninitialized] int32x4_t dip; ^ Fixes: 16df6a2c6671 ("node: add IPv4 lookup for arm64") Reported-by: David Marchand Signed-off-by: Nithin Dabilpuram Reviewed-by: Ruifeng Wang Reviewed-by: Jerin Jacob --- lib/librte_node/ip4_lookup_neon.h | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_node/ip4_lookup_neon.h b/lib/librte_node/ip4_lookup_neon.h index bb3150ff29..dd21cb28a2 100644 --- a/lib/librte_node/ip4_lookup_neon.h +++ b/lib/librte_node/ip4_lookup_neon.h @@ -45,6 +45,7 @@ ip4_lookup_node_process(struct rte_graph *graph, struct rte_node *node, rte_prefetch0(rte_pktmbuf_mtod_offset(pkts[i], void *, sizeof(struct rte_ether_hdr))); + dip = vdupq_n_s32(0); /* Get stream for the speculated next node */ to_next = rte_node_next_stream_get(graph, node, next_index, nb_objs); while (n_left_from >= 4) { -- 2.20.1