Hi Pablo,
On 9/22/2017 1:25 PM, Pablo de Lara wrote:
Add parameter "qps" in crypto performance app,
to create multiple queue pairs per device.
This new parameter is useful to have multiple logical
cores using a single crypto device, without needing
to initialize a crypto device per core.
Signed-off-by: Pablo de Lara <pablo.de.lara.gua...@intel.com>
---
app/test-crypto-perf/cperf_options.h | 2 +
app/test-crypto-perf/cperf_options_parsing.c | 22 ++++++++++
app/test-crypto-perf/cperf_test_latency.c | 14 +++---
app/test-crypto-perf/cperf_test_pmd_cyclecount.c | 7 +--
app/test-crypto-perf/cperf_test_throughput.c | 14 +++---
app/test-crypto-perf/cperf_test_verify.c | 14 +++---
app/test-crypto-perf/main.c | 56 ++++++++++++++----------
doc/guides/tools/cryptoperf.rst | 4 ++
8 files changed, 84 insertions(+), 49 deletions(-)
diff --git a/app/test-crypto-perf/cperf_options.h
b/app/test-crypto-perf/cperf_options.h
index 6d339f4..468d5e2 100644
--- a/app/test-crypto-perf/cperf_options.h
+++ b/app/test-crypto-perf/cperf_options.h
@@ -15,6 +15,7 @@
#define CPERF_DESC_NB ("desc-nb")
#define CPERF_DEVTYPE ("devtype")
+#define CPERF_QP_NB ("qp-nb")
#define CPERF_OPTYPE ("optype")
#define CPERF_SESSIONLESS ("sessionless")
#define CPERF_OUT_OF_PLACE ("out-of-place")
@@ -74,6 +75,7 @@ struct cperf_options {
uint32_t segment_sz;
uint32_t test_buffer_size;
uint32_t nb_descriptors;
+ uint32_t nb_qps;
uint32_t sessionless:1;
uint32_t out_of_place:1;
diff --git a/app/test-crypto-perf/cperf_options_parsing.c
b/app/test-crypto-perf/cperf_options_parsing.c
index 89f86a2..441cd61 100644
--- a/app/test-crypto-perf/cperf_options_parsing.c
+++ b/app/test-crypto-perf/cperf_options_parsing.c
@@ -364,6 +364,24 @@ parse_desc_nb(struct cperf_options *opts, const char *arg)
}
static int
+parse_qp_nb(struct cperf_options *opts, const char *arg)
+{
+ int ret = parse_uint32_t(&opts->nb_qps, arg);
+
+ if (ret) {
+ RTE_LOG(ERR, USER1, "failed to parse number of queue pairs\n");
+ return -1;
+ }
+
+ if ((opts->nb_qps == 0) || (opts->nb_qps > 256)) {
Shouldn't this be a macro for max nb_qps.
Also a generic comment on this patch.. Why do we need an explicit
parameter for nb-qps. Can't we do it similar to ipsec-secgw.
It takes the devices and maps the queues with core as per the devices'
capabilities.
-Akhil