From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <fiona.trahe@intel.com>
Received: from mga09.intel.com (mga09.intel.com [134.134.136.24])
 by dpdk.org (Postfix) with ESMTP id 0D2085F2B
 for <dev@dpdk.org>; Wed, 14 Mar 2018 19:13:57 +0100 (CET)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga006.jf.intel.com ([10.7.209.51])
 by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 14 Mar 2018 11:13:54 -0700
X-ExtLoop1: 1
X-IronPort-AV: E=Sophos;i="5.48,306,1517904000"; d="scan'208";a="25703263"
Received: from irsmsx107.ger.corp.intel.com ([163.33.3.99])
 by orsmga006.jf.intel.com with ESMTP; 14 Mar 2018 11:13:53 -0700
Received: from irsmsx101.ger.corp.intel.com ([169.254.1.5]) by
 IRSMSX107.ger.corp.intel.com ([169.254.10.46]) with mapi id 14.03.0319.002;
 Wed, 14 Mar 2018 18:13:51 +0000
From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>, Shreyansh Jain
 <shreyansh.jain@nxp.com>
CC: "Richardson, Bruce" <bruce.richardson@intel.com>, Liron Himi
 <lironh@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>, "Jozwiak, TomaszX"
 <tomaszx.jozwiak@intel.com>
Thread-Topic: [dpdk-dev] Sharing Common libs between PMDs
Thread-Index: AdO7d0duKkWEAyQgRJGOHuQ0IpF3NAALUBKAAABOYoAAAdBRkAADNLHwAADCrYAAANDR0A==
Date: Wed, 14 Mar 2018 18:13:51 +0000
Message-ID: <348A99DA5F5B7549AA880327E580B4358934B2CF@IRSMSX101.ger.corp.intel.com>
References: <f3d9b6d6562c41258fecb14a54a90565@IL-EXCH02.marvell.com>
 <20180314145538.GA2482@jerin>
 <20180314150431.GA7196@bricha3-MOBL.ger.corp.intel.com>
 <348A99DA5F5B7549AA880327E580B4358934B1C5@IRSMSX101.ger.corp.intel.com>
 <HE1PR0402MB2780BACEF2C353901041DCC590D10@HE1PR0402MB2780.eurprd04.prod.outlook.com>
 <20180314175000.GA15532@jerin>
In-Reply-To: <20180314175000.GA15532@jerin>
Accept-Language: en-IE, en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTdkMjU1Y2ItODU2MS00Y2E4LWEyMjItZGU2MjY1ZDJjMTVkIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkFZNWJIa1I2bVpsbkhUQmo0ck40eUZUakNUdXY3UmdKSjhFamthR1NhaHM9In0=
x-ctpclassification: CTP_NT
dlp-product: dlpe-windows
dlp-version: 11.0.0.116
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] Sharing Common libs between PMDs
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: Wed, 14 Mar 2018 18:14:00 -0000



> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Wednesday, March 14, 2018 5:50 PM
> To: Shreyansh Jain <shreyansh.jain@nxp.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; Richardson, Bruce <bruce.richar=
dson@intel.com>; Liron Himi
> <lironh@marvell.com>; dev@dpdk.org; Jozwiak, TomaszX <tomaszx.jozwiak@int=
el.com>
> Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
>=20
> -----Original Message-----
> > Date: Wed, 14 Mar 2018 17:38:14 +0000
> > From: Shreyansh Jain <shreyansh.jain@nxp.com>
> > To: "Trahe, Fiona" <fiona.trahe@intel.com>, "Richardson, Bruce"
> >  <bruce.richardson@intel.com>, Jerin Jacob <jerin.jacob@caviumnetworks.=
com>
> > CC: Liron Himi <lironh@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>,
> >  "Jozwiak, TomaszX" <tomaszx.jozwiak@intel.com>
> > Subject: RE: [dpdk-dev] Sharing Common libs between PMDs
> >
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Trahe, Fiona
> > > Sent: Wednesday, March 14, 2018 9:41 PM
> > > To: Richardson, Bruce <bruce.richardson@intel.com>; Jerin Jacob
> > > <jerin.jacob@caviumnetworks.com>
> > > Cc: Liron Himi <lironh@marvell.com>; dev@dpdk.org; Trahe, Fiona
> > > <fiona.trahe@intel.com>; Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>
> > > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richards=
on
> > > > Sent: Wednesday, March 14, 2018 3:05 PM
> > > > To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > > > Cc: Liron Himi <lironh@marvell.com>; dev@dpdk.org
> > > > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> > > >
> > > > On Wed, Mar 14, 2018 at 08:25:45PM +0530, Jerin Jacob wrote:
> > > > > -----Original Message-----
> > > > > > Date: Wed, 14 Mar 2018 09:34:40 +0000
> > > > > > From: Liron Himi <lironh@marvell.com>
> > > > > > To: "dev@dpdk.org" <dev@dpdk.org>
> > > > > > CC: Liron Himi <lironh@marvell.com>
> > > > > > Subject: [dpdk-dev] Sharing Common libs between PMDs
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > We have several PMDs in DPDK that are using the same underlying
> > > common libraries.
> > > > > > In addition, we have plans to add some new common service into
> > > DPDK that already introduces too
> > > > much complexity with the way that the code is written now.
> > > > > > Therefore, we would like to move all our common functions calls
> > > into one shared/common folder in
> > > > DPDK and we need to find proper place for this purpose.
> > > > > >
> > > > > > Can you suggest on such a place?
> > > > >
> > > > > There was an attempt to create "driver/common" but latter the
> > > common code
> > > > > for NXP HW device got moved to drivers/bus/dpaa/. Linux kernel ha=
s
> > > > > something called "driver/soc", I think, "driver/soc" may be more
> > > appropriate.
> > > > >
> > > > > Currently DPDK's driver build dependency is in the following orde=
r
> > > > > (bus, mempool, net, crypto, event).
> > > > > Other than driver/common or driver/soc, one option could be to
> > > > > - Move the common code to bus or mempool
> > > > > and
> > > > > - Across the drivers, include the header files through CFLAGS if
> > > the common code
> > > > >   is in header file
> > > > >
> > > https://emea01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fd=
pdk.
> > > org%2Fbrowse%2Fdpdk%2Ftree%2Fdrivers%2Fevent%2Focteontx%2FMakefile%23=
n1
> > > 3&data=3D02%7C01%7Cshreyansh.jain%40nxp.com%7Cfa7ba7a1dfd94b9336c008d=
589c
> > > 63dd7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636566406955506340=
&s
> > > data=3DMkxFJUuHPuBFIqAgjmUzUcgRms9WTsxkkMQah4kGAlM%3D&reserved=3D0
> > > > >
> > > > Given that this seems to be a recurring problem, I think having a
> > > > drivers/common folder may not be a bad thing.
> > > >
> > > > /Bruce
> > > We've been grappling with the same problem for QAT driver.
> > > A variant we were about to propose was to rename drivers/bus to
> > > drivers/lib.
> > > And possibly move drivers/mempool to drivers/lib
> > > As the rest of the drivers/xxx are actually PMDs, while mempool and b=
us
> > > are libs
> > > on which other drivers depend.
> > > I'm ok with adding a drivers/common instead, but the above seems
> > > cleaner.
> >
> > In my opinion, I think we should add a common/ without modifying the bu=
s/mempool structure. I agree
> that bus/mempool are not standalone PMDs themselves, but they are not lib=
raries either in true sense -
> they /plug/ into the eal framework and *may* provide service to drivers.
> >
> > As for common/ - that gets a +1 from me.
>=20
> +1 for drivers/common
Ok.=20
+1 for drivers/common