* [PATCH] app/crypto-perf: remove redundant function return
@ 2022-07-21 4:58 Anoob Joseph
2022-07-25 12:51 ` Zhang, Roy Fan
0 siblings, 1 reply; 3+ messages in thread
From: Anoob Joseph @ 2022-07-21 4:58 UTC (permalink / raw)
To: Akhil Goyal, Ciara Power, Fan Zhang
Cc: Jerin Jacob, Hemant Agrawal, Gagandeep Singh, dev
Remove redundant function return value. The function is used in datapath
and the return value is not checked in any of the existing callers.
Signed-off-by: Anoob Joseph <anoobj@marvell.com>
---
app/test-crypto-perf/cperf_ops.c | 36 +++++++++-----------------------
app/test-crypto-perf/cperf_ops.h | 2 +-
2 files changed, 11 insertions(+), 27 deletions(-)
diff --git a/app/test-crypto-perf/cperf_ops.c b/app/test-crypto-perf/cperf_ops.c
index 0417af2d5e..d746d51082 100644
--- a/app/test-crypto-perf/cperf_ops.c
+++ b/app/test-crypto-perf/cperf_ops.c
@@ -9,7 +9,7 @@
#include "cperf_ops.h"
#include "cperf_test_vectors.h"
-static int
+static void
cperf_set_ops_asym(struct rte_crypto_op **ops,
uint32_t src_buf_offset __rte_unused,
uint32_t dst_buf_offset __rte_unused, uint16_t nb_ops,
@@ -33,7 +33,6 @@ cperf_set_ops_asym(struct rte_crypto_op **ops,
asym_op->modex.result.length = options->modex_data->result.len;
rte_crypto_op_attach_asym_session(ops[i], asym_sess);
}
- return 0;
}
#ifdef RTE_LIB_SECURITY
@@ -52,7 +51,7 @@ test_ipsec_vec_populate(struct rte_mbuf *m, const struct cperf_options *options,
}
}
-static int
+static void
cperf_set_ops_security(struct rte_crypto_op **ops,
uint32_t src_buf_offset __rte_unused,
uint32_t dst_buf_offset __rte_unused,
@@ -120,11 +119,9 @@ cperf_set_ops_security(struct rte_crypto_op **ops,
RTE_SET_USED(tsc_start);
RTE_SET_USED(test_vector);
-
- return 0;
}
-static int
+static void
cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
uint32_t src_buf_offset __rte_unused,
uint32_t dst_buf_offset __rte_unused,
@@ -166,7 +163,7 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
}
if (options->test_file != NULL)
- return 0;
+ return;
tsc_start_temp = rte_rdtsc_precise();
@@ -179,13 +176,11 @@ cperf_set_ops_security_ipsec(struct rte_crypto_op **ops,
tsc_end_temp = rte_rdtsc_precise();
*tsc_start += tsc_end_temp - tsc_start_temp;
-
- return 0;
}
#endif
-static int
+static void
cperf_set_ops_null_cipher(struct rte_crypto_op **ops,
uint32_t src_buf_offset, uint32_t dst_buf_offset,
uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
@@ -221,11 +216,9 @@ cperf_set_ops_null_cipher(struct rte_crypto_op **ops,
sym_op->cipher.data.length = options->test_buffer_size;
sym_op->cipher.data.offset = 0;
}
-
- return 0;
}
-static int
+static void
cperf_set_ops_null_auth(struct rte_crypto_op **ops,
uint32_t src_buf_offset, uint32_t dst_buf_offset,
uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
@@ -261,11 +254,9 @@ cperf_set_ops_null_auth(struct rte_crypto_op **ops,
sym_op->auth.data.length = options->test_buffer_size;
sym_op->auth.data.offset = 0;
}
-
- return 0;
}
-static int
+static void
cperf_set_ops_cipher(struct rte_crypto_op **ops,
uint32_t src_buf_offset, uint32_t dst_buf_offset,
uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
@@ -318,11 +309,9 @@ cperf_set_ops_cipher(struct rte_crypto_op **ops,
}
}
-
- return 0;
}
-static int
+static void
cperf_set_ops_auth(struct rte_crypto_op **ops,
uint32_t src_buf_offset, uint32_t dst_buf_offset,
uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
@@ -420,10 +409,9 @@ cperf_set_ops_auth(struct rte_crypto_op **ops,
}
}
}
- return 0;
}
-static int
+static void
cperf_set_ops_cipher_auth(struct rte_crypto_op **ops,
uint32_t src_buf_offset, uint32_t dst_buf_offset,
uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
@@ -539,11 +527,9 @@ cperf_set_ops_cipher_auth(struct rte_crypto_op **ops,
}
}
-
- return 0;
}
-static int
+static void
cperf_set_ops_aead(struct rte_crypto_op **ops,
uint32_t src_buf_offset, uint32_t dst_buf_offset,
uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
@@ -652,8 +638,6 @@ cperf_set_ops_aead(struct rte_crypto_op **ops,
}
}
}
-
- return 0;
}
static struct rte_cryptodev_sym_session *
diff --git a/app/test-crypto-perf/cperf_ops.h b/app/test-crypto-perf/cperf_ops.h
index 30d38f90e3..1d2fbb4e30 100644
--- a/app/test-crypto-perf/cperf_ops.h
+++ b/app/test-crypto-perf/cperf_ops.h
@@ -18,7 +18,7 @@ typedef struct rte_cryptodev_sym_session *(*cperf_sessions_create_t)(
const struct cperf_test_vector *test_vector,
uint16_t iv_offset);
-typedef int (*cperf_populate_ops_t)(struct rte_crypto_op **ops,
+typedef void (*cperf_populate_ops_t)(struct rte_crypto_op **ops,
uint32_t src_buf_offset, uint32_t dst_buf_offset,
uint16_t nb_ops, struct rte_cryptodev_sym_session *sess,
const struct cperf_options *options,
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] app/crypto-perf: remove redundant function return
2022-07-21 4:58 [PATCH] app/crypto-perf: remove redundant function return Anoob Joseph
@ 2022-07-25 12:51 ` Zhang, Roy Fan
2022-08-28 8:38 ` Akhil Goyal
0 siblings, 1 reply; 3+ messages in thread
From: Zhang, Roy Fan @ 2022-07-25 12:51 UTC (permalink / raw)
To: Anoob Joseph, Akhil Goyal, Power, Ciara
Cc: Jerin Jacob, Hemant Agrawal, Gagandeep Singh, dev
> -----Original Message-----
> From: Anoob Joseph <anoobj@marvell.com>
> Sent: Thursday, July 21, 2022 5:59 AM
> To: Akhil Goyal <gakhil@marvell.com>; Power, Ciara
> <ciara.power@intel.com>; Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Cc: Jerin Jacob <jerinj@marvell.com>; Hemant Agrawal
> <hemant.agrawal@nxp.com>; Gagandeep Singh <g.singh@nxp.com>;
> dev@dpdk.org
> Subject: [PATCH] app/crypto-perf: remove redundant function return
>
> Remove redundant function return value. The function is used in datapath
> and the return value is not checked in any of the existing callers.
>
> Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> ---
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] app/crypto-perf: remove redundant function return
2022-07-25 12:51 ` Zhang, Roy Fan
@ 2022-08-28 8:38 ` Akhil Goyal
0 siblings, 0 replies; 3+ messages in thread
From: Akhil Goyal @ 2022-08-28 8:38 UTC (permalink / raw)
To: Zhang, Roy Fan, Anoob Joseph, Power, Ciara
Cc: Jerin Jacob Kollanukkaran, Hemant Agrawal, Gagandeep Singh, dev
> > Subject: [PATCH] app/crypto-perf: remove redundant function return
> >
> > Remove redundant function return value. The function is used in datapath
> > and the return value is not checked in any of the existing callers.
> >
> > Signed-off-by: Anoob Joseph <anoobj@marvell.com>
> > ---
> Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Applied to dpdk-next-crypto
Thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-08-28 8:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-21 4:58 [PATCH] app/crypto-perf: remove redundant function return Anoob Joseph
2022-07-25 12:51 ` Zhang, Roy Fan
2022-08-28 8:38 ` Akhil Goyal
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).