> -----Original Message-----
> From: Verma, Shally [mailto:shally.ve...@cavium.com]
> Sent: Monday, May 14, 2018 9:17 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>; dev@dpdk.org
> Cc: Trahe, Fiona <fiona.tr...@intel.com>; ahmed.mans...@nxp.com; Gupta,
> Ashish <ashish.gu...@cavium.com>; Gupta, Ashish
> <ashish.gu...@cavium.com>; Sahu, Sunila <sunila.s...@cavium.com>
> Subject: RE: [PATCH v6 02/14] compressdev: add queue pair management
> 
> 
> 
> >-----Original Message-----
> >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.gua...@intel.com]
> >Sent: 14 May 2018 13:34
> >To: Verma, Shally <shally.ve...@cavium.com>; dev@dpdk.org
> >Cc: Trahe, Fiona <fiona.tr...@intel.com>; ahmed.mans...@nxp.com; Gupta,
> >Ashish <ashish.gu...@cavium.com>; Gupta, Ashish
> ><ashish.gu...@cavium.com>; Sahu, Sunila <sunila.s...@cavium.com>
> >Subject: RE: [PATCH v6 02/14] compressdev: add queue pair management
> >
> >Hi Shally,
> >
> >> -----Original Message-----
> >> From: Verma, Shally [mailto:shally.ve...@cavium.com]
> >> Sent: Monday, May 14, 2018 8:54 AM
> >> To: De Lara Guarch, Pablo <pablo.de.lara.gua...@intel.com>;
> >> dev@dpdk.org
> >> Cc: Trahe, Fiona <fiona.tr...@intel.com>; ahmed.mans...@nxp.com;
> >> Gupta, Ashish <ashish.gu...@cavium.com>; Gupta, Ashish
> >> <ashish.gu...@cavium.com>; Sahu, Sunila <sunila.s...@cavium.com>
> >> Subject: RE: [PATCH v6 02/14] compressdev: add queue pair management
> >>
> >> HI Pablo
> >>
> >> >-----Original Message-----
> >> >From: Pablo de Lara [mailto:pablo.de.lara.gua...@intel.com]
> >> >Sent: 27 April 2018 18:54
> >> >To: dev@dpdk.org
> >> >Cc: fiona.tr...@intel.com; Verma, Shally <shally.ve...@cavium.com>;
> >> >ahmed.mans...@nxp.com; Gupta, Ashish <ashish.gu...@cavium.com>;
> >> >Pablo de Lara <pablo.de.lara.gua...@intel.com>; Verma, Shally
> >> ><shally.ve...@cavium.com>; Gupta, Ashish <ashish.gu...@cavium.com>
> >> >Subject: [PATCH v6 02/14] compressdev: add queue pair management
> >> >
> >> >From: Fiona Trahe <fiona.tr...@intel.com>
> >> >
> >> >Add functions to manage device queue pairs.
> >> >
> >> >Signed-off-by: Fiona Trahe <fiona.tr...@intel.com>
> >> >Signed-off-by: Pablo de Lara <pablo.de.lara.gua...@intel.com>
> >> >Signed-off-by: Shally Verma <shally.ve...@caviumnetworks.com>
> >> >Signed-off-by: Ashish Gupta <ashish.gu...@caviumnetworks.com>
> >> >---
> >> > lib/librte_compressdev/rte_compressdev.c           | 178
> >> ++++++++++++++++++++-
> >> > lib/librte_compressdev/rte_compressdev.h           |  45 ++++++
> >> > lib/librte_compressdev/rte_compressdev_internal.h  |   5 +
> >> > lib/librte_compressdev/rte_compressdev_pmd.h       |  47 ++++++
> >> > lib/librte_compressdev/rte_compressdev_version.map |   2 +
> >> > 5 files changed, 276 insertions(+), 1 deletion(-)
> >> >
> >> >diff --git a/lib/librte_compressdev/rte_compressdev.c
> >> >b/lib/librte_compressdev/rte_compressdev.c
> >> >index 751517c3d..6667528b5 100644
> >> >--- a/lib/librte_compressdev/rte_compressdev.c
> >> >+++ b/lib/librte_compressdev/rte_compressdev.c
> >> >@@ -227,10 +227,136 @@ rte_compressdev_pmd_release_device(struct
> >> rte_compressdev *compressdev)
> >> >  return 0;
> >> > }
> >> >
> >> >+uint16_t __rte_experimental
> >> >+rte_compressdev_queue_pair_count(uint8_t dev_id) {
> >> >+ struct rte_compressdev *dev;
> >> >+
> >> >+ dev = &rte_comp_devices[dev_id];
> >> >+ return dev->data->nb_queue_pairs;
> >> >+}
> >> >+
> >> >+static int
> >> >+rte_compressdev_queue_pairs_config(struct rte_compressdev *dev,
> >> >+         uint16_t nb_qpairs, int socket_id) {
> >> >+ struct rte_compressdev_info dev_info;
> >> >+ void **qp;
> >> >+ unsigned int i;
> >> >+
> >> >+ if ((dev == NULL) || (nb_qpairs < 1)) {
> >> >+         COMPRESSDEV_LOG(ERR, "invalid param: dev %p, nb_queues
> >> %u",
> >> >+                                                 dev, nb_qpairs);
> >> [Shally] shouldn't nb_qpairs < 0 as  nb_qpairs = 0 a valid input
> >> which imply number of supported qp is implementation defined and thus
> unlimited.
> >
> >You mean maximum number of queues. This is number of queues to
> >configure, which should be at least 1.
> App can call dev_configure with max as returned by dev_info_get(), in case 
> this
> value is 0 i.e.  implementation defined, then app may choose to leave this 
> value
> to 0 and configure device with its default setup. App, in any case, will call 
> for
> qp_setup() to configure as many qp as it want. Isn't it so?

The number of queue pairs to be used/configured depends on the number of threads
to be used, so it is up to the app to set this value.
Also, the array storing the queue pairs is created when calling dev_configure,
so it needs to have a value different than 0.
Therefore, I think passing a 0 here is not useful.

Thanks,
Pablo

> 
> >
> >Thanks,
> >Pablo
> >
> >>
> >> Thanks
> >> Shally
> >>
> >> //snip

Reply via email to