Skip to content

Commit

Permalink
app/crypto-perf: fix out-of-place mbuf size
Browse files Browse the repository at this point in the history
[ upstream commit 24515c93197091437e32f35bba3f467c01633c1d ]

If crypto device requires headroom and tailroom, the mbuf
of dst in out-of-place should reserve the headroom and
tailroom as well, otherwise there will be no enough room
for dst mbuf.

Fixes: bf9d670 ("app/crypto-perf: use single mempool")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
  • Loading branch information
smou-mlnx authored and bluca committed Mar 13, 2024
1 parent 2e6e29e commit 211da2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/test-crypto-perf/cperf_test_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,8 @@ 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 + sizeof(struct rte_mbuf);
obj_size += max_size + sizeof(struct rte_mbuf) +
options->headroom_sz + options->tailroom_sz;
}

*pool = rte_mempool_create_empty(pool_name,
Expand Down

0 comments on commit 211da2b

Please sign in to comment.