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 C615AA04B1 for ; Tue, 24 Nov 2020 16:14:39 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7DCEAC910; Tue, 24 Nov 2020 16:14:38 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by dpdk.org (Postfix) with ESMTP id A030EC910 for ; Tue, 24 Nov 2020 16:14:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606230876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5NqEvUQj4Zl3N6ZeiuroElOsI0nIpPoS/L7xrqkox9k=; b=GyNXYfjnLL9zdV/SroR5P9Am+5oa+9a8DEl+JhYfrBzYm12Htxuok4SBZE8NqM+TucQVVb aN2wN/L8lj28m5bNITVeYTZCy5JYJgcPn5otcIL6HEU7DYxCYhxWiC3jAa+MxZdMlZJSfp xyODEvtQyWNLd4I4Li+kFSbFxzvS8YE= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-588-RNG7my1DPgiKpwuqS-Hp9Q-1; Tue, 24 Nov 2020 10:14:34 -0500 X-MC-Unique: RNG7my1DPgiKpwuqS-Hp9Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E68AF81C478; Tue, 24 Nov 2020 15:14:32 +0000 (UTC) Received: from localhost.localdomain (dhcp19-189-130.ntdv.lab.eng.bos.redhat.com [10.19.189.130]) by smtp.corp.redhat.com (Postfix) with ESMTP id B300A60877; Tue, 24 Nov 2020 15:14:31 +0000 (UTC) From: Timothy Redaelli To: Anatoly Burakov Cc: bruce.richardson@intel.com, dev@dpdk.org, stable@dpdk.org Date: Tue, 24 Nov 2020 16:14:15 +0100 Message-Id: <4a04b06b040ac16c45addf92fb43f59b070f185a.1606229937.git.tredaelli@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=tredaelli@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" Subject: [dpdk-stable] [PATCH 2/2] eal: fix loading of shared libs from driver plugin directories 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" Commit 49b536fc3060 ("eal: load only shared libs from driver plugin directories") introduced a check that any shared library must ends with .so, 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 adds also a check for .so.ABI_VERSION to check for shared lib. See Fedora Packaging Guidelines for more informations: https://docs.fedoraproject.org/en-US/packaging-guidelines/#_devel_packages Fixes: 49b536fc3060 ("eal: load only shared libs from driver plugin directories") Cc: bruce.richardson@intel.com Signed-off-by: Timothy Redaelli --- lib/librte_eal/common/eal_common_options.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c index e6f77ad217..e9e2362c53 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c @@ -402,8 +402,10 @@ eal_plugindir_init(const char *path) struct stat sb; int nlen = strnlen(dent->d_name, sizeof(dent->d_name)); - /* check if name ends in .so */ - if (strcmp(&dent->d_name[nlen - 3], ".so") != 0) + /* check if name ends in .so or .so.ABI_VERSION */ + if (strcmp(&dent->d_name[nlen - 3], ".so") != 0 && + strcmp(&dent->d_name[nlen - 4 - strlen(ABI_VERSION)], + ".so."ABI_VERSION) != 0) continue; snprintf(sopath, sizeof(sopath), "%s/%s", path, dent->d_name); -- 2.28.0