[dpdk-dev] [dpdk-stable] [PATCH v3 1/3] test/rcu: fix the compiling error for armv8.2

Gavin Hu (Arm Technology China) Gavin.Hu at arm.com
Thu Nov 21 12:23:50 CET 2019



> -----Original Message-----
> From: Thomas Monjalon <thomas at monjalon.net>
> Sent: Thursday, November 21, 2019 6:19 AM
> To: Gavin Hu (Arm Technology China) <Gavin.Hu at arm.com>; Honnappa
> Nagarahalli <Honnappa.Nagarahalli at arm.com>; Steve Capper
> <Steve.Capper at arm.com>
> Cc: stable at dpdk.org; dev at dpdk.org; nd <nd at arm.com>;
> david.marchand at redhat.com
> Subject: Re: [dpdk-stable] [PATCH v3 1/3] test/rcu: fix the compiling error for
> armv8.2
> 
> 11/11/2019 06:41, Gavin Hu:
> > With "-march=armv8.2-a" specified, a compiling error generated:
> > app/test/test_rcu_qsbr.c:234:10: error: comparison of integer
> > expressions of different signedness: ‘unsigned int’ and ‘int’
> > [-Werror=sign-compare]
> >
> > Fixes: b87089b0bb19 ("test/rcu: add API and functional tests")
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Gavin Hu <gavin.hu at arm.com>
> > Reviewed-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> > Reviewed-by: Steve Capper <steve.capper at arm.com>
> > ---
> > --- a/app/test/test_rcu_qsbr.c
> > +++ b/app/test/test_rcu_qsbr.c
> >  			/* Skip one update */
> > -			if (i == (RTE_MAX_LCORE - 10))
> > +			if (i == (unsigned int)(RTE_MAX_LCORE - 10))
> 
> For N1 SDP, RTE_MAX_LCORE = 4.
> So this test weird.
> Why not using rand() to find a number between 0 and max ?
> 
> You are hiding a real failure with a forced type casting.
> 
> Please reviewers, explain why you think it is the right thing to do?
> 
Thanks for pointing out this issue, will fix in next release.



More information about the dev mailing list