From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 32E1DFA4B; Thu, 30 Mar 2017 13:45:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=intel.com; i=@intel.com; q=dns/txt; s=intel; t=1490874351; x=1522410351; h=subject:to:references:cc:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=sBD2A+AtJlX5MG3IzJI7PlEYSAe8lbQv5HKEFwp5XdA=; b=EuROjFwiZY62YukvMKMl5edR+l008z/OSqPjg5lytt7DuIQcfAuU/FCV /DZ2FID3IGCouLNUxr8BQQL7EwJJBA==; Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 30 Mar 2017 04:45:49 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.36,246,1486454400"; d="scan'208";a="1128874873" Received: from dwdohert-dpdk.ir.intel.com ([163.33.210.152]) by fmsmga001.fm.intel.com with ESMTP; 30 Mar 2017 04:45:48 -0700 To: Sergio Gonzalez Monroy , dev@dpdk.org References: <20170329134253.31909-1-sergio.gonzalez.monroy@intel.com> Cc: pablo.de.lara.guarch@intel.com, stable@dpdk.org From: Declan Doherty Message-ID: <7923ff78-ba53-4573-5c83-efc699ff53c1@intel.com> Date: Thu, 30 Mar 2017 12:44:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170329134253.31909-1-sergio.gonzalez.monroy@intel.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] crypto/aesni_gcm: do crypto op in dequeue function 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: Thu, 30 Mar 2017 11:45:51 -0000 On 29/03/17 14:42, Sergio Gonzalez Monroy wrote: > There is bug when more crypto ops are enqueued than dequeued. > The return value is not checked when trying to enqueue the > processed crypto op into the internal ring, which in the case of being > full will results in crypto ops and mbufs being leaked. > The issue is more obvious with different cores doing enqueue/dequeue. > > This patch moves the crypto operation to the dequeue function which > fixes the above issue without having to check for the number of free > entries in the ring. > > Fixes: eec136f3c54f ("aesni_gcm: add driver for AES-GCM crypto operations") > > Signed-off-by: Sergio Gonzalez Monroy > --- ... > Hey Sergio, this looks good but it needs to be rebased for the rte_ring API change. I also see a marginally performance increase with this change using the crypto-perf app which wasn't expected. Acked-by: Declan Doherty