From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <pablo.de.lara.guarch@intel.com>
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id 38CC51C090
 for <dev@dpdk.org>; Mon, 14 May 2018 10:31:59 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga001.jf.intel.com ([10.7.209.18])
 by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 14 May 2018 01:31:58 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.49,399,1520924400"; d="scan'208";a="55675308"
Received: from irsmsx109.ger.corp.intel.com ([163.33.3.23])
 by orsmga001.jf.intel.com with ESMTP; 14 May 2018 01:31:56 -0700
Received: from irsmsx108.ger.corp.intel.com ([169.254.11.150]) by
 IRSMSX109.ger.corp.intel.com ([169.254.13.176]) with mapi id 14.03.0319.002;
 Mon, 14 May 2018 09:30:34 +0100
From: "De Lara Guarch, Pablo" <pablo.de.lara.guarch@intel.com>
To: "Verma, Shally" <Shally.Verma@cavium.com>, "dev@dpdk.org" <dev@dpdk.org>
CC: "Trahe, Fiona" <fiona.trahe@intel.com>, "ahmed.mansour@nxp.com"
 <ahmed.mansour@nxp.com>, "Gupta, Ashish" <Ashish.Gupta@cavium.com>, "Gupta,
 Ashish" <Ashish.Gupta@cavium.com>, "Sahu, Sunila" <Sunila.Sahu@cavium.com>
Thread-Topic: [PATCH v6 02/14] compressdev: add queue pair management
Thread-Index: AQHT61jFOzYhTdwbKEaa5Pf96WsataQu3UKw///zFoCAABKmcA==
Date: Mon, 14 May 2018 08:30:34 +0000
Message-ID: <E115CCD9D858EF4F90C690B0DCB4D8976CD0A453@IRSMSX108.ger.corp.intel.com>
References: <1517595924-25963-1-git-send-email-fiona.trahe@intel.com>
 <20180427132407.13385-1-pablo.de.lara.guarch@intel.com>
 <20180427132407.13385-3-pablo.de.lara.guarch@intel.com>
 <CY4PR0701MB363453F94D7F26FD1FE37E48F09C0@CY4PR0701MB3634.namprd07.prod.outlook.com>
 <E115CCD9D858EF4F90C690B0DCB4D8976CD0A39F@IRSMSX108.ger.corp.intel.com>
 <CY4PR0701MB363476C192A2D21BDC6A8E4DF09C0@CY4PR0701MB3634.namprd07.prod.outlook.com>
In-Reply-To: <CY4PR0701MB363476C192A2D21BDC6A8E4DF09C0@CY4PR0701MB3634.namprd07.prod.outlook.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTJhODM1MWItNmY5ZC00MTU3LTgxYzctMWYzNjgzYjJkYTg1IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6ImkwXC91QjVLMnkwXC9neWVlSldrdVRIc1k3Z2k1K1Q2bTZUK1RKR3M5bWxKND0ifQ==
x-ctpclassification: CTP_NT
dlp-product: dlpe-windows
dlp-version: 11.0.200.100
dlp-reaction: no-action
x-originating-ip: [163.33.239.182]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH v6 02/14] compressdev: add queue pair
	management
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 14 May 2018 08:31:59 -0000



> -----Original Message-----
> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
> Sent: Monday, May 14, 2018 9:17 AM
> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>; dev@dpdk.org
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; ahmed.mansour@nxp.com; Gupta,
> Ashish <Ashish.Gupta@cavium.com>; Gupta, Ashish
> <Ashish.Gupta@cavium.com>; Sahu, Sunila <Sunila.Sahu@cavium.com>
> Subject: RE: [PATCH v6 02/14] compressdev: add queue pair management
>=20
>=20
>=20
> >-----Original Message-----
> >From: De Lara Guarch, Pablo [mailto:pablo.de.lara.guarch@intel.com]
> >Sent: 14 May 2018 13:34
> >To: Verma, Shally <Shally.Verma@cavium.com>; dev@dpdk.org
> >Cc: Trahe, Fiona <fiona.trahe@intel.com>; ahmed.mansour@nxp.com; Gupta,
> >Ashish <Ashish.Gupta@cavium.com>; Gupta, Ashish
> ><Ashish.Gupta@cavium.com>; Sahu, Sunila <Sunila.Sahu@cavium.com>
> >Subject: RE: [PATCH v6 02/14] compressdev: add queue pair management
> >
> >Hi Shally,
> >
> >> -----Original Message-----
> >> From: Verma, Shally [mailto:Shally.Verma@cavium.com]
> >> Sent: Monday, May 14, 2018 8:54 AM
> >> To: De Lara Guarch, Pablo <pablo.de.lara.guarch@intel.com>;
> >> dev@dpdk.org
> >> Cc: Trahe, Fiona <fiona.trahe@intel.com>; ahmed.mansour@nxp.com;
> >> Gupta, Ashish <Ashish.Gupta@cavium.com>; Gupta, Ashish
> >> <Ashish.Gupta@cavium.com>; Sahu, Sunila <Sunila.Sahu@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@intel.com]
> >> >Sent: 27 April 2018 18:54
> >> >To: dev@dpdk.org
> >> >Cc: fiona.trahe@intel.com; Verma, Shally <Shally.Verma@cavium.com>;
> >> >ahmed.mansour@nxp.com; Gupta, Ashish <Ashish.Gupta@cavium.com>;
> >> >Pablo de Lara <pablo.de.lara.guarch@intel.com>; Verma, Shally
> >> ><Shally.Verma@cavium.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>
> >> >Subject: [PATCH v6 02/14] compressdev: add queue pair management
> >> >
> >> >From: Fiona Trahe <fiona.trahe@intel.com>
> >> >
> >> >Add functions to manage device queue pairs.
> >> >
> >> >Signed-off-by: Fiona Trahe <fiona.trahe@intel.com>
> >> >Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
> >> >Signed-off-by: Shally Verma <shally.verma@caviumnetworks.com>
> >> >Signed-off-by: Ashish Gupta <ashish.gupta@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 =3D &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 =3D=3D 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 =3D 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 cas=
e this
> value is 0 i.e.  implementation defined, then app may choose to leave thi=
s 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 th=
reads
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_configu=
re,
so it needs to have a value different than 0.
Therefore, I think passing a 0 here is not useful.

Thanks,
Pablo

>=20
> >
> >Thanks,
> >Pablo
> >
> >>
> >> Thanks
> >> Shally
> >>
> >> //snip