[dpdk-dev] [PATCH v1 25/27] mempool/octeontx2: add optimized dequeue operation for arm64

Jerin Jacob Kollanukkaran jerinj at marvell.com
Mon May 27 11:20:32 CEST 2019


> -----Original Message-----
> From: Aaron Conole <aconole at redhat.com>
> Sent: Friday, May 24, 2019 7:03 PM
> To: Jerin Jacob Kollanukkaran <jerinj at marvell.com>
> Cc: dev at dpdk.org; thomas at monjalon.net; Pavan Nikhilesh Bhagavatula
> <pbhagavatula at marvell.com>; Olivier Matz <olivier.matz at 6wind.com>; Vamsi
> Krishna Attunuru <vattunuru at marvell.com>
> Subject: Re: [dpdk-dev] [PATCH v1 25/27] mempool/octeontx2: add optimized
> dequeue operation for arm64
> 
> <jerinj at marvell.com> writes:
> 
> > From: Pavan Nikhilesh <pbhagavatula at marvell.com>
> >
> > 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 <olivier.matz at 6wind.com>
> >
> > Signed-off-by: Pavan Nikhilesh <pbhagavatula at marvell.com>
> > Signed-off-by: Jerin Jacob <jerinj at marvell.com>
> > Signed-off-by: Vamsi Attunuru <vattunuru at marvell.com>
> > ---
> >  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!


More information about the dev mailing list