> -----Original Message-----
> From: Aaron Conole <[email protected]>
> Sent: Friday, May 24, 2019 7:03 PM
> To: Jerin Jacob Kollanukkaran <[email protected]>
> Cc: [email protected]; [email protected]; Pavan Nikhilesh Bhagavatula
> <[email protected]>; Olivier Matz <[email protected]>; Vamsi
> Krishna Attunuru <[email protected]>
> Subject: Re: [dpdk-dev] [PATCH v1 25/27] mempool/octeontx2: add optimized
> dequeue operation for arm64
> 
> <[email protected]> writes:
> 
> > From: Pavan Nikhilesh <[email protected]>
> >
> > This patch adds an optimized arm64 instruction based routine to
> > leverage CPU pipeline characteristics of octeontx2. The theme is to
> > fill the pipeline with CASP operations as much HW can do so that HW
> > can do alloc() HW ops in full throttle.
> >
> > Cc: Olivier Matz <[email protected]>
> >
> > Signed-off-by: Pavan Nikhilesh <[email protected]>
> > Signed-off-by: Jerin Jacob <[email protected]>
> > Signed-off-by: Vamsi Attunuru <[email protected]>
> > ---
> >  drivers/mempool/octeontx2/otx2_mempool_ops.c | 291
> > +++++++++++++++++++
> >  1 file changed, 291 insertions(+)
> >
> > diff --git a/drivers/mempool/octeontx2/otx2_mempool_ops.c
> > b/drivers/mempool/octeontx2/otx2_mempool_ops.c
> > index c59bd73c0..ebe90d122 100644
> > --- a/drivers/mempool/octeontx2/otx2_mempool_ops.c
> > +++ b/drivers/mempool/octeontx2/otx2_mempool_ops.c
> > @@ -37,6 +37,293 @@ npa_lf_aura_op_alloc_one(const int64_t wdata,
> int64_t * const addr,
> >     return -ENOENT;
> >  }
> >
> > +   }
> > +
> > +   if (unlikely(!(((uint64_t *) &failed)[0] & ((uint64_t *) &failed)[1])))
> > +           return npa_lf_aura_op_search_alloc(wdata, addr, (void **)
> > +                   ((char *)obj_table - (sizeof(uint64_t) * n)), n);
> 
> I think this is causing an error for some arm64 builds with the following 
> warning;
> 
> ../drivers/mempool/octeontx2/otx2_mempool_ops.c: In function
> ‘npa_lf_aura_op_alloc_bulk’:
> ../drivers/mempool/octeontx2/otx2_mempool_ops.c:281:2: error:
> dereferencing type-punned pointer will break strict-aliasing rules [-
> Werror=strict-aliasing]
>   if (unlikely(!(((uint64_t *) &failed)[0] & ((uint64_t *) &failed)[1])))
>   ^
> 
> This is only tested with gcc, though.

Some reason this error is not seen with armv8 gcc 8.2.
Could reproduce the issues with gcc 5.3. Will fix it in v2.
Thanks for reporting the  issue.

> 
> See example travis build here:
> 
> https://travis-ci.com/ovsrobot/dpdk/builds/112894377
> 
> Thanks!

Reply via email to