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 AC004A04B1 for ; Tue, 24 Nov 2020 16:22:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B6AFC934; Tue, 24 Nov 2020 16:22:27 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id ADB41C90E; Tue, 24 Nov 2020 16:22:22 +0100 (CET) IronPort-SDR: 8a9UdNed3yo+NSxivc1aXV1cjOYnpY7vMHmokuF5fhP1Do99eUqyodw0k0rF0ChYX2n5bZGU7l EfKAOIz7S1/A== X-IronPort-AV: E=McAfee;i="6000,8403,9815"; a="236099066" X-IronPort-AV: E=Sophos;i="5.78,366,1599548400"; d="scan'208";a="236099066" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Nov 2020 07:22:21 -0800 IronPort-SDR: zGlkXU/v2AcK46Z0ZoReypsT03O+nFVbdcAz8jhOqUF5lV9f+NXhqkSmC1lXTM4emiqWagGAoO vDK6YxdhcU9w== X-IronPort-AV: E=Sophos;i="5.78,366,1599548400"; d="scan'208";a="361917942" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.6.210]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 24 Nov 2020 07:22:20 -0800 Date: Tue, 24 Nov 2020 15:22:17 +0000 From: Bruce Richardson To: Timothy Redaelli Cc: Anatoly Burakov , dev@dpdk.org, stable@dpdk.org Message-ID: <20201124152217.GA1771@bricha3-MOBL.ger.corp.intel.com> References: <1bbaefeb069a75f57a2f49b4217efa994bed5d4b.1606229937.git.tredaelli@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1bbaefeb069a75f57a2f49b4217efa994bed5d4b.1606229937.git.tredaelli@redhat.com> Subject: Re: [dpdk-stable] [PATCH 1/2] eal: fix shared lib mode detection 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" On Tue, Nov 24, 2020 at 04:14:14PM +0100, Timothy Redaelli wrote: > Commit 06c7871dde01 ("eal: restrict default plugin path to shared lib mode") > introduced a check that enabled shared lib mode when librte_eal.so can > be loaded, but it can't work, at least, on Fedora/CentOS/RHEL since .so > symlinks are not installed when you install dpdk package, but only when > you install dpdk-devel package. > > This commit uses librte_eal.so.ABI_VERSION to check for shared lib, > since it exists on any linux distributions. > > See Fedora Packaging Guidelines for more informations: > https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages > > Fixes: 06c7871dde01 ("eal: restrict default plugin path to shared lib mode") > Cc: bruce.richardson@intel.com > Cc: stable@dpdk.org > Signed-off-by: Timothy Redaelli > --- > lib/librte_eal/common/eal_common_options.c | 3 ++- > lib/librte_eal/common/meson.build | 2 ++ > 2 files changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c > index fc6f0cea93..e6f77ad217 100644 > --- a/lib/librte_eal/common/eal_common_options.c > +++ b/lib/librte_eal/common/eal_common_options.c > @@ -503,7 +503,8 @@ eal_plugins_init(void) > * (Using dlopen with NOLOAD flag on EAL, will return NULL if the EAL > * shared library is not already loaded i.e. it's statically linked.) > */ > - if (dlopen("librte_eal.so", RTLD_LAZY | RTLD_NOLOAD) != NULL && > + if (dlopen("librte_eal.so."ABI_VERSION, RTLD_LAZY | RTLD_NOLOAD) > + != NULL && Since we are not so strict on the 80-char lines, I think I'd keep the != NULL on the original line to improve readability. > *default_solib_dir != '\0' && > stat(default_solib_dir, &sb) == 0 && > S_ISDIR(sb.st_mode)) > diff --git a/lib/librte_eal/common/meson.build b/lib/librte_eal/common/meson.build > index 9f32262450..39abf7a0a4 100644 > --- a/lib/librte_eal/common/meson.build > +++ b/lib/librte_eal/common/meson.build > @@ -3,6 +3,8 @@ > > includes += include_directories('.') > > +cflags += [ '-DABI_VERSION="@0@"'.format(abi_version) ] > + > if is_windows > sources += files( > 'eal_common_bus.c', > -- Acked-by: Bruce Richardson