DPDK patches and discussions
 help / color / mirror / Atom feed
From: Suanming Mou <suanmingm@nvidia.com>
To: <ciara.power@intel.com>
Cc: <dev@dpdk.org>
Subject: [PATCH 2/2] app/test-crypto-perf: fix dst_mbuf size calculation
Date: Wed, 3 Jan 2024 12:00:24 +0800	[thread overview]
Message-ID: <20240103040024.720600-3-suanmingm@nvidia.com> (raw)
In-Reply-To: <20240103040024.720600-1-suanmingm@nvidia.com>

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: bf9d6702eca9 ("app/crypto-perf: use single mempool")

Signed-off-by: Suanming Mou <suanmingm@nvidia.com>
---
 app/test-crypto-perf/cperf_test_common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 8faf832527..c773dd48df 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -229,7 +229,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,
-- 
2.34.1


  parent reply	other threads:[~2024-01-03  4:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-03  4:00 [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue Suanming Mou
2024-01-03  4:00 ` [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation Suanming Mou
2024-02-01 13:16   ` Suanming Mou
2024-01-03  4:00 ` Suanming Mou [this message]
2024-02-29 17:01 ` [EXT] [PATCH 0/2] app/test-crypto-perf: fix multi-segment issue Akhil Goyal
2024-02-29 17:03   ` Akhil Goyal

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=20240103040024.720600-3-suanmingm@nvidia.com \
    --to=suanmingm@nvidia.com \
    --cc=ciara.power@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).