app/crypto-perf: fix out-of-place mempool allocation
authorKai Ji <kai.ji@intel.com>
Mon, 24 May 2021 16:46:27 +0000 (17:46 +0100)
committerAkhil Goyal <gakhil@marvell.com>
Wed, 7 Jul 2021 19:28:39 +0000 (21:28 +0200)
Add missing rte_mbuf size in mempool allocation for
out-of-place operation.

Fixes: bf9d6702eca9 ("app/crypto-perf: use single mempool")
Cc: stable@dpdk.org
Signed-off-by: Kai Ji <kai.ji@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
app/test-crypto-perf/cperf_test_common.c

index 058e0ba..12925c7 100644 (file)
@@ -194,7 +194,7 @@ cperf_alloc_common_memory(const struct cperf_options *options,
                                (mbuf_size * segments_nb);
                params.dst_buf_offset = *dst_buf_offset;
                /* Destination buffer will be one segment only */
-               obj_size += max_size;
+               obj_size += max_size + sizeof(struct rte_mbuf);
        }
 
        *pool = rte_mempool_create_empty(pool_name,