patch 'app/crypto-perf: fix number of segments' has been queued to stable release 21.11.4

Kevin Traynor ktraynor at redhat.com
Thu Feb 23 16:04:56 CET 2023


Hi,

FYI, your patch has been queued to stable release 21.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/28/23. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/d734fcf15cda3727a9c88f232d77a9fcd3dbc3a4

Thanks.

Kevin

---
>From d734fcf15cda3727a9c88f232d77a9fcd3dbc3a4 Mon Sep 17 00:00:00 2001
From: Anoob Joseph <anoobj at marvell.com>
Date: Tue, 20 Dec 2022 10:25:33 +0530
Subject: [PATCH] app/crypto-perf: fix number of segments

[ upstream commit e03ecc56edd72acb077e2b9bb95ae34f54172a0c ]

When segment size is provided, the total number of segments would be
calculated. Segment size updates due to headroom/tailroom need to be
accounted for when determining total number of segments required.

Fixes: c1670ae0022b ("app/crypto-perf: honour min headroom/tailroom")

Signed-off-by: Anoob Joseph <anoobj at marvell.com>
Signed-off-by: Akhil Goyal <gakhil at marvell.com>
---
 app/test-crypto-perf/cperf_test_common.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 97a1ea47ad..5a65e11ba7 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -199,7 +199,9 @@ cperf_alloc_common_memory(const struct cperf_options *options,
 	uint32_t mbuf_size = sizeof(struct rte_mbuf) + options->segment_sz;
 	uint32_t max_size = options->max_buffer_size + options->digest_sz;
-	uint16_t segments_nb = (max_size % options->segment_sz) ?
-			(max_size / options->segment_sz) + 1 :
-			max_size / options->segment_sz;
+	uint32_t segment_data_len = options->segment_sz - options->headroom_sz -
+				    options->tailroom_sz;
+	uint16_t segments_nb = (max_size % segment_data_len) ?
+				(max_size / segment_data_len) + 1 :
+				(max_size / segment_data_len);
 	uint32_t obj_size = crypto_op_total_size_padded +
 				(mbuf_size * segments_nb);
-- 
2.39.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2023-02-23 14:46:23.994910479 +0000
+++ 0005-app-crypto-perf-fix-number-of-segments.patch	2023-02-23 14:46:23.698235715 +0000
@@ -1 +1 @@
-From e03ecc56edd72acb077e2b9bb95ae34f54172a0c Mon Sep 17 00:00:00 2001
+From d734fcf15cda3727a9c88f232d77a9fcd3dbc3a4 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit e03ecc56edd72acb077e2b9bb95ae34f54172a0c ]
+
@@ -11 +12,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 27646cd619..932aab16df 100644
+index 97a1ea47ad..5a65e11ba7 100644
@@ -23 +24 @@
-@@ -198,7 +198,9 @@ cperf_alloc_common_memory(const struct cperf_options *options,
+@@ -199,7 +199,9 @@ cperf_alloc_common_memory(const struct cperf_options *options,



More information about the stable mailing list