From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 60C0BDD2 for ; Fri, 4 May 2018 10:44:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 May 2018 01:44:01 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,361,1520924400"; d="scan'208";a="225749540" Received: from irsmsx106.ger.corp.intel.com ([163.33.3.31]) by fmsmga006.fm.intel.com with ESMTP; 04 May 2018 01:44:00 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.14]) by IRSMSX106.ger.corp.intel.com ([169.254.8.125]) with mapi id 14.03.0319.002; Fri, 4 May 2018 09:43:59 +0100 From: "Trahe, Fiona" To: "Verma, Shally" , "De Lara Guarch, Pablo" , "dev@dpdk.org" CC: "ahmed.mansour@nxp.com" , "Gupta, Ashish" , "Sahu, Sunila" , "Trahe, Fiona" Thread-Topic: [PATCH v6 02/14] compressdev: add queue pair management Thread-Index: AQHT3isWXDg5C88KBkyjj0IDKBj+7qQe17IAgAByHqA= Date: Fri, 4 May 2018 08:43:58 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B4358946E1C6@IRSMSX101.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> In-Reply-To: Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZGRmM2YxM2EtMDBjMy00NDhmLWIyZWUtMGFiZTg1YWU2NDRhIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IlpVR2RSU2o1cGpUczkzT1JEaDFYM3dvc04yMWZBYXNCbHZ2QVZRbWM2Qmc9In0= x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.200.100 dlp-reaction: no-action x-originating-ip: [163.33.239.181] 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: Fri, 04 May 2018 08:44:02 -0000 > -----Original Message----- > From: Verma, Shally [mailto:Shally.Verma@cavium.com] > Sent: Friday, May 4, 2018 3:49 AM > To: De Lara Guarch, Pablo ; dev@dpdk.org > Cc: Trahe, Fiona ; ahmed.mansour@nxp.com; Gupta, A= shish > ; Sahu, Sunila > Subject: RE: [PATCH v6 02/14] compressdev: add queue pair management >=20 > One quick question >=20 > >-----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 ; ahme= d.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(-) > > > >+ > >+ if (dev->data->queue_pairs =3D=3D NULL) { /* first time configuration = */ > >+ dev->data->queue_pairs =3D rte_zmalloc_socket( > >+ "compressdev->queue_pairs", > >+ sizeof(dev->data->queue_pairs[0]) * nb_qpairs, > >+ RTE_CACHE_LINE_SIZE, socket_id); > >+ > >+ if (dev->data->queue_pairs =3D=3D NULL) { > >+ dev->data->nb_queue_pairs =3D 0; > >+ COMPRESSDEV_LOG(ERR, > >+ "failed to get memory for qp meta data, nb_queues %u", > >+ nb_qpairs); > >+ return -(ENOMEM); > >+ } > >+ } else { /* re-configure */ > >+ int ret; > >+ uint16_t old_nb_queues =3D dev->data->nb_queue_pairs; > >+ > [Shally] dev->data is shared entity among processes. So, does it mean if = multiple processes call for > device_configure, then every new process overrides qp allocations (and ot= her resources) already done > by any other process, leaving it unusable for them? >=20 > Thanks > Shally [Fiona] Yes. If multiple processes want to share a device they'd need to en= sure that a primary process configures the device and agree between the processes which process uses wh= ich resource, e.g. each process accesses only 1 queue_pair.=20 Same is true of other device management APIs like start, stop and close.