[dpdk-dev] [PATCH v6 02/14] compressdev: add queue pair management

Verma, Shally Shally.Verma at cavium.com
Mon May 14 10:16:47 CEST 2018



>-----Original Message-----
>From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch at intel.com]
>Sent: 14 May 2018 13:34
>To: Verma, Shally <Shally.Verma at cavium.com>; dev at dpdk.org
>Cc: Trahe, Fiona <fiona.trahe at intel.com>; ahmed.mansour at nxp.com; Gupta, Ashish <Ashish.Gupta at cavium.com>; Gupta, Ashish
><Ashish.Gupta at cavium.com>; Sahu, Sunila <Sunila.Sahu at cavium.com>
>Subject: RE: [PATCH v6 02/14] compressdev: add queue pair management
>
>Hi Shally,
>
>> -----Original Message-----
>> From: Verma, Shally [mailto:Shally.Verma at cavium.com]
>> Sent: Monday, May 14, 2018 8:54 AM
>> To: De Lara Guarch, Pablo <pablo.de.lara.guarch at intel.com>; dev at dpdk.org
>> Cc: Trahe, Fiona <fiona.trahe at intel.com>; ahmed.mansour at nxp.com; Gupta,
>> Ashish <Ashish.Gupta at cavium.com>; Gupta, Ashish
>> <Ashish.Gupta at cavium.com>; Sahu, Sunila <Sunila.Sahu at 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.guarch at intel.com]
>> >Sent: 27 April 2018 18:54
>> >To: dev at dpdk.org
>> >Cc: fiona.trahe at intel.com; Verma, Shally <Shally.Verma at cavium.com>;
>> >ahmed.mansour at nxp.com; Gupta, Ashish <Ashish.Gupta at cavium.com>; Pablo
>> >de Lara <pablo.de.lara.guarch at intel.com>; Verma, Shally
>> ><Shally.Verma at cavium.com>; Gupta, Ashish <Ashish.Gupta at cavium.com>
>> >Subject: [PATCH v6 02/14] compressdev: add queue pair management
>> >
>> >From: Fiona Trahe <fiona.trahe at intel.com>
>> >
>> >Add functions to manage device queue pairs.
>> >
>> >Signed-off-by: Fiona Trahe <fiona.trahe at intel.com>
>> >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch at intel.com>
>> >Signed-off-by: Shally Verma <shally.verma at caviumnetworks.com>
>> >Signed-off-by: Ashish Gupta <ashish.gupta at 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?
 
>
>Thanks,
>Pablo
>
>>
>> Thanks
>> Shally
>>
>> //snip



More information about the dev mailing list