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 1/2] app/test-crypto-perf: fix copy segment size calculation
Date: Wed, 3 Jan 2024 12:00:23 +0800	[thread overview]
Message-ID: <20240103040024.720600-2-suanmingm@nvidia.com> (raw)
In-Reply-To: <20240103040024.720600-1-suanmingm@nvidia.com>

For the case crypto device requires headroom and tailroom,
the segment_sz in options also contains the headroom_sz
and tailroom_sz, but mbuf's data_len is user's segment_sz
without headroom_sz and tailroom_sz. That means the data
size to be copied should use user's segment_sz instead
of options->segment_sz.

This commit fixes the copy segment size calculation.

Fixes: 14864c4217ce ("test/crypto-perf: populate mbuf in latency test")

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

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index ad2076dd2e..8faf832527 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -271,7 +271,7 @@ cperf_mbuf_set(struct rte_mbuf *mbuf,
 		const struct cperf_options *options,
 		const struct cperf_test_vector *test_vector)
 {
-	uint32_t segment_sz = options->segment_sz;
+	uint32_t segment_sz = options->segment_sz - options->headroom_sz - options->tailroom_sz;
 	uint8_t *mbuf_data;
 	uint8_t *test_data;
 	uint32_t remaining_bytes = options->max_buffer_size;
-- 
2.34.1


  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 ` Suanming Mou [this message]
2024-02-01 13:16   ` [PATCH 1/2] app/test-crypto-perf: fix copy segment size calculation Suanming Mou
2024-01-03  4:00 ` [PATCH 2/2] app/test-crypto-perf: fix dst_mbuf " Suanming Mou
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-2-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).