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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 23 10:36:09 CET 2023


Hi,

FYI, your patch has been queued to stable release 20.11.8

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/25/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/bluca/dpdk-stable

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

Thanks.

Luca Boccassi

---
>From f500d1f0f42a9705a14814ee3f03bd286e9627c9 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 12925c7f22..58bc2439ed 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -166,9 +166,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,
 				RTE_CACHE_LINE_ROUNDUP(crypto_op_total_size);
 	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 09:36:28.523871539 +0000
+++ 0005-app-crypto-perf-fix-number-of-segments.patch	2023-02-23 09:36:28.166168835 +0000
@@ -1 +1 @@
-From e03ecc56edd72acb077e2b9bb95ae34f54172a0c Mon Sep 17 00:00:00 2001
+From f500d1f0f42a9705a14814ee3f03bd286e9627c9 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 12925c7f22..58bc2439ed 100644
@@ -23 +24 @@
-@@ -197,9 +197,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,
+@@ -166,9 +166,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,


More information about the stable mailing list