node: fix arm64 build issue for older gcc
Checks
Commit Message
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.
Fixes: 16df6a2c6671 ("node: add IPv4 lookup for arm64")
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
---
lib/librte_node/ip4_lookup_neon.h | 1 +
1 file changed, 1 insertion(+)
Comments
> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Nithin Dabilpuram
> Sent: Wednesday, May 13, 2020 1:48 PM
> To: kirankumark@marvell.com; jerinj@marvell.com;
> david.marchand@redhat.com; Nithin Dabilpuram
> <ndabilpuram@marvell.com>; Pavan Nikhilesh <pbhagavatula@marvell.com>
> Cc: dev@dpdk.org
> Subject: [dpdk-dev] [PATCH] node: fix arm64 build issue for older gcc
>
> Older GCC(~4) complains about uninitialized 'dip'
> var though all the lanes of the vec register are set.
Better to add compiler output here.
Otherwise looks good to me.
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Hence this patch explicitly initializes vec register to fix the issue.
>
> Fixes: 16df6a2c6671 ("node: add IPv4 lookup for arm64")
>
> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> ---
> 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 bb3150f..dd21cb2 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.8.4
On Wed, May 13, 2020 at 08:51:13AM +0000, Ruifeng Wang wrote:
> External Email
>
> ----------------------------------------------------------------------
>
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Nithin Dabilpuram
> > Sent: Wednesday, May 13, 2020 1:48 PM
> > To: kirankumark@marvell.com; jerinj@marvell.com;
> > david.marchand@redhat.com; Nithin Dabilpuram
> > <ndabilpuram@marvell.com>; Pavan Nikhilesh <pbhagavatula@marvell.com>
> > Cc: dev@dpdk.org
> > Subject: [dpdk-dev] [PATCH] node: fix arm64 build issue for older gcc
> >
> > Older GCC(~4) complains about uninitialized 'dip'
> > var though all the lanes of the vec register are set.
>
> Better to add compiler output here.
> Otherwise looks good to me.
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Ack. Will send a v2.
>
> > Hence this patch explicitly initializes vec register to fix the issue.
> >
> > Fixes: 16df6a2c6671 ("node: add IPv4 lookup for arm64")
> >
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > ---
> > 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 bb3150f..dd21cb2 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.8.4
>
@@ -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) {