DPDK patches and discussions
 help / color / mirror / Atom feed
From: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
To: <dev@dpdk.org>, Ciara Power <ciara.power@intel.com>,
	Akhil Goyal <gakhil@marvell.com>,
	Fan Zhang <fanzhang.oss@gmail.com>,
	Anoob Joseph <anoobj@marvell.com>
Cc: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>, <stable@dpdk.org>
Subject: [PATCH v2 2/6] app/crypto-perf: remove redundant local varriable
Date: Wed, 26 Jun 2024 14:17:41 +0530	[thread overview]
Message-ID: <20240626084747.1595-3-gmuthukrishn@marvell.com> (raw)
In-Reply-To: <20240626084747.1595-1-gmuthukrishn@marvell.com>

Remove redundant local variable used for asym session.

Fixes: a29bb248988 ("cryptodev: hide asymmetric session structure")
Fixes: 2973dbf93b4 ("security: hide session structure")
Cc: stable@dpdk.org

Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn@marvell.com>
---
 app/test-crypto-perf/cperf_ops.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index 4ca001b721..a802281a71 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -21,7 +21,6 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
 		   uint64_t *tsc_start __rte_unused)
 {
 	uint16_t i;
-	void *asym_sess = (void *)sess;
 
 	for (i = 0; i < nb_ops; i++) {
 		struct rte_crypto_asym_op *asym_op = ops[i]->asym;
@@ -31,7 +30,7 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
 		asym_op->modex.base.length = options->modex_data->base.len;
 		asym_op->modex.result.data = options->modex_data->result.data;
 		asym_op->modex.result.length = options->modex_data->result.len;
-		rte_crypto_op_attach_asym_session(ops[i], asym_sess);
+		rte_crypto_op_attach_asym_session(ops[i], sess);
 	}
 }
 
@@ -62,7 +61,6 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
 
 	for (i = 0; i < nb_ops; i++) {
 		struct rte_crypto_sym_op *sym_op = ops[i]->sym;
-		void *sec_sess = (void *)sess;
 		uint32_t buf_sz;
 
 		uint32_t *per_pkt_hfn = rte_crypto_op_ctod_offset(ops[i],
@@ -70,7 +68,7 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
 		*per_pkt_hfn = options->pdcp_ses_hfn_en ? 0 : PDCP_DEFAULT_HFN;
 
 		ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
-		rte_security_attach_session(ops[i], sec_sess);
+		rte_security_attach_session(ops[i], sess);
 		sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] +
 							src_buf_offset);
 
@@ -127,7 +125,6 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
 		uint16_t iv_offset __rte_unused, uint32_t *imix_idx,
 		uint64_t *tsc_start)
 {
-	void *sec_sess = sess;
 	const uint32_t test_buffer_size = options->test_buffer_size;
 	uint64_t tsc_start_temp, tsc_end_temp;
 	uint16_t i = 0;
@@ -140,7 +137,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
 		uint32_t offset = test_buffer_size;
 
 		ops[i]->status = RTE_CRYPTO_OP_STATUS_NOT_PROCESSED;
-		rte_security_attach_session(ops[i], sec_sess);
+		rte_security_attach_session(ops[i], sess);
 		sym_op->m_src = (struct rte_mbuf *)((uint8_t *)ops[i] + src_buf_offset);
 		sym_op->m_src->pkt_len = test_buffer_size;
 
-- 
2.25.1


  parent reply	other threads:[~2024-06-26  8:48 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-15 11:53 [PATCH v1 0/6] app/crypto-perf: add asymmetric crypto tests Gowrishankar Muthukrishnan
2024-06-15 11:53 ` [PATCH v1 1/6] app/crypto-perf: add modex groups test Gowrishankar Muthukrishnan
2024-06-20  6:47   ` Akhil Goyal
2024-06-15 11:53 ` [PATCH v1 2/6] app/crypto-perf: remove redundant local varriable Gowrishankar Muthukrishnan
2024-06-20  6:47   ` Akhil Goyal
2024-06-15 11:53 ` [PATCH v1 3/6] app/crypto-perf: fix result location for asymmetric test Gowrishankar Muthukrishnan
2024-06-20  6:46   ` Akhil Goyal
2024-06-15 11:53 ` [PATCH v1 4/6] app/crypto-perf: add function to check asymmetric operation Gowrishankar Muthukrishnan
2024-06-20  6:47   ` Akhil Goyal
2024-06-26  6:58   ` Akhil Goyal
2024-06-15 11:53 ` [PATCH v1 5/6] app/crypto-perf: support SM2 Gowrishankar Muthukrishnan
2024-06-15 11:53 ` [PATCH v1 6/6] app/crypto-perf: support ECDSA Gowrishankar Muthukrishnan
2024-06-20  6:48   ` Akhil Goyal
2024-06-17  6:42 ` [PATCH v1 0/6] app/crypto-perf: add asymmetric crypto tests Anoob Joseph
2024-06-25 15:40 ` Dooley, Brian
2024-06-26  8:47 ` [PATCH v2 " Gowrishankar Muthukrishnan
2024-06-26  8:47   ` [PATCH v2 1/6] app/crypto-perf: add modex groups test Gowrishankar Muthukrishnan
2024-06-26  8:47   ` Gowrishankar Muthukrishnan [this message]
2024-06-26  8:47   ` [PATCH v2 3/6] app/crypto-perf: fix result location for asymmetric test Gowrishankar Muthukrishnan
2024-06-26  8:47   ` [PATCH v2 4/6] app/crypto-perf: add function to check asymmetric operation Gowrishankar Muthukrishnan
2024-06-26  8:47   ` [PATCH v2 5/6] app/crypto-perf: support SM2 Gowrishankar Muthukrishnan
2024-06-26  8:47   ` [PATCH v2 6/6] app/crypto-perf: support ECDSA Gowrishankar Muthukrishnan
2024-06-26 13:42   ` [PATCH v2 0/6] app/crypto-perf: add asymmetric crypto tests 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=20240626084747.1595-3-gmuthukrishn@marvell.com \
    --to=gmuthukrishn@marvell.com \
    --cc=anoobj@marvell.com \
    --cc=ciara.power@intel.com \
    --cc=dev@dpdk.org \
    --cc=fanzhang.oss@gmail.com \
    --cc=gakhil@marvell.com \
    --cc=stable@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).