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 679BEA051C for ; Tue, 11 Feb 2020 12:35:02 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5E58D1BF81; Tue, 11 Feb 2020 12:35:02 +0100 (CET) Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 5076F1BF7B; Tue, 11 Feb 2020 12:34:59 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id A237A21AF1; Tue, 11 Feb 2020 06:34:58 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Tue, 11 Feb 2020 06:34:58 -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=z0HXfjayTOQvAiTBKzmm1LvxGNbSQxyrAPD7fa1pKcg=; b=dlidOPPzTORg 0WpRQRadtnNmjXvHKxMb6jCUAFL5icPO6NbalVzIo4uIG9Mc+9fwKrHk83gKl9VD crKy+RhdDsxn2h7lz51CVQLZ4u+nziNHMTwPeSNVS67jjhO0Jagq5JXNAb+M2Hcq joUgQqdzxMguP4AG1tbRCJItli2s6hI= 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=fm2; bh=z0HXfjayTOQvAiTBKzmm1LvxGNbSQxyrAPD7fa1pK cg=; b=s+dZCF5/HENTMLzK5GJ4D2hp4ed1730J83zTVkK1KD22/isLVyR5kvKLd H+zyuze32/XvA+U6PTos4t3/GxcFVg8gmM3s6x0jPl1cSG3zvUxrd9e/uHpChMEV vV15C/L7WSDwsZNXlSmsgXl4el1uL83lCY//rPU0owfh7jKv2OiN5gxbhKgLvC+v XBOPs9r55mVVR1OtzonyHCRwKeySgNGel9TyCvmVeKLX5SxgC3IhTV/cMgd47HRQ P5urvqArleEA8oxM97aAUOJoFQCQ2ToAH9Ufp1Bm72uDLBPckd5xrc9D3yttKHv/ GGbA5VUbX1dFs9qGdEy7EjTnWRQRA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedrieefgdeftdcutefuodetggdotefrodftvf 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 71B1A3280059; Tue, 11 Feb 2020 06:34:57 -0500 (EST) From: Thomas Monjalon To: Bruce Richardson Cc: dev@dpdk.org, stable@dpdk.org, Matan Azrad , Shahaf Shuler , Viacheslav Ovsiienko , =?ISO-8859-1?Q?N=E9lio?= Laranjeiro Date: Tue, 11 Feb 2020 12:34:55 +0100 Message-ID: <15505086.0ZKypZ73Fx@xps> In-Reply-To: <20200211113230.GB823@bricha3-MOBL.ger.corp.intel.com> References: <20200127154402.4008069-1-thomas@monjalon.net> <20200211011942.1569573-6-thomas@monjalon.net> <20200211113230.GB823@bricha3-MOBL.ger.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-stable] [PATCH v3 5/5] net/mlx: fix overlinking with meson and glue dlopen X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 11/02/2020 12:32, Bruce Richardson: > On Tue, Feb 11, 2020 at 02:19:42AM +0100, Thomas Monjalon wrote: > > If ibverbs_link is dlopen, the PMD and application should not > > be linked with ibverbs, but the glue library is. > > Unfortunately the ibverbs dependency was exported in the > > variable ext_deps, so there were overlinking. > > > > It is fixed by not exporting the dependency in ext_deps, > > and recreating a limited dependency object for cflags only. > > > > Fixes: 1dd7c7e38c19 ("net/mlx4: support meson build") > > Fixes: 96d7c62a70c7 ("net/mlx5: support meson build") > > Cc: stable@dpdk.org > > > > Signed-off-by: Thomas Monjalon > > --- > > drivers/common/mlx5/meson.build | 6 ++++-- > > drivers/net/mlx4/meson.build | 6 ++++-- > > 2 files changed, 8 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/common/mlx5/meson.build b/drivers/common/mlx5/meson.build > > index 2bb2a83c45..2956fc20e2 100644 > > --- a/drivers/common/mlx5/meson.build > > +++ b/drivers/common/mlx5/meson.build > > @@ -30,7 +30,7 @@ foreach libname:libnames > > endif > > if lib.found() > > libs += lib > > - if not static_ibverbs > > + if not static_ibverbs and not dlopen_ibverbs > > ext_deps += lib > > endif > > else > > @@ -38,10 +38,12 @@ foreach libname:libnames > > reason = 'missing dependency, "' + libname + '"' > > endif > > endforeach > > -if build and static_ibverbs > > +if build and (static_ibverbs or dlopen_ibverbs) > > # Build without adding shared libs to Requires.private > > ibv_cflags = run_command(pkgconf, '--cflags', 'libibverbs').stdout() > > ext_deps += declare_dependency(compile_args: ibv_cflags.split()) > > +endif > > +if build and static_ibverbs > > # Add static deps ldflags to internal apps and Libs.private > > ibv_ldflags = run_command(ldflags_ibverbs_static, check:true).stdout() > > ext_deps += declare_dependency(link_args:ibv_ldflags.split()) > > One small suggestion: > Since out minimum version of meson is 0.47.1, we can use subdir_done() > function. Putting subdir_done() immediately after build=false will simplify > things as you won't need to continually check the build variable in each if > statement. Great, thank you!