From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 3F34CA0535; Tue, 4 Feb 2020 16:14:50 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 99B121C1EA; Tue, 4 Feb 2020 16:14:49 +0100 (CET) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 73AA51C1E2 for ; Tue, 4 Feb 2020 16:14:48 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id C71A121AD0; Tue, 4 Feb 2020 10:14:47 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Tue, 04 Feb 2020 10:14:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=mesmtp; bh=OAOvu5e4UXUkwIGMtg6phHF07dzCiOopjoApk58DqlU=; b=X952MwmNFWjg RnYRNgP6ae3Ep2cSYeNly/0/LfjnrThUQ5bvOpvybARzUc91IbOFNg33lphanz41 S7BLI3bp+ANH8vKUQYyRxg5XQFhqdP24ebuuav5YQecTe7IRRNPA8iOYMU0k/wIR DC4/IeX0WikUQS7wJ9lM+iWNxPUim34= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=OAOvu5e4UXUkwIGMtg6phHF07dzCiOopjoApk58Dq lU=; b=VDz7PxAjs3KT7dGxVEe+Lj1WkhNr72nJenNrsH8JhTFzn8Tbbb8w6xREk 3Mm937M+Xlgt/qXrE2By0fYQotXQwh8qfm/+kF2KdvflxV5dFkBMKV6xEB1cpnVZ hYVuGPTGyYIb21/f58u+xsJO1JJawLtSdR7S2EWDNvInI4pH/C/COI54loUADcUo q4W5dR1EneOZUbfHSC+bEQdlDIq6bkqLtcdo5/hc/4yxZ3UwVEJ0A5ym/7jB/ifG /Ee1Rvx/yHDo9HuUW+rFWyZ/dZkmpw+dR0nvYa8s3ezpz9vWPV1NJJHJBbj1BmG/ W9Nt4LOWLTJxQ77T4nCuggdEXJ/6w== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrgeelgdejvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucfkph epjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghr rghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4058330606E9; Tue, 4 Feb 2020 10:14:47 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org Date: Tue, 04 Feb 2020 16:14:46 +0100 Message-ID: <12448434.uLZWGnKmhe@xps> In-Reply-To: <20200204143314.GA679@bricha3-MOBL.ger.corp.intel.com> References: <20200116071656.1663967-1-thomas@monjalon.net> <5323608.DvuYhMxLoT@xps> <20200204143314.GA679@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2 0/4] add static ibverbs in meson 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 04/02/2020 15:33, Bruce Richardson: > On Tue, Feb 04, 2020 at 03:27:50PM +0100, Thomas Monjalon wrote: > > 04/02/2020 12:48, Bruce Richardson: > > > as we discussed offline, I really don't like the necessity of the > > > hidden_deps part of this, so I've tried coming up with some other > > > solutions. > > > > Thanks for looking closely at these patches. > > > > > For example, in my testing I get the same result with the > > > following diff instead of the second two patches (just showing for mlx5 - > > > changes for mlx4 are identical): > > [...] > > > - # Build without adding shared libs to Requires.private > > > - hidden_deps += lib.partial_dependency(compile_args:true) > > [...] > > > + ibv_cflags = run_command(find_program('pkg-config'), '--cflags', 'libibverbs').stdout() > > [...] > > > By doing things this way - assuming it works in your tests too - we avoid > > > any need to change anything in the common drivers code. > > > > Yes, you hide the dependency by getting cflags directly with pkg-config. > > I wanted to avoid such solution because I was trying to use as much > > as possible the meson infrastructure. > > > > I think your solution relying on one more call to pkg-config is acceptable. > > I will test it and will review whether we get all corner cases. > > > > Thanks. > It's not really ideal, but this is likely always going to be a bit flakey > since we can't use distro-supplied .a files, and your scripting is needed > to prevent even accidentally taking a non-custom-build rdma-core file. > Furthermore, I see that while meson tracks PKG_CONFIG_PATH value itself for > finding things, this does not get tracked between runs for shell calls. > This can catch one out, for example: > > PKG_CONFIG_PATH=/path/to/pc/files meson build > > will work correctly for everything. However, if one does a reconfigure > subsequently doing e.g. ninja reconfigure, meson will correctly pick up the > .pc files, but the ibverbs-static script, or any run_command calls to > pkg-config won't as it's not actually in the environment :-( In my setup, I export PKG_CONFIG_PATH, so it is not an issue. But I understand your point that we may hit the issue. That's why I will work in meson upstream to avoid all of this in future. > > In the meantime I discovered we are overlinking with meson > > when using the dlopen linking option. > > I will try to fix it as well with the same method. > > > Right. Overlinking is probably less serious an issue though. Does it cause > any real-world problems? Overlinking defeats the benefit of dlopen. The idea of dlopen is to avoid having ibverbs as mandatory DPDK dependency. The ibverbs lib is loaded with dlopen only if probing a Mellanox device. The dlopen solution makes the PMD really like an optional plugin, same as for static linkage in the PMD.