DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] node: fix arm64 build issue for older gcc
@ 2020-05-13  5:48 Nithin Dabilpuram
  2020-05-13  8:51 ` Ruifeng Wang
  2020-05-13 12:06 ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
  0 siblings, 2 replies; 6+ messages in thread
From: Nithin Dabilpuram @ 2020-05-13  5:48 UTC (permalink / raw)
  To: kirankumark, jerinj, david.marchand, Nithin Dabilpuram, Pavan Nikhilesh
  Cc: dev

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(+)

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH] node: fix arm64 build issue for older gcc
  2020-05-13  5:48 [dpdk-dev] [PATCH] node: fix arm64 build issue for older gcc Nithin Dabilpuram
@ 2020-05-13  8:51 ` Ruifeng Wang
  2020-05-13 10:32   ` [dpdk-dev] [EXT] " Nithin Dabilpuram
  2020-05-13 12:06 ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
  1 sibling, 1 reply; 6+ messages in thread
From: Ruifeng Wang @ 2020-05-13  8:51 UTC (permalink / raw)
  To: Nithin Dabilpuram, kirankumark, jerinj, david.marchand, Pavan Nikhilesh
  Cc: dev, nd


> -----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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [EXT] RE: [PATCH] node: fix arm64 build issue for older gcc
  2020-05-13  8:51 ` Ruifeng Wang
@ 2020-05-13 10:32   ` Nithin Dabilpuram
  0 siblings, 0 replies; 6+ messages in thread
From: Nithin Dabilpuram @ 2020-05-13 10:32 UTC (permalink / raw)
  To: Ruifeng Wang
  Cc: kirankumark, jerinj, david.marchand, Pavan Nikhilesh, dev, nd

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
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [dpdk-dev] [PATCH v2] node: fix arm64 build issue for older gcc
  2020-05-13  5:48 [dpdk-dev] [PATCH] node: fix arm64 build issue for older gcc Nithin Dabilpuram
  2020-05-13  8:51 ` Ruifeng Wang
@ 2020-05-13 12:06 ` Nithin Dabilpuram
  2020-05-13 12:36   ` Jerin Jacob
  1 sibling, 1 reply; 6+ messages in thread
From: Nithin Dabilpuram @ 2020-05-13 12:06 UTC (permalink / raw)
  To: kirankumark, jerinj, david.marchand, Nithin Dabilpuram, Pavan Nikhilesh
  Cc: dev, ruifeng.wang

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")

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
v2:
- Add error in commit msg.

 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


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] node: fix arm64 build issue for older gcc
  2020-05-13 12:06 ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
@ 2020-05-13 12:36   ` Jerin Jacob
  2020-05-13 13:03     ` David Marchand
  0 siblings, 1 reply; 6+ messages in thread
From: Jerin Jacob @ 2020-05-13 12:36 UTC (permalink / raw)
  To: Nithin Dabilpuram
  Cc: Kiran Kumar K, Jerin Jacob, David Marchand, Pavan Nikhilesh,
	dpdk-dev, Ruifeng Wang (Arm Technology China)

On Wed, May 13, 2020 at 5:36 PM Nithin Dabilpuram
<ndabilpuram@marvell.com> wrote:
>
> 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 <david.marchand@redhat.com>

> Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>

It is a false positive, all the lines are updated by the c code.
Just to make the old compiler to happy we need to add unnecessary
additional instruction.
Looks like there is no other clean way to suppress the warning.

Reviewed-by: Jerin Jacob <jerinj@marvell.com>


> ---
> v2:
> - Add error in commit msg.
>
>  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
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [dpdk-dev] [PATCH v2] node: fix arm64 build issue for older gcc
  2020-05-13 12:36   ` Jerin Jacob
@ 2020-05-13 13:03     ` David Marchand
  0 siblings, 0 replies; 6+ messages in thread
From: David Marchand @ 2020-05-13 13:03 UTC (permalink / raw)
  To: Nithin Dabilpuram
  Cc: Kiran Kumar K, Jerin Jacob, Pavan Nikhilesh, dpdk-dev,
	Ruifeng Wang (Arm Technology China),
	Jerin Jacob

On Wed, May 13, 2020 at 2:36 PM Jerin Jacob <jerinjacobk@gmail.com> wrote:
>
> On Wed, May 13, 2020 at 5:36 PM Nithin Dabilpuram
> <ndabilpuram@marvell.com> wrote:
> >
> > 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 <david.marchand@redhat.com>
> > Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> Reviewed-by: Jerin Jacob <jerinj@marvell.com>

Applied, thanks.


-- 
David Marchand


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-05-13 13:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-13  5:48 [dpdk-dev] [PATCH] node: fix arm64 build issue for older gcc Nithin Dabilpuram
2020-05-13  8:51 ` Ruifeng Wang
2020-05-13 10:32   ` [dpdk-dev] [EXT] " Nithin Dabilpuram
2020-05-13 12:06 ` [dpdk-dev] [PATCH v2] " Nithin Dabilpuram
2020-05-13 12:36   ` Jerin Jacob
2020-05-13 13:03     ` David Marchand

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).