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.
Thanks Shally //snip