From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0057.outbound.protection.outlook.com [104.47.0.57]) by dpdk.org (Postfix) with ESMTP id 5CC5C5F69 for ; Thu, 15 Mar 2018 07:58:10 +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=m/jD6ULbIxobmVzp9xQxH7AJtRlFuAJ19fJjB0xQKcE=; b=rSAevdj6W8pVcqCHP+RiZH/DyHoVtK3IdKwN/YJIOAtqJm09GyBjXvWLTuJ7SsaykzUKnCajLVpBSmxIhWH9lWm3iK0WgdtV2VozTcctRlsdFKl8crp7jrYZlM0qc4x0yNvSMVbJqcKZ+BkBm0YdfD60hz1O/tOY4ErRsING+jU= Received: from AM2PR04MB0753.eurprd04.prod.outlook.com (10.160.56.141) by AM2PR04MB0642.eurprd04.prod.outlook.com (10.160.33.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.567.14; Thu, 15 Mar 2018 06:58:08 +0000 Received: from AM2PR04MB0753.eurprd04.prod.outlook.com ([fe80::39b9:124d:74b2:5d6]) by AM2PR04MB0753.eurprd04.prod.outlook.com ([fe80::39b9:124d:74b2:5d6%4]) with mapi id 15.20.0567.018; Thu, 15 Mar 2018 06:58:07 +0000 From: Hemant Agrawal To: "Trahe, Fiona" , Jerin Jacob , Shreyansh Jain CC: "Richardson, Bruce" , Liron Himi , "dev@dpdk.org" , "Jozwiak, TomaszX" Thread-Topic: [dpdk-dev] Sharing Common libs between PMDs Thread-Index: AdO7d0duKkWEAyQgRJGOHuQ0IpF3NAALUBKAAABOYoAAAdBRkAADNLHwAADCrYAAANDR0AAaq9yw Date: Thu, 15 Mar 2018 06:58:07 +0000 Message-ID: References: <20180314145538.GA2482@jerin> <20180314150431.GA7196@bricha3-MOBL.ger.corp.intel.com> <348A99DA5F5B7549AA880327E580B4358934B1C5@IRSMSX101.ger.corp.intel.com> <20180314175000.GA15532@jerin> <348A99DA5F5B7549AA880327E580B4358934B2CF@IRSMSX101.ger.corp.intel.com> In-Reply-To: <348A99DA5F5B7549AA880327E580B4358934B2CF@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=hemant.agrawal@nxp.com; x-originating-ip: [14.142.187.166] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM2PR04MB0642; 7:gUdQ6ceqnhROBqSkS7Ls+HJIt1BFLRtino91dZ/Wv6H+KYlj2E2q11UQwKPrDFMXm+1xbbnRUn3Rz98fMdcnQZ7P1x4C7dTvSxQiJ29FX95bDyfenr6Oi7hHJYPxw91jac8vGvObnxIkmMA1TqVPD8HWJ2oB7lep4QTvaqOQlwwZD7z8s53Bw0a98Tx3L8i9nzvV+BNg6H2Ja0s3Fd0IeNPPhS5Z6Usmxinq6OgFwp0P4fr03kFQMfPbUbTQKz4W x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(346002)(396003)(366004)(39860400002)(376002)(39380400002)(199004)(189003)(13464003)(966005)(74316002)(26005)(86362001)(478600001)(8936002)(102836004)(53546011)(66066001)(7696005)(2900100001)(2906002)(81166006)(110136005)(76176011)(14454004)(186003)(99286004)(8676002)(81156014)(45080400002)(55236004)(7736002)(316002)(229853002)(25786009)(6116002)(305945005)(97736004)(59450400001)(93886005)(53936002)(3660700001)(3280700002)(105586002)(3846002)(68736007)(55016002)(6436002)(6506007)(54906003)(33656002)(106356001)(2950100002)(9686003)(6306002)(4326008)(5660300001)(6246003)(5250100002)(6636002)(21314002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0642; H:AM2PR04MB0753.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: f68bd9b8-64de-44df-a839-08d58a421b9b x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020); SRVR:AM2PR04MB0642; x-ms-traffictypediagnostic: AM2PR04MB0642: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(189930954265078)(45079756050767); 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)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0642; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0642; x-forefront-prvs: 0612E553B4 received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: flGhc3F5MBqWHraRTBVKNjwvn44NYmVbrexHm2Mrin9PApIP9cYRCco+VLaNy662/9QE7x0eYuOtE4dnLRrul5/QGNI3kKqF5WwzRZ3lmOl8iJP5fpeAFN2K0Vu83s+pVKLvX3X2jZacckzVmsHQSlWda5GALMCmGtWaF9W6slelQWa7ZdbiaBIP6/9gBXebAXCLraUtaOejmgi5+DsAWFb6MueyOPJ6dqFmCVZOONFjZSPny7haaObUDS9+njPRtE84MfX8m1mY59PnU6ONmfKP5pHCYs1n2fU+y3wE8Ci+6KqyGykWJRXn3ZCelrf2olQ8JrCQTh4kFxM5JTm98g== 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: f68bd9b8-64de-44df-a839-08d58a421b9b X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Mar 2018 06:58:07.7203 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0642 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: Thu, 15 Mar 2018 06:58:10 -0000 > > > > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs > > > > > -----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%7Cfa7ba7a1dfd94b9336c008 > > > > d589c > > > > > 63dd7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6365664069555 > 06 > > > > 340&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/mempool structure. I agree > > that bus/mempool are not standalone PMDs themselves, but they are not > > libraries 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. > > > > +1 for drivers/common > Ok. > +1 for drivers/common +1 for drivers/common