patch 'app/crypto-perf: fix result for asymmetric' has been queued to stable release 23.11.2

Xueming Li xuemingl at nvidia.com
Mon Aug 12 14:48:16 CEST 2024


Hi,

FYI, your patch has been queued to stable release 23.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/14/24. 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://git.dpdk.org/dpdk-stable/log/?h=23.11-staging

This queued commit can be viewed at:
https://git.dpdk.org/dpdk-stable/commit/?h=23.11-staging&id=ede34a435958af20f37984335e148359b80650d9

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From ede34a435958af20f37984335e148359b80650d9 Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Date: Wed, 26 Jun 2024 14:17:42 +0530
Subject: [PATCH] app/crypto-perf: fix result for asymmetric
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 022f9bf9d4571092be6bb98cea12efb1aa8fe0af ]

For asymmetric op, private test data should be stored after
rte_crypto_asym_op struct.

Fixes: a538d1d2d01e ("test/crypto-perf: extend asymmetric crypto throughput test")

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
 app/test-crypto-perf/cperf_test_common.c  |  6 ++++--
 app/test-crypto-perf/cperf_test_latency.c | 14 +++++++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/app/test-crypto-perf/cperf_test_common.c b/app/test-crypto-perf/cperf_test_common.c
index 94d39fb177..6b8ab65731 100644
--- a/app/test-crypto-perf/cperf_test_common.c
+++ b/app/test-crypto-perf/cperf_test_common.c
@@ -149,11 +149,11 @@ cperf_alloc_common_memory(const struct cperf_options *options,
 	int ret;
 
 	/* Calculate the object size */
-	uint16_t crypto_op_size = sizeof(struct rte_crypto_op) +
-		sizeof(struct rte_crypto_sym_op);
+	uint16_t crypto_op_size = sizeof(struct rte_crypto_op);
 	uint16_t crypto_op_private_size;
 
 	if (options->op_type == CPERF_ASYM_MODEX) {
+		crypto_op_size += sizeof(struct rte_crypto_asym_op);
 		snprintf(pool_name, RTE_MEMPOOL_NAMESIZE, "perf_asym_op_pool%u",
 			 rte_socket_id());
 		*pool = rte_crypto_op_pool_create(
@@ -170,6 +170,8 @@ cperf_alloc_common_memory(const struct cperf_options *options,
 		return 0;
 	}
 
+	crypto_op_size += sizeof(struct rte_crypto_sym_op);
+
 	/*
 	 * If doing AES-CCM, IV field needs to be 16 bytes long,
 	 * and AAD field needs to be long enough to have 18 bytes,
diff --git a/app/test-crypto-perf/cperf_test_latency.c b/app/test-crypto-perf/cperf_test_latency.c
index 484bc9eb4e..e55d293db3 100644
--- a/app/test-crypto-perf/cperf_test_latency.c
+++ b/app/test-crypto-perf/cperf_test_latency.c
@@ -121,7 +121,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp)
 {
 	struct priv_op_data *priv_data;
 
-	priv_data = (struct priv_op_data *) (op->sym + 1);
+	if (op->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+		priv_data = (struct priv_op_data *) (op->sym + 1);
+	else
+		priv_data = (struct priv_op_data *) (op->asym + 1);
+
 	priv_data->result->status = op->status;
 	priv_data->result->tsc_end = timestamp;
 }
@@ -250,9 +254,13 @@ cperf_latency_test_runner(void *arg)
 				ctx->res[tsc_idx].tsc_start = tsc_start;
 				/*
 				 * Private data structure starts after the end of the
-				 * rte_crypto_sym_op structure.
+				 * rte_crypto_sym_op (or rte_crypto_asym_op) structure.
 				 */
-				priv_data = (struct priv_op_data *) (ops[i]->sym + 1);
+				if (ops[i]->type == RTE_CRYPTO_OP_TYPE_SYMMETRIC)
+					priv_data = (struct priv_op_data *) (ops[i]->sym + 1);
+				else
+					priv_data = (struct priv_op_data *) (ops[i]->asym + 1);
+
 				priv_data->result = (void *)&ctx->res[tsc_idx];
 				tsc_idx++;
 			}
-- 
2.34.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2024-08-12 20:44:03.231047242 +0800
+++ 0019-app-crypto-perf-fix-result-for-asymmetric.patch	2024-08-12 20:44:01.915069259 +0800
@@ -1 +1 @@
-From 022f9bf9d4571092be6bb98cea12efb1aa8fe0af Mon Sep 17 00:00:00 2001
+From ede34a435958af20f37984335e148359b80650d9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 022f9bf9d4571092be6bb98cea12efb1aa8fe0af ]
@@ -10 +12,0 @@
-Cc: stable at dpdk.org
@@ -47 +49 @@
-index b8ad6bf4d4..376847e761 100644
+index 484bc9eb4e..e55d293db3 100644
@@ -50 +52 @@
-@@ -122,7 +122,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp)
+@@ -121,7 +121,11 @@ store_timestamp(struct rte_crypto_op *op, uint64_t timestamp)
@@ -63 +65 @@
-@@ -251,9 +255,13 @@ cperf_latency_test_runner(void *arg)
+@@ -250,9 +254,13 @@ cperf_latency_test_runner(void *arg)


More information about the stable mailing list