From: Timothy Redaelli <tredaelli@redhat.com>
To: Anatoly Burakov <anatoly.burakov@intel.com>
Cc: bruce.richardson@intel.com, dev@dpdk.org, stable@dpdk.org
Subject: [dpdk-stable] [PATCH 2/2] eal: fix loading of shared libs from driver plugin directories
Date: Tue, 24 Nov 2020 16:14:15 +0100 [thread overview]
Message-ID: <4a04b06b040ac16c45addf92fb43f59b070f185a.1606229937.git.tredaelli@redhat.com> (raw)
In-Reply-To: <cover.1606229937.git.tredaelli@redhat.com>
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 <tredaelli@redhat.com>
---
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
next prev parent reply other threads:[~2020-11-24 15:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-24 15:13 [dpdk-stable] [PATCH 0/2] Fix shared lib detection on Fedora/CentOS/RHEL Timothy Redaelli
2020-11-24 15:13 ` [dpdk-stable] [PATCH 1/2] eal: fix shared lib mode detection Timothy Redaelli
2020-11-24 15:14 ` Timothy Redaelli
2020-11-24 15:22 ` Bruce Richardson
2020-11-25 9:10 ` David Marchand
2020-11-24 15:14 ` [dpdk-stable] [PATCH 0/2] Fix shared lib detection on Fedora/CentOS/RHEL Timothy Redaelli
2020-11-24 15:14 ` Timothy Redaelli [this message]
2020-11-24 15:22 ` [dpdk-stable] [PATCH 2/2] eal: fix loading of shared libs from driver plugin directories Bruce Richardson
2020-11-25 10:01 ` David Marchand
2020-11-25 11:05 ` Ferruh Yigit
2020-11-25 10:57 ` [dpdk-stable] [dpdk-dev] [PATCH 0/2] Fix shared lib detection on Fedora/CentOS/RHEL Maxime Coquelin
2020-11-25 15:56 ` [dpdk-stable] " Ali Alnubani
2020-11-25 15:59 ` [dpdk-stable] [dpdk-dev] " Ali Alnubani
2020-11-25 22:54 ` [dpdk-stable] " Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4a04b06b040ac16c45addf92fb43f59b070f185a.1606229937.git.tredaelli@redhat.com \
--to=tredaelli@redhat.com \
--cc=anatoly.burakov@intel.com \
--cc=bruce.richardson@intel.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).