From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0077.outbound.protection.outlook.com [104.47.0.77]) by dpdk.org (Postfix) with ESMTP id 30DBC8DF0 for ; Wed, 14 Mar 2018 18:38:20 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=YGlSJnkIhOllGKblJjAQRHImiA0VKbk6hHZ3NWWQd3E=; b=HD7r1pV8sa+onG1MDXw5TYUuekQGraM69sKQFTW8Q7Iyx2lRPeWHosEWsqivMnZMsl4T92JqCe9q+kEebxtB6yNOsMAvNpcplEwSqtYCkY8KmfhOsB5Kds5qVdJVjYYMIl/JxWKZxFOL+1jnGEd9SF8MAGez/QcunNNqloFEyw8= Received: from HE1PR0402MB2780.eurprd04.prod.outlook.com (10.175.29.14) by HE1PR0402MB3529.eurprd04.prod.outlook.com (10.167.126.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.548.13; Wed, 14 Mar 2018 17:38:18 +0000 Received: from HE1PR0402MB2780.eurprd04.prod.outlook.com ([fe80::80e4:217f:be76:bd52]) by HE1PR0402MB2780.eurprd04.prod.outlook.com ([fe80::80e4:217f:be76:bd52%14]) with mapi id 15.20.0588.013; Wed, 14 Mar 2018 17:38:18 +0000 From: Shreyansh Jain To: "Trahe, Fiona" , "Richardson, Bruce" , Jerin Jacob CC: Liron Himi , "dev@dpdk.org" , "Jozwiak, TomaszX" Thread-Topic: [dpdk-dev] Sharing Common libs between PMDs Thread-Index: AdO7d0duKkWEAyQgRJGOHuQ0IpF3NAALUBKAAABOYoAAAdBRkAADNLHw Date: Wed, 14 Mar 2018 17:38:14 +0000 Deferred-Delivery: Wed, 14 Mar 2018 17:37:36 +0000 Message-ID: References: <20180314145538.GA2482@jerin> <20180314150431.GA7196@bricha3-MOBL.ger.corp.intel.com> <348A99DA5F5B7549AA880327E580B4358934B1C5@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B4358934B1C5@IRSMSX101.ger.corp.intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; x-originating-ip: [122.177.178.2] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; HE1PR0402MB3529; 7:iQZMdKD6DTYTL0pJOyVya0+NIapEgxF2+ScYZY3bb2CzJVXkl4nDzkns13CedJMF91uREu4MB5bfj/QkVFDjZIe0b6d057O+3iAC3bGKlNC8MwgLmTw9Ui4UU37IqemsfUq+zceivmh8fP9fQZX5V1jrDuGidK86wNhRheWwhBy7C722x0KB2vU5nP17+6rBp9W2pKw4f2FR3qOV3V/zF/ewLF1BCcoUfuRBnkLajbU48CFADuIC0uV8lc5XeadP x-ms-exchange-antispam-srfa-diagnostics: SSOS; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: ee0067a2-ee5e-4fc9-3234-08d589d25f70 x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:HE1PR0402MB3529; x-ms-traffictypediagnostic: HE1PR0402MB3529: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(189930954265078)(45079756050767)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(5005006)(8121501046)(3231221)(944501244)(52105095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041310)(20161123558120)(20161123562045)(20161123564045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:HE1PR0402MB3529; BCL:0; PCL:0; RULEID:; SRVR:HE1PR0402MB3529; x-forefront-prvs: 0611A21987 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(39860400002)(346002)(366004)(39380400002)(396003)(376002)(199004)(189003)(13464003)(9686003)(229853002)(7696005)(6306002)(33656002)(2906002)(8936002)(966005)(6436002)(6246003)(76176011)(53936002)(106356001)(55016002)(93886005)(4326008)(97736004)(14454004)(66066001)(68736007)(102836004)(6506007)(2900100001)(53546011)(7736002)(55236004)(105586002)(305945005)(74316002)(81156014)(81166006)(2950100002)(3846002)(99286004)(6666003)(54906003)(3280700002)(6116002)(45080400002)(110136005)(478600001)(25786009)(186003)(26005)(3660700001)(86362001)(59450400001)(8676002)(5250100002)(316002)(5660300001)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:HE1PR0402MB3529; H:HE1PR0402MB2780.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: L4ZLRPRCMXrxm5vPXevNtKrziB1HJ62enEfoLHPsomC0gaqZFPTNvKfdvhf9CRKkNfVTBWlCV83zpic8BkGVRnLvf9sx1f1RKX6hhkCO6py3K3WBQdh3TLXxrVVuEahDsio1Eca7mXoOuwqnQRjWGs/Glm68zH+n5J7MJ4YU3g2i7+2d8HDJ8qjZiPUPJkcqowUEA+t11KPpSs52Lbl4wd51ntu4hOJAaLEkNq66fA1el/QrpMGRbp7fmyrDfarnRlfdpvCfXMc0SHwhp5p2QNvAZ9wz8t9PXsPDiF6pwBnqo/EXfw03FRqVCkfbHk48pT7AMmGxjec+0ZbxzAfIpA== spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee0067a2-ee5e-4fc9-3234-08d589d25f70 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Mar 2018 17:38:17.8712 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR0402MB3529 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 17:38:20 -0000 > -----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 ; Jerin Jacob > > Cc: Liron Himi ; dev@dpdk.org; Trahe, Fiona > ; Jozwiak, TomaszX > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs >=20 >=20 >=20 > > -----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 > > > > 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 > 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 has > > > something called "driver/soc", I think, "driver/soc" may be more > appropriate. > > > > > > 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 common code > > > is in header file > > > > https://emea01.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2Fdpdk. > org%2Fbrowse%2Fdpdk%2Ftree%2Fdrivers%2Fevent%2Focteontx%2FMakefile%23n1 > 3&data=3D02%7C01%7Cshreyansh.jain%40nxp.com%7Cfa7ba7a1dfd94b9336c008d589c > 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 bus > 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 bus/me= mpool structure. I agree that bus/mempool are not standalone PMDs themselve= s, but they are not libraries either in true sense - they /plug/ into the e= al framework and *may* provide service to drivers.=20 As for common/ - that gets a +1 from me.