* [dpdk-dev] [PATCH] app/crypto-perf: fix incorrect operation free
@ 2017-08-07 3:16 Pablo de Lara
2017-08-07 12:31 ` Thomas Monjalon
0 siblings, 1 reply; 2+ messages in thread
From: Pablo de Lara @ 2017-08-07 3:16 UTC (permalink / raw)
To: dev; +Cc: Pablo de Lara
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [PATCH] app/crypto-perf: fix incorrect operation free
2017-08-07 3:16 [dpdk-dev] [PATCH] app/crypto-perf: fix incorrect operation free Pablo de Lara
@ 2017-08-07 12:31 ` Thomas Monjalon
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2017-08-07 12:31 UTC (permalink / raw)
To: Pablo de Lara; +Cc: dev
07/08/2017 05:16, Pablo de Lara:
> 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>
Applied, thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-07 12:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-07 3:16 [dpdk-dev] [PATCH] app/crypto-perf: fix incorrect operation free Pablo de Lara
2017-08-07 12:31 ` Thomas Monjalon
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).