From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9697C2C50; Mon, 17 Jul 2017 12:16:51 +0200 (CEST) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Jul 2017 03:16:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.40,374,1496127600"; d="scan'208";a="1152286300" Received: from troebing-mobl2.ger.corp.intel.com (HELO [10.252.22.212]) ([10.252.22.212]) by orsmga001.jf.intel.com with ESMTP; 17 Jul 2017 03:16:48 -0700 To: Pablo de Lara References: <20170714064848.54333-1-pablo.de.lara.guarch@intel.com> Cc: dev@dpdk.org, stable@dpdk.org From: Declan Doherty Message-ID: <938c99a3-920c-1997-e1fa-b2fe7ff024ed@intel.com> Date: Mon, 17 Jul 2017 11:16:47 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170714064848.54333-1-pablo.de.lara.guarch@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-stable] [PATCH] crypto/aesni_mb: fix zero burst dequeue X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 17 Jul 2017 10:16:52 -0000 On 14/07/2017 7:48 AM, Pablo de Lara wrote: > In the unlikely scenario that an application > calls rte_cryptodev_dequeue_burst with nb_ops = 0, > there was a job leak, as a job would be created > but would not be populated, as no operation is passed. > > Fixes: 0f548b50a160 ("crypto/aesni_mb: process crypto op on dequeue") > Cc: stable@dpdk.org > > Signed-off-by: Pablo de Lara > --- > drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c > index 13cffaf..fda662f 100644 > --- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c > +++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c > @@ -644,6 +644,9 @@ aesni_mb_pmd_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops, > > int retval, processed_jobs = 0; > > + if (unlikely(nb_ops == 0)) > + return 0; > + > do { > /* Get next operation to process from ingress queue */ > retval = rte_ring_dequeue(qp->ingress_queue, (void **)&op); > Acked-by: Declan Doherty