[dpdk-stable] [dpdk-dev] [PATCH 4/7] test/rcu: use size_t instead of int

David Marchand david.marchand at redhat.com
Mon Oct 7 16:00:05 CEST 2019


Hello Honnappa,

On Mon, Sep 9, 2019 at 5:17 PM Ruifeng Wang (Arm Technology China)
<Ruifeng.Wang at arm.com> wrote:
>
>
> > -----Original Message-----
> > From: dev <dev-bounces at dpdk.org> On Behalf Of Honnappa Nagarahalli
> > Sent: Monday, September 9, 2019 06:50
> > To: Honnappa Nagarahalli <Honnappa.Nagarahalli at arm.com>;
> > konstantin.ananyev at intel.com
> > Cc: dev at dpdk.org; stable at dpdk.org
> > Subject: [dpdk-dev] [PATCH 4/7] test/rcu: use size_t instead of int
> >
> > Variables used to store the return value of rte_rcu_qsbr_get_memsize in
> > variables of type 'int'. The variables are of type 'size_t' now.
> >
> > Fixes: b87089b0bb19 ("test/rcu: add API and functional tests")
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Honnappa Nagarahalli <honnappa.nagarahalli at arm.com>
> > Reviewed-by: Gavin Hu <gavin.hu at arm.com>
> > ---
> >  app/test/test_rcu_qsbr_perf.c | 8 ++++----
> >  1 file changed, 4 insertions(+), 4 deletions(-)
> >
> > diff --git a/app/test/test_rcu_qsbr_perf.c b/app/test/test_rcu_qsbr_perf.c
> > index cb2d177b7..e0598614c 100644
> > --- a/app/test/test_rcu_qsbr_perf.c
> > +++ b/app/test/test_rcu_qsbr_perf.c
> > @@ -125,7 +125,7 @@ test_rcu_qsbr_writer_perf(void *arg)  static int
> >  test_rcu_qsbr_perf(void)
> >  {
> > -     int sz;
> > +     size_t sz;
> >       unsigned int i, tmp_num_cores;
> >
> >       writer_done = 0;
> > @@ -188,7 +188,7 @@ test_rcu_qsbr_perf(void)  static int
> >  test_rcu_qsbr_rperf(void)
> >  {
> > -     int sz;
> > +     size_t sz;
> >       unsigned int i, tmp_num_cores;
> >
> >       rte_atomic64_clear(&updates);
> > @@ -234,7 +234,7 @@ test_rcu_qsbr_rperf(void)  static int
> >  test_rcu_qsbr_wperf(void)
> >  {
> > -     int sz;
> > +     size_t sz;
> >       unsigned int i;
> >
> >       rte_atomic64_clear(&checks);
> > @@ -379,7 +379,7 @@ static int
> >  test_rcu_qsbr_sw_sv_1qs(void)
> >  {
> >       uint64_t token, begin, cycles;
> > -     int sz;
> > +     size_t sz;
> >       unsigned int i, j, tmp_num_cores;
> >       int32_t pos;
> >
> > --
> > 2.17.1
>
> The same change is needed by test_rcu_qsbr_sw_sv_1qs_non_blocking.
> And there are another 2 occurrences in test_rcu_qsbr.c.

Ruifeng comment looks valid, can you have a look and submit a new
version of this patch?
Thanks.

-- 
David Marchand



More information about the stable mailing list