From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 38CC51C090 for ; 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" To: "Verma, Shally" , "dev@dpdk.org" CC: "Trahe, Fiona" , "ahmed.mansour@nxp.com" , "Gupta, Ashish" , "Gupta, Ashish" , "Sahu, Sunila" 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: 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> In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 ; dev@dpdk.org > Cc: Trahe, Fiona ; ahmed.mansour@nxp.com; Gupta, > Ashish ; Gupta, Ashish > ; Sahu, Sunila > 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 ; dev@dpdk.org > >Cc: Trahe, Fiona ; ahmed.mansour@nxp.com; Gupta, > >Ashish ; Gupta, Ashish > >; Sahu, Sunila > >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 ; > >> dev@dpdk.org > >> Cc: Trahe, Fiona ; ahmed.mansour@nxp.com; > >> Gupta, Ashish ; Gupta, Ashish > >> ; Sahu, Sunila > >> 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 ; > >> >ahmed.mansour@nxp.com; Gupta, Ashish ; > >> >Pablo de Lara ; Verma, Shally > >> >; Gupta, Ashish > >> >Subject: [PATCH v6 02/14] compressdev: add queue pair management > >> > > >> >From: Fiona Trahe > >> > > >> >Add functions to manage device queue pairs. > >> > > >> >Signed-off-by: Fiona Trahe > >> >Signed-off-by: Pablo de Lara > >> >Signed-off-by: Shally Verma > >> >Signed-off-by: Ashish Gupta > >> >--- > >> > 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