DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] net/mlx: fix rdma-core glue path with EAL plugins
@ 2018-03-01 12:43 Adrien Mazarguil
  2018-03-02 14:15 ` [dpdk-dev] [PATCH v2] " Adrien Mazarguil
  0 siblings, 1 reply; 4+ messages in thread
From: Adrien Mazarguil @ 2018-03-01 12:43 UTC (permalink / raw)
  To: Shahaf Shuler; +Cc: dev, stable, Timothy Redaelli

Glue object files are looked up in RTE_EAL_PMD_PATH by default when set and
should be installed in this directory.

During startup, EAL attempts to load them automatically like other plug-ins
found in this directory. While normally harmless, dlopen() fails when
rdma-core is not installed, EAL interprets this as a fatal error and
terminates the application.

This patch requests glue objects to be installed into a sub-directory of
RTE_EAL_PMD_PATH to prevent their automatic loading.

Fixes: f6242d0655cd ("net/mlx: make rdma-core glue path configurable")
Cc: stable@dpdk.org

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Cc: Timothy Redaelli <tredaelli@redhat.com>
---
 doc/guides/nics/mlx4.rst | 7 ++++---
 doc/guides/nics/mlx5.rst | 7 ++++---
 drivers/net/mlx4/mlx4.c  | 3 ++-
 drivers/net/mlx5/mlx5.c  | 3 ++-
 4 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/doc/guides/nics/mlx4.rst b/doc/guides/nics/mlx4.rst
index 98b971667..602a5e257 100644
--- a/doc/guides/nics/mlx4.rst
+++ b/doc/guides/nics/mlx4.rst
@@ -98,9 +98,10 @@ These options can be modified in the ``.config`` file.
   missing with ``ldd(1)``.
 
   It works by moving these dependencies to a purpose-built rdma-core "glue"
-  plug-in, which must either be installed in ``CONFIG_RTE_EAL_PMD_PATH`` if
-  set, or in a standard location for the dynamic linker (e.g. ``/lib``) if
-  left to the default empty string (``""``).
+  plug-in, which must either be installed in the ``glue`` sub-directory of
+  ``CONFIG_RTE_EAL_PMD_PATH`` if set, or in a standard location for the
+  dynamic linker (e.g. ``/lib``) if left to the default empty string
+  (``""``).
 
   This option has no performance impact.
 
diff --git a/doc/guides/nics/mlx5.rst b/doc/guides/nics/mlx5.rst
index 0e6e525c9..ad96d66f2 100644
--- a/doc/guides/nics/mlx5.rst
+++ b/doc/guides/nics/mlx5.rst
@@ -171,9 +171,10 @@ These options can be modified in the ``.config`` file.
   missing with ``ldd(1)``.
 
   It works by moving these dependencies to a purpose-built rdma-core "glue"
-  plug-in, which must either be installed in ``CONFIG_RTE_EAL_PMD_PATH`` if
-  set, or in a standard location for the dynamic linker (e.g. ``/lib``) if
-  left to the default empty string (``""``).
+  plug-in, which must either be installed in the ``glue`` sub-directory of
+  ``CONFIG_RTE_EAL_PMD_PATH`` if set, or in a standard location for the
+  dynamic linker (e.g. ``/lib``) if left to the default empty string
+  (``""``).
 
   This option has no performance impact.
 
diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c
index ee93dafe6..cfa2533ed 100644
--- a/drivers/net/mlx4/mlx4.c
+++ b/drivers/net/mlx4/mlx4.c
@@ -720,7 +720,8 @@ mlx4_glue_init(void)
 		 */
 		(geteuid() == getuid() && getegid() == getgid() ?
 		 getenv("MLX4_GLUE_PATH") : NULL),
-		RTE_EAL_PMD_PATH,
+		/* Use glue sub-directory when RTE_EAL_PMD_PATH is set. */
+		*RTE_EAL_PMD_PATH ? RTE_EAL_PMD_PATH "/glue" : "",
 	};
 	unsigned int i = 0;
 	void *handle = NULL;
diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 61cb93101..22275be80 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1055,7 +1055,8 @@ mlx5_glue_init(void)
 		 */
 		(geteuid() == getuid() && getegid() == getgid() ?
 		 getenv("MLX5_GLUE_PATH") : NULL),
-		RTE_EAL_PMD_PATH,
+		/* Use glue sub-directory when RTE_EAL_PMD_PATH is set. */
+		*RTE_EAL_PMD_PATH ? RTE_EAL_PMD_PATH "/glue" : "",
 	};
 	unsigned int i = 0;
 	void *handle = NULL;
-- 
2.11.0

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-03-12 10:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-01 12:43 [dpdk-dev] [PATCH] net/mlx: fix rdma-core glue path with EAL plugins Adrien Mazarguil
2018-03-02 14:15 ` [dpdk-dev] [PATCH v2] " Adrien Mazarguil
2018-03-02 16:07   ` Timothy Redaelli
2018-03-12 10:05     ` Shahaf Shuler

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).