DPDK patches and discussions
 help / color / mirror / Atom feed
From: Pablo de Lara <pablo.de.lara.guarch@intel.com>
To: dev@dpdk.org
Cc: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Subject: [dpdk-dev] [PATCH] app/crypto-perf: fix incorrect operation free
Date: Mon,  7 Aug 2017 04:16:54 +0100	[thread overview]
Message-ID: <20170807031654.31581-1-pablo.de.lara.guarch@intel.com> (raw)

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 <pablo.de.lara.guarch@intel.com>
---
 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++) {
-- 
2.9.4

             reply	other threads:[~2017-08-07 11:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-07  3:16 Pablo de Lara [this message]
2017-08-07 12:31 ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170807031654.31581-1-pablo.de.lara.guarch@intel.com \
    --to=pablo.de.lara.guarch@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).