[dpdk-dev] [PATCH v3 6/7] app/crypto-perf: support multiple queue pairs

De Lara Guarch, Pablo pablo.de.lara.guarch at intel.com
Wed Oct 4 12:25:40 CEST 2017


Hi Akhil,

> -----Original Message-----
> From: Akhil Goyal [mailto:akhil.goyal at nxp.com]
> Sent: Tuesday, September 26, 2017 9:42 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>; Doherty,
> Declan <declan.doherty at intel.com>
> Cc: dev at dpdk.org
> Subject: Re: [PATCH v3 6/7] app/crypto-perf: support multiple queue pairs
> 
> 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.guarch at 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.

I see... that looks like a good idea. I am implementing it, but will do it slightly different.
Instead of having the number of queue pairs per device equal to the number of logical cores,
I will divide the number of cores by the number of crypto devices.
So, if 4 cores are available and 2 crypto devices are used, 2 queue pairs will be set up. 

Thanks for your review,
Pablo

> 
> -Akhil


More information about the dev mailing list