From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 5720D1B3DB; Wed, 9 May 2018 17:02:49 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 May 2018 08:02:47 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,381,1520924400"; d="scan'208";a="222903287" Received: from irsmsx104.ger.corp.intel.com ([163.33.3.159]) by orsmga005.jf.intel.com with ESMTP; 09 May 2018 08:02:46 -0700 Received: from irsmsx108.ger.corp.intel.com ([169.254.11.150]) by IRSMSX104.ger.corp.intel.com ([169.254.5.96]) with mapi id 14.03.0319.002; Wed, 9 May 2018 16:02:02 +0100 From: "De Lara Guarch, Pablo" To: Akhil Goyal , "Nicolau, Radu" , "dev@dpdk.org" CC: "stable@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v3] examples/ipsec-secgw: limit inflight packets count Thread-Index: AQHT53TXb3OFB96FOUah6+OQLrxGWaQnO4eAgAA7sVA= Date: Wed, 9 May 2018 15:02:01 +0000 Message-ID: References: <1525856209-27513-1-git-send-email-radu.nicolau@intel.com> <1525856321-27612-1-git-send-email-radu.nicolau@intel.com> <01c2959d-1214-3309-b943-d08d4c20d5e5@nxp.com> In-Reply-To: <01c2959d-1214-3309-b943-d08d4c20d5e5@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTA4ODc1MDUtNjA0Ni00YWIzLWIzZjgtZDI1Y2ZhODliOWQ2IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6Ilhnc1Z1Wm5qV1dKbisxSmE3WHdwMFBmK1BBeEgzcTk1V2N6MVwvdEpMaWNVPSJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.180] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH v3] examples/ipsec-secgw: limit inflight packets count X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 May 2018 15:02:51 -0000 > -----Original Message----- > From: Akhil Goyal [mailto:akhil.goyal@nxp.com] > Sent: Wednesday, May 9, 2018 1:02 PM > To: Nicolau, Radu ; dev@dpdk.org > Cc: akhil.goyal@nxp.com; De Lara Guarch, Pablo > ; stable@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v3] examples/ipsec-secgw: limit inflight p= ackets > count >=20 > 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@dpdk.org > > > > Signed-off-by: Radu Nicolau > > --- > > 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 =3D 0, i; > > > > cqp->buf[cqp->len++] =3D cop; > > > > if (cqp->len =3D=3D MAX_PKT_BURST) { > > - ret =3D rte_cryptodev_enqueue_burst(cqp->id, cqp->qp, > > - cqp->buf, cqp->len); > > + int enq_size =3D cqp->len; > > + if ((cqp->in_flight + enq_size) >=3D MAX_INFLIGHT) >=20 > This should be ((cqp->in_flight + enq_size) > MAX_INFLIGHT). there Will b= e one > extra operation in case it is equal. >=20 > Otherwise, > Acked-by: Akhil Goyal Applied to dpdk-next-crypto, with change requested. Thanks, Pablo