From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f52.google.com (mail-wm0-f52.google.com [74.125.82.52]) by dpdk.org (Postfix) with ESMTP id 0AB11108F for ; Tue, 24 Jan 2017 18:29:01 +0100 (CET) Received: by mail-wm0-f52.google.com with SMTP id c85so192694327wmi.1 for ; Tue, 24 Jan 2017 09:29:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:user-agent:in-reply-to :references:mime-version:content-transfer-encoding; bh=/5EPC2Fw3PKbwUUPDF91XZbomrWQa369/UuNGAA/bVo=; b=xjpAAEgeHuxerPC/fZH+BQi0tx9Zh6zINyZmfPcru9qZsPamMVDZwzbleTqdgP86o/ 6yzFfF+SKgeZuiwnJZH8OJ1hIbKYww6cb/MCmHh/v+TMoFoL5UE7KzS5oCIGBN7HfYig /O/TY7CR6Lho9h5RlRM6T2ZscFFse0b4/b9rYoLZnnH5FexE3Q2owSMQ0rnx3DQXhvej Vu/LPpsdvPypIs6ktdpH1BdYL/0IvkesLVvYshton+s6J65RJ8vY++UEF/MXe6P67JmP zE/JfTjnNxmp01W9byzQg1dqt812q9lp8qRD0d8fmwOpr3afnjMuSkKAmALHi+s69+2y UkAg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:user-agent :in-reply-to:references:mime-version:content-transfer-encoding; bh=/5EPC2Fw3PKbwUUPDF91XZbomrWQa369/UuNGAA/bVo=; b=S8QkwAz1JBlicG1PHRWNIsBZuRN3P3Ky9DrWl7zhwIs1GAjkoOJ/BjpAO2Bvr3GAz7 TqzZD/+xOmMJ5sVs7Z0LCF7DkSMbSQ8DJzBgjpie8//CO/yFYDHVEY7lbIgGZkqcil5E LzRoUJKCkPPks3VWFozGrh0D12aAxnW3buCp+foIDsU7ho8dr3fgoYzyf/revgYMR2Rv NWqrHqf1y6TwK/p7a8D4D3gWthRTFf6hQAPuicF7I6ceBFRTufu8hbCa2LCPnlPQ+N7N 7nHbQGKfTqCzUYOqYqlVneA3tmma2aKOIIHFb8/eUzajqvN4zOebsfZBt5yzfcks2AoR cLkg== X-Gm-Message-State: AIkVDXKfCCdUpERmp4MpJpWpYFuRxsezLEuw5wKF7HywnvCiVCmBecdKAK6vxtAxmZXp5XQs X-Received: by 10.28.195.70 with SMTP id t67mr19810897wmf.98.1485278940658; Tue, 24 Jan 2017 09:29:00 -0800 (PST) Received: from xps13.localnet (184.203.134.77.rev.sfr.net. [77.134.203.184]) by smtp.gmail.com with ESMTPSA id e16sm21060179wra.36.2017.01.24.09.28.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Jan 2017 09:29:00 -0800 (PST) From: Thomas Monjalon To: Hemant Agrawal Cc: Ferruh Yigit , Shreyansh Jain , dev@dpdk.org, bruce.richardson@intel.com, john.mcnamara@intel.com, jerin.jacob@caviumnetworks.com Date: Tue, 24 Jan 2017 18:28:59 +0100 Message-ID: <20101825.1zhD9dk20U@xps13> User-Agent: KMail/4.14.10 (Linux/4.5.4-1-ARCH; KDE/4.14.11; x86_64; ; ) In-Reply-To: <228ff5e7-2fa8-7731-681d-e4759bff93cb@nxp.com> References: <1484832240-2048-1-git-send-email-hemant.agrawal@nxp.com> <228ff5e7-2fa8-7731-681d-e4759bff93cb@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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: Tue, 24 Jan 2017 17:29:01 -0000 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) += lib/librte_eal > >>>> +DEPDIRS-$(CONFIG_RTE_LIBRTE_DPAA2_POOL) += lib/librte_mempool > >>>> +DEPDIRS-$(CONFIG_RTE_LIBRTE_DPAA2_POOL) += lib/librte_common_dpaa2_qbman > >>> > >>> This dependeny doesn not looks correct, there is no folder like 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 specified as > >> LIB in Makefile. My understanding was that it is expected behavior 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 parallel > >> 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 parallel build > >> fails because of missing libraries which are being parallely compiled. > > > > DEPDIRS-y is mainly to resolve dependencies for compilation order, and > > should point to the folder, > > > > Following line will cause "librte_eal" to be compiled before driver: > > DEPDIRS-$(CONFIG_RTE_LIBRTE_DPAA2_POOL) += lib/librte_eal > > > > So "lib/librte_common_dpaa2_qbman" does not makes more sense, since > > there is no folder like that. > > > > > > Somewhere in the history, with following commit, DEPDIRS-y gained a side > > effect, it has been used to set dynamic linking dependencies, to fix > > underlinking issue: > > bf5a46fa5972 ("mk: generate internal library dependencies") > > > > I guess you are having that line to benefit from this side effect, but > > this can be done with following more properly: > > LDLIBS += lib/librte_common_dpaa2_qbman > > > > > > To resolve the drivers/net to drivers/common dependency, following line > > in this Makefile should work: > > DEPDIRS-$(CONFIG_RTE_LIBRTE_DPAA2_PMD) += drivers/common/dpaa2 > > > > This adds following, which will cause "drivers/common" compiled before > > any "drivers/net": > > LOCAL_DEPDIRS-drivers/net += drivers/common > > Thanks for your suggestion. This is one thing, I am not yet able to fix. > > Based on your suggestions: > e.g. > LDLIBS += -lrte_common_dpaa2_qbman > DEPDIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += drivers/common/dpaa2 > > It does add entry in the ".depdirs" > ./arm64-dpaa2-linuxapp-gcc/.depdirs:168:LOCAL_DEPDIRS-drivers/bus += > drivers/common > ./arm64-dpaa2-linuxapp-gcc/.depdirs:170:LOCAL_DEPDIRS-drivers += lib > ./arm64-dpaa2-linuxapp-gcc/.depdirs:172:LOCAL_DEPDIRS-drivers += lib > ./arm64-dpaa2-linuxapp-gcc/.depdirs:174:LOCAL_DEPDIRS-drivers/pool += > 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 = lib/librte_eal/% lib/librte_compat _DEPDIRS = $(filter-out $(_IGNORE_DIRS),$(DEPDIRS-y)) _LDDIRS = $(subst librte_ether,librte_ethdev,$(_DEPDIRS)) LDLIBS += $(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