From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 0795E5F21 for ; Wed, 14 Mar 2018 17:11:14 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2018 09:11:12 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,471,1515484800"; d="scan'208";a="37371818" Received: from irsmsx151.ger.corp.intel.com ([163.33.192.59]) by fmsmga004.fm.intel.com with ESMTP; 14 Mar 2018 09:11:11 -0700 Received: from irsmsx101.ger.corp.intel.com ([169.254.1.5]) by IRSMSX151.ger.corp.intel.com ([169.254.4.16]) with mapi id 14.03.0319.002; Wed, 14 Mar 2018 16:11:10 +0000 From: "Trahe, Fiona" To: "Richardson, Bruce" , Jerin Jacob CC: Liron Himi , "dev@dpdk.org" , "Trahe, Fiona" , "Jozwiak, TomaszX" Thread-Topic: [dpdk-dev] Sharing Common libs between PMDs Thread-Index: AdO7d0duKkWEAyQgRJGOHuQ0IpF3NAALUBKAAABOYoAAAdBRkA== Date: Wed, 14 Mar 2018 16:11:09 +0000 Message-ID: <348A99DA5F5B7549AA880327E580B4358934B1C5@IRSMSX101.ger.corp.intel.com> References: <20180314145538.GA2482@jerin> <20180314150431.GA7196@bricha3-MOBL.ger.corp.intel.com> In-Reply-To: <20180314150431.GA7196@bricha3-MOBL.ger.corp.intel.com> Accept-Language: en-IE, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTA3MWNlMGMtNGQyNi00N2UyLWI5MWMtYWExMTUzYWVmZjkxIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IjBnT01NQTE0QlZ4bzdqT2tXVm9HRzZybEpKN0VIXC9NSnlcL0dLeVdKcW1xcz0ifQ== x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [163.33.239.180] 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Mar 2018 16:11:18 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson > Sent: Wednesday, March 14, 2018 3:05 PM > To: Jerin Jacob > Cc: Liron Himi ; dev@dpdk.org > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs >=20 > 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 > > > To: "dev@dpdk.org" > > > CC: Liron Himi > > > Subject: [dpdk-dev] Sharing Common libs between PMDs > > > > > > Hi, > > > > > > We have several PMDs in DPDK that are using the same underlying commo= n libraries. > > > In addition, we have plans to add some new common service into DPDK t= hat 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 co= de > > for NXP HW device got moved to drivers/bus/dpaa/. Linux kernel has > > something called "driver/soc", I think, "driver/soc" may be more approp= riate. > > > > Currently DPDK's driver build dependency is in the following order > > (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 co= mmon code > > is in header file > > http://dpdk.org/browse/dpdk/tree/drivers/event/octeontx/Makefile#n13 > > > Given that this seems to be a recurring problem, I think having a > drivers/common folder may not be a bad thing. >=20 > /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 bus are= libs on which other drivers depend. I'm ok with adding a drivers/common instead, but the above seems cleaner.