From patchwork Mon Aug 7 03:16:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "De Lara Guarch, Pablo" X-Patchwork-Id: 27473 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id E2138376C; Mon, 7 Aug 2017 13:16:36 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 8C97C374C for ; Mon, 7 Aug 2017 13:16:34 +0200 (CEST) Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Aug 2017 04:16:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,337,1498546800"; d="scan'208";a="137238457" Received: from silpixa00399464.ir.intel.com (HELO silpixa00399464.ger.corp.intel.com) ([10.237.222.157]) by fmsmga006.fm.intel.com with ESMTP; 07 Aug 2017 04:16:32 -0700 From: Pablo de Lara To: dev@dpdk.org Cc: Pablo de Lara Date: Mon, 7 Aug 2017 04:16:54 +0100 Message-Id: <20170807031654.31581-1-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 2.9.4 Subject: [dpdk-dev] [PATCH] app/crypto-perf: fix incorrect operation free 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In crypto latency test, when some crypto operations cannot be enqueued, they are returned to its mempool. However, instead of freeing the operations in the array passed to the enqueue function, the app was freeing the operations in the array passed to the dequeue function, leading to incorrect results. Fixes: 15b55dd75120 ("app/crypto-perf: return crypto ops to mempool in bulk") Signed-off-by: Pablo de Lara --- app/test-crypto-perf/cperf_test_latency.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c index 7e610d9..58b21ab 100644 --- a/app/test-crypto-perf/cperf_test_latency.c +++ b/app/test-crypto-perf/cperf_test_latency.c @@ -433,7 +433,7 @@ cperf_latency_test_runner(void *arg) /* Free memory for not enqueued operations */ if (ops_enqd != burst_size) rte_mempool_put_bulk(ctx->crypto_op_pool, - (void **)&ops_processed[ops_enqd], + (void **)&ops[ops_enqd], burst_size - ops_enqd); for (i = 0; i < ops_enqd; i++) {