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 61952A0553 for ; Mon, 17 Feb 2020 18:46:51 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 59A891DA12; Mon, 17 Feb 2020 18:46:51 +0100 (CET) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by dpdk.org (Postfix) with ESMTP id C84A61DAA7 for ; Mon, 17 Feb 2020 18:46:49 +0100 (CET) Received: by mail-wr1-f54.google.com with SMTP id n10so18847416wrm.1 for ; Mon, 17 Feb 2020 09:46:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BkEM0BBgu72h+HP+hPNeHefTQDMPEcdQLwjdY2xQ9ZQ=; b=lV/faFp50FyegeC0AHGotxyqaxB2NLguBtG/kYxvIGykILACBefBDTmhYSII4a/Nqs uf6lBzawdtZDDTeRct4Nut2QIw2CGXBGVn6GN9ORQBiZuYS0jUhtLXBN0KGXFT2eR8NZ o8BcD77TT/ehgNo+/o86f5Y8bt7uVvEfGNv41Lzi7zFiszBI4V84/FKYIVOKwDHHw9v1 sHhETtkjifnB6d+X86PLrYRFKz96/JqezDGUAisYf2DLQK1riRVkmS16dwcVL3yyIdrK DSoxLZdvE010KyIRu5JlVXUeiU9SsuICQI0B/AqbKvEt9fS+nRkucA5nYoQ03sbMtc2U eaBw== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=BkEM0BBgu72h+HP+hPNeHefTQDMPEcdQLwjdY2xQ9ZQ=; b=LO0l9QTyIgFl7nqZfUYdKmA/ISALp8lHN0BC0hawsYSl2oSaMPahMubEDJwkF/6X2U vlC1wKG/zyZK3VFki6+6dEX6SEqP5xN9hK1f7M97Bxk3sf+kr0we4En6j1JeG6/X7kWW FEaOikkOlue6/joxX0deXAKISMpfouxJjcl43uee7zTwr3ELebpREeDbJSRP4KmtE9BB yCXmFvoJP3yw7fbL9Hez0TzctZ9WWXoHJXQenv1KFNyJRfwitMaXyCdX0+Witu8abSCV m5Qz3a/b742JIZtlkxbnwpivwghwS0wVTHG8qWHVokh56MUwqOyv1el5YS2N9y/v5YPO BO/g== X-Gm-Message-State: APjAAAWbaABJaptHqkshlvC8r+pWYRYL+PU3FWVntG+4TXvZ3ocIvAQf ZioqnvpKODKfBmCvlfbNFsVdeVJH5O2e/A== X-Google-Smtp-Source: APXvYqypikeNHqo/4aCi9ryD9YPB2K8qQsrYpatssgOWlm4TgMx/PypbD5NUC1QcM6IQGJBewtut/w== X-Received: by 2002:adf:9dc9:: with SMTP id q9mr22351984wre.286.1581961609542; Mon, 17 Feb 2020 09:46:49 -0800 (PST) Received: from localhost (userh634.uk.uudial.com. [194.69.103.7]) by smtp.gmail.com with ESMTPSA id r3sm1978949wrn.34.2020.02.17.09.46.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2020 09:46:49 -0800 (PST) From: luca.boccassi@gmail.com To: Thomas Monjalon Cc: Bruce Richardson , dpdk stable Date: Mon, 17 Feb 2020 17:45:28 +0000 Message-Id: <20200217174546.25334-36-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200217174546.25334-1-luca.boccassi@gmail.com> References: <20200211112216.3929-190-luca.boccassi@gmail.com> <20200217174546.25334-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx: fix overlinking with meson and glue dlopen' has been queued to stable release 19.11.1 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" Hi, FYI, your patch has been queued to stable release 19.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/19/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Thanks. Luca Boccassi --- >From 3253622dc4630e11207629aba50293049938ec20 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Wed, 12 Feb 2020 23:07:08 +0100 Subject: [PATCH] net/mlx: fix overlinking with meson and glue dlopen [ upstream commit e21492a5175af31ae568fa5fabef1f4b22706962 ] 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 Acked-by: Bruce Richardson --- drivers/net/mlx4/meson.build | 6 ++++-- drivers/net/mlx5/meson.build | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build index 17711f154b..ff7386aee2 100644 --- a/drivers/net/mlx4/meson.build +++ b/drivers/net/mlx4/meson.build @@ -31,7 +31,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 @@ -41,10 +41,12 @@ foreach libname:libnames endforeach if build - if static_ibverbs + if 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 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()) diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build index e21f3d8dc8..dab1b83fd3 100644 --- a/drivers/net/mlx5/meson.build +++ b/drivers/net/mlx5/meson.build @@ -41,10 +41,12 @@ foreach libname:libnames endforeach if build - if static_ibverbs + if 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 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()) -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-02-17 17:00:16.322654671 +0000 +++ 0036-net-mlx-fix-overlinking-with-meson-and-glue-dlopen.patch 2020-02-17 17:00:15.355951135 +0000 @@ -1,8 +1,10 @@ -From e21492a5175af31ae568fa5fabef1f4b22706962 Mon Sep 17 00:00:00 2001 +From 3253622dc4630e11207629aba50293049938ec20 Mon Sep 17 00:00:00 2001 From: Thomas Monjalon Date: Wed, 12 Feb 2020 23:07:08 +0100 Subject: [PATCH] net/mlx: fix overlinking with meson and glue dlopen +[ upstream commit e21492a5175af31ae568fa5fabef1f4b22706962 ] + 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 @@ -18,42 +20,15 @@ Signed-off-by: Thomas Monjalon Acked-by: Bruce Richardson --- - 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 ea98e61fcd..141739fd6f 100644 ---- a/drivers/common/mlx5/meson.build -+++ b/drivers/common/mlx5/meson.build -@@ -29,7 +29,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 - subdir_done() - endif - endforeach --if static_ibverbs -+if 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 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()) + drivers/net/mlx4/meson.build | 6 ++++-- + drivers/net/mlx5/meson.build | 4 +++- + 2 files changed, 7 insertions(+), 3 deletions(-) + diff --git a/drivers/net/mlx4/meson.build b/drivers/net/mlx4/meson.build -index f66e70f4d1..c598745730 100644 +index 17711f154b..ff7386aee2 100644 --- a/drivers/net/mlx4/meson.build +++ b/drivers/net/mlx4/meson.build -@@ -30,7 +30,7 @@ foreach libname:libnames +@@ -31,7 +31,7 @@ foreach libname:libnames endif if lib.found() libs += lib @@ -62,20 +37,38 @@ ext_deps += lib endif else -@@ -39,10 +39,12 @@ foreach libname:libnames - subdir_done() - endif +@@ -41,10 +41,12 @@ foreach libname:libnames + endforeach + + if build +- if static_ibverbs ++ if 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 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()) +diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build +index e21f3d8dc8..dab1b83fd3 100644 +--- a/drivers/net/mlx5/meson.build ++++ b/drivers/net/mlx5/meson.build +@@ -41,10 +41,12 @@ foreach libname:libnames endforeach --if static_ibverbs -+if 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 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()) + + if build +- if static_ibverbs ++ if 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 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()) -- 2.20.1