From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR03-DB5-obe.outbound.protection.outlook.com (mail-eopbgr40044.outbound.protection.outlook.com [40.107.4.44]) by dpdk.org (Postfix) with ESMTP id 4FBD1DE5 for ; Thu, 26 Jan 2017 13:05:30 +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=TAmj6mlUOomejn/jFhWlfwzVwalDW95Ri8ihi+eLuA4=; b=RdEzVTMZD4Hz8ZSZO8rJCK424qsuT6jrrFbZkq+zvZAljGSbEQ0yze2Q4weNXZnyWCPMYYal0ddv2jo0fE7Bhy8T28id+3KTxZ0aCkMByW4Va1KdGlC1PY7bcthXBRXpO3IGll/d8Jq6PSr0B2qEmKmFd7uD8LHJ9n61OMMJbh4= Received: from DB5PR0401MB2054.eurprd04.prod.outlook.com (10.166.11.137) by DB5PR04MB1608.eurprd04.prod.outlook.com (10.164.38.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.860.13; Thu, 26 Jan 2017 12:05:29 +0000 Received: from DB5PR0401MB2054.eurprd04.prod.outlook.com ([10.166.11.137]) by DB5PR0401MB2054.eurprd04.prod.outlook.com ([10.166.11.137]) with mapi id 15.01.0860.021; Thu, 26 Jan 2017 12:05:28 +0000 From: Shreyansh Jain To: Neil Horman CC: Thomas Monjalon , Hemant Agrawal , Ferruh Yigit , "dev@dpdk.org" , "bruce.richardson@intel.com" , "john.mcnamara@intel.com" , "jerin.jacob@caviumnetworks.com" Thread-Topic: [dpdk-dev] [PATCHv6 16/33] drivers/pool/dpaa2: adding hw offloaded mempool Thread-Index: AQHSdXBkONloxmme/UKrk8xEErALDaFGUvMAgAEhNIiAAD+ggIAAMAmAgAE89ACAABKSYIAAGzAAgAFecPA= Date: Thu, 26 Jan 2017 12:05:04 +0000 Deferred-Delivery: Thu, 26 Jan 2017 12:04:48 +0000 Message-ID: References: <1484832240-2048-1-git-send-email-hemant.agrawal@nxp.com> <228ff5e7-2fa8-7731-681d-e4759bff93cb@nxp.com> <20101825.1zhD9dk20U@xps13> <20170125122324.GA4611@hmswarspite.think-freely.org> <20170125150710.GA8488@neilslaptop.think-freely.org> In-Reply-To: <20170125150710.GA8488@neilslaptop.think-freely.org> 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.201.25] x-microsoft-exchange-diagnostics: 1; DB5PR04MB1608; 7:LJnOxHFV0V4ubZZMj7Ov2yBcpyFW5al9ht/wSoVxe5ctPJu56cE1IMbWwWrbbpNeGaW4ZV6tF5EjWHlIiyBP2Hp/7j9eVOM7rx1VmxtTm4UA6Lxu8UzXWBLi6fZyMJ01o5ARZmfE6SKasva8zifnJRy0Vcq1RBZczoGWbepaUkAfriBS/IVJjkdaMlYGE7pVAA1POPBuXiixzkMSjQ020IN8EkZQnYuMe73dQC7VgkctA8lMg/bTr8BQ42D8Iz8IDbWW6KS2RQuAcNlBi74IHKoJUkABQtJTLDK5HC3vHbscdJcslGeu1syQAoLnZ4GOcYfTt0HUaPPO3V8iQtoF6eVx10n+/Zbg4Fip3z7q3NQpqOJiXO+5YKuDGEVE3xp6+2QxR6p+2HGs8jip/XW5cbWdNVIDXe8XQdPto07FrffLexp5RnuYU88GYY1eyB7bzeEZ21WX23FDNmU8lhqRxQ== x-forefront-antispam-report: SFV:SKI; SCL:-1SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39860400002)(39410400002)(39450400003)(39840400002)(39850400002)(189002)(13464003)(24454002)(199003)(377424004)(377454003)(229853002)(6506006)(66066001)(86362001)(189998001)(50986999)(6436002)(76176999)(54356999)(25786008)(54906002)(101416001)(4326007)(7696004)(105586002)(3846002)(106116001)(106356001)(6116002)(305945005)(102836003)(7736002)(38730400001)(74316002)(33656002)(97736004)(77096006)(55016002)(5660300001)(122556002)(2906002)(99286003)(93886004)(3660700001)(6666003)(9686003)(8936002)(110136003)(6916009)(68736007)(92566002)(53936002)(81166006)(81156014)(2950100002)(2900100001)(8676002)(3280700002); DIR:OUT; SFP:1101; SCL:1; SRVR:DB5PR04MB1608; H:DB5PR0401MB2054.eurprd04.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; x-ms-office365-filtering-correlation-id: a440b363-0379-403d-21bb-08d445e39ec0 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:DB5PR04MB1608; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(185117386973197)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(6072148)(6047074); SRVR:DB5PR04MB1608; BCL:0; PCL:0; RULEID:; SRVR:DB5PR04MB1608; x-forefront-prvs: 019919A9E4 received-spf: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) 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-originalarrivaltime: 26 Jan 2017 12:05:28.6924 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB5PR04MB1608 Subject: Re: [dpdk-dev] [PATCHv6 16/33] drivers/pool/dpaa2: adding hw offloaded mempool 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, 26 Jan 2017 12:05:31 -0000 Hello Neil, > -----Original Message----- > From: Neil Horman [mailto:nhorman@tuxdriver.com] > Sent: Wednesday, January 25, 2017 8:37 PM > To: Shreyansh Jain > Cc: Thomas Monjalon ; Hemant Agrawal > ; Ferruh Yigit ; > dev@dpdk.org; bruce.richardson@intel.com; john.mcnamara@intel.com; > jerin.jacob@caviumnetworks.com > Subject: Re: [dpdk-dev] [PATCHv6 16/33] drivers/pool/dpaa2: adding hw > offloaded mempool >=20 > On Wed, Jan 25, 2017 at 01:34:47PM +0000, Shreyansh Jain wrote: > > > > > > > -----Original Message----- > > > From: Neil Horman [mailto:nhorman@tuxdriver.com] > > > Sent: Wednesday, January 25, 2017 5:53 PM > > > To: Thomas Monjalon > > > Cc: Hemant Agrawal ; Ferruh Yigit > > > ; Shreyansh Jain ; > > > dev@dpdk.org; bruce.richardson@intel.com; john.mcnamara@intel.com; > > > jerin.jacob@caviumnetworks.com > > > Subject: Re: [dpdk-dev] [PATCHv6 16/33] drivers/pool/dpaa2: adding hw > > > offloaded mempool > > > > > > On Tue, Jan 24, 2017 at 06:28:59PM +0100, Thomas Monjalon wrote: > > > > 2017-01-24 20:07, Hemant Agrawal: > > > > > On 1/24/2017 4:19 PM, Ferruh Yigit wrote: > > > > > > On 1/24/2017 9:12 AM, Shreyansh Jain wrote: > > > > > >> On Monday 23 January 2017 11:04 PM, Ferruh Yigit wrote: > > > > > >>> On 1/23/2017 11:59 AM, Hemant Agrawal wrote: > > > > > >>>> +# library dependencies > > > > > >>>> +DEPDIRS-$(CONFIG_RTE_LIBRTE_DPAA2_POOL) +=3D lib/librte_eal > > > > > >>>> +DEPDIRS-$(CONFIG_RTE_LIBRTE_DPAA2_POOL) +=3D lib/librte_mem= pool > > > > > >>>> +DEPDIRS-$(CONFIG_RTE_LIBRTE_DPAA2_POOL) +=3D > > > lib/librte_common_dpaa2_qbman > > > > > >>> > > > > > >>> This dependeny doesn not looks correct, there is no folder li= ke > that. > > > > > >> > > > > > >> This is something even I need to understand. From the DEPDIRS = what > I > > > > > >> understood was that though it refers to a directory, it > essentially > > > > > >> links libraries in build/lib/*. > > > > > >> > > > > > >> Further, somehow the development is deploying drivers/bus, > > > > > >> drivers/common and drivers/pool in lib/* under the name specif= ied > as > > > > > >> LIB in Makefile. My understanding was that it is expected beha= vior > and > > > > > >> not special because of drivers folder. > > > > > >> > > > > > >> Thus, above line only links lib/librte_common_dpaa2_qbman > generated by > > > > > >> drivers/common/dpaa2/qbman code. > > > > > >> > > > > > >> In fact, I think, this might also one of the issues why a para= llel > > > > > >> shared build fails for DPAA2 PMD (added in Cover letter). > > > > > >> The dependency graph cannot create a graph for drivers/common > > > > > >> as dependency for drivers/net or drivers/bus and hence paralle= l > build > > > > > >> fails because of missing libraries which are being parallely > compiled. > > > > > > > > > > > > DEPDIRS-y is mainly to resolve dependencies for compilation ord= er, > and > > > > > > should point to the folder, > > > > > > > > > > > > Following line will cause "librte_eal" to be compiled before > driver: > > > > > > DEPDIRS-$(CONFIG_RTE_LIBRTE_DPAA2_POOL) +=3D lib/librte_eal > > > > > > > > > > > > So "lib/librte_common_dpaa2_qbman" does not makes more sense, s= ince > > > > > > there is no folder like that. > > > > > > > > > > > > > > > > > > Somewhere in the history, with following commit, DEPDIRS-y gain= ed a > > > side > > > > > > effect, it has been used to set dynamic linking dependencies, t= o > fix > > > > > > underlinking issue: > > > > > > bf5a46fa5972 ("mk: generate internal library dependencies") > > > > > > > > > > > > I guess you are having that line to benefit from this side effe= ct, > but > > > > > > this can be done with following more properly: > > > > > > LDLIBS +=3D lib/librte_common_dpaa2_qbman > > > > > > > > > > > > > > > > > > To resolve the drivers/net to drivers/common dependency, follow= ing > line > > > > > > in this Makefile should work: > > > > > > DEPDIRS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) +=3D drivers/common/dpaa= 2 > > > > > > > > > > > > This adds following, which will cause "drivers/common" compiled > before > > > > > > any "drivers/net": > > > > > > LOCAL_DEPDIRS-drivers/net +=3D drivers/common > > > > > > > > > > Thanks for your suggestion. This is one thing, I am not yet able = to > fix. > > > > > > > > > > Based on your suggestions: > > > > > e.g. > > > > > LDLIBS +=3D -lrte_common_dpaa2_qbman > > > > > DEPDIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) +=3D drivers/common/dpaa2 > > > > > > > > > > It does add entry in the ".depdirs" > > > > > ./arm64-dpaa2-linuxapp-gcc/.depdirs:168:LOCAL_DEPDIRS-drivers/bus= +=3D > > > > > drivers/common > > > > > ./arm64-dpaa2-linuxapp-gcc/.depdirs:170:LOCAL_DEPDIRS-drivers += =3D lib > > > > > ./arm64-dpaa2-linuxapp-gcc/.depdirs:172:LOCAL_DEPDIRS-drivers += =3D lib > > > > > ./arm64-dpaa2-linuxapp-gcc/.depdirs:174:LOCAL_DEPDIRS-drivers/poo= l +=3D > > > > > drivers/common > > > > > > > > > > However, we keep on getting: > > > > > LD librte_bus_fslmc.so.1.1 > > > > > aarch64-linux-gnu-gcc: error: drivers/common/dpaa2: No such file = or > > > > > directory > > > > > make[6]: *** [librte_bus_fslmc.so.1.1] Error 1 > > > > > > > > Probably because of: > > > > > > > > # Translate DEPDIRS-y into LDLIBS > > > > # Ignore (sub)directory dependencies which do not provide an actual > library > > > > _IGNORE_DIRS =3D lib/librte_eal/% lib/librte_compat > > > > _DEPDIRS =3D $(filter-out $(_IGNORE_DIRS),$(DEPDIRS-y)) > > > > _LDDIRS =3D $(subst librte_ether,librte_ethdev,$(_DEPDIRS)) > > > > LDLIBS +=3D $(subst lib/lib,-l,$(_LDDIRS)) > > > > > > > > It shows one important thing: qbman is not a driver, it is a lib. > > > > So drivers/common/dpaa2 should be handled differently. > > > > > > > > Solution 1: tweak mk/rte.lib.mk for directories in drivers/common/ > > > > Solution 2: host your bus libs outside of DPDK > > > Please do not go with suggestion two, the more libraries get hosted > outside > > > of > > > the project, the less likely any sort of test/build/ongoing maintenen= ce > from > > > the > > > community can be expected. If you're going to go with solution (2), = then > you > > > may as well host the entire PMD outside of the DPDK project, and that= s > more > > > undesireable. > > > > Agree with you. Hosting a part of PMD (or PMD itself) outside of DPDK i= s > not > > a preferred way for me as well. Besides being non-user-friendly, this h= as > > obvious disadvantage of a fragmented software which will quickly become > > difficult to manage/maintain. > > > > But, renaming so many variables also is not an easy choice (assuming > > that the suggestion from you for MAP_STATIC_SYMBOL is not in place - st= ill > > investigating on that). > I'm not sure what you mean by this, MAP_STATIC_SYMBOL is an available mac= ro > in > dpdk already, and you can ifndef...define...endif it to a no-op so that y= ou > can > keep the usage outside of dpdk. =20 I only meant that as of writing the last mail I haven't had yet investigate= d/ tried that way. That is all. I am not doubting this method (at least not until I try and reach some roadblock). >=20 > Neil >=20 > > Merging everything together has already been ruled out in initial RFC > > Discussions. > > > > > > > > Neil > > > > > > > > >