app/crypto-perf: fix operation free

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>
This commit is contained in:
Pablo de Lara 2017-08-07 04:16:54 +01:00 committed by Thomas Monjalon
parent b9c7fc35b5
commit 61bec3623c

View File

@ -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++) {