[dpdk-dev] [PATCH v3] examples/ipsec-secgw: limit inflight packets count

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Wed May 9 17:02:01 CEST 2018



> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal at nxp.com]
> Sent: Wednesday, May 9, 2018 1:02 PM
> To: Nicolau, Radu <radu.nicolau at intel.com>; dev at dpdk.org
> Cc: akhil.goyal at nxp.com; De Lara Guarch, Pablo
> <pablo.de.lara.guarch at intel.com>; stable at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v3] examples/ipsec-secgw: limit inflight packets
> count
> 
> On 5/9/2018 2:28 PM, Radu Nicolau wrote:
> > Revert previous patch that introduce a performance degradation in
> > certain scenarios and add a configurable limit for number inflight
> > packets.
> >
> > Revert
> > commit 84d4b5e4ec48 ("examples/ipsec-secgw: improve IPsec dequeue
> > logic")
> > Cc: stable at dpdk.org
> >
> > Signed-off-by: Radu Nicolau <radu.nicolau at intel.com>
> > ---
> > v3: updated enqueue size trim computation
> >
> >  examples/ipsec-secgw/ipsec.c | 32 +++++++++++++++-----------------
> > examples/ipsec-secgw/ipsec.h |  1 +
> >  2 files changed, 16 insertions(+), 17 deletions(-)
> >
> > diff --git a/examples/ipsec-secgw/ipsec.c
> > b/examples/ipsec-secgw/ipsec.c index ee24973..1929752 100644
> > --- a/examples/ipsec-secgw/ipsec.c
> > +++ b/examples/ipsec-secgw/ipsec.c
> > @@ -348,13 +348,19 @@ create_session(struct ipsec_ctx *ipsec_ctx,
> > struct ipsec_sa *sa)  static inline void  enqueue_cop(struct cdev_qp
> > *cqp, struct rte_crypto_op *cop)  {
> > -	int32_t ret, i;
> > +	int32_t ret = 0, i;
> >
> >  	cqp->buf[cqp->len++] = cop;
> >
> >  	if (cqp->len == MAX_PKT_BURST) {
> > -		ret = rte_cryptodev_enqueue_burst(cqp->id, cqp->qp,
> > -				cqp->buf, cqp->len);
> > +		int enq_size = cqp->len;
> > +		if ((cqp->in_flight + enq_size) >= MAX_INFLIGHT)
> 
> This should be ((cqp->in_flight + enq_size) > MAX_INFLIGHT). there Will be one
> extra operation in case it is equal.
> 
> Otherwise,
> Acked-by: Akhil Goyal <akhil.goyal at nxp.com>

Applied to dpdk-next-crypto, with change requested.
Thanks,

Pablo



More information about the dev mailing list