common/mlx5: fix link with ibverbs glue dlopen option
PATCH 1/1 common/mlx5: fix link with ibverbs glue dlopen option
In case the ibverbs glue is a separate library to dlopen, the PMD library must allocate a glue structure to be filled by dlopen.
The glue management was in mlx5_common.c and moved to mlx5_common_os.c, but the variable allocation was not removed from the original file. The consequence was a link failure, if ibverbs dlopen option is enabled, because of the redefinition of the variable (with GCC 10):
multiple definition of 'mlx5_glue'
The original definition is removed to keep only the one moved in the Linux sub-directory.
--- drivers/common/mlx5/mlx5_common.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/common/mlx5/mlx5_common.c +0 -4
@@ -16,10 +16,6 @@int mlx5_common_logtype; -#ifdef MLX5_GLUE -const struct mlx5_glue *mlx5_glue; -#endif -uint8_t haswell_broadwell_cpu; static int
Signature · 1 line
2.27.0
From: Thomas Monjalon
Quoted 10 lines
In case the ibverbs glue is a separate library to dlopen, the PMD library must allocate a glue structure to be filled by dlopen.
The glue management was in
mlx5_common.cand moved tomlx5_common_os.c, but the variable allocation was not removed from the original file.
The consequence was a link failure, if ibverbs dlopen option is enabled, because of the redefinition of the variable (with GCC 10):
multiple definition of 'mlx5_glue'
Quoted 8 lines
The original definition is removed to keep only the one moved in the Linux sub-directory.
Fixes 79aa430721b1 ("common/mlx5: split common file under Linuxdirectory")
Cc: [email protected]Signed-off-by Thomas Monjalon <[email protected]>
Quoted 22 lines
--- drivers/common/mlx5/mlx5_common.c | 4 ---- 1 file changed, 4 deletions(-)drivers/common/mlx5/mlx5_common.c +0
-5@@ -16,10 +16,6 @@int mlx5_common_logtype; -#ifdef MLX5_GLUE -const struct mlx5_glue *mlx5_glue; -#endif -uint8_t haswell_broadwell_cpu; static int --2.27.0
Him
Quoted 49 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Monday, July 13, 2020 6:37 PM
To: [email protected]
Cc: Raslan Darawsheh <[email protected]>; Ophir Munk <[email protected]>; Matan Azrad <[email protected]>; Shahaf Shuler <[email protected]>; Slava Ovsiienko <[email protected]>
Subject: [PATCH] common/mlx5: fix link with ibverbs glue dlopen optionIn case the ibverbs glue is a separate library to dlopen, the PMD library must allocate a glue structure to be filled by dlopen.
The glue management was in
mlx5_common.cand moved tomlx5_common_os.c,
but the variable allocation was not removed from the original file. The consequence was a link failure, if ibverbs dlopen option is enabled, because of the redefinition of the variable (with GCC 10):
multiple definition of 'mlx5_glue'The original definition is removed to keep only the one moved in the Linux sub-directory.
Fixes 79aa430721b1 ("common/mlx5: split common file under Linuxdirectory")
Cc: [email protected]Signed-off-by Thomas Monjalon <[email protected]>--- drivers/common/mlx5/mlx5_common.c | 4 ---- 1 file changed, 4 deletions(-)drivers/common/mlx5/mlx5_common.c +0
-5@@ -16,10 +16,6 @@int mlx5_common_logtype; -#ifdef MLX5_GLUE -const struct mlx5_glue *mlx5_glue; -#endif -uint8_t haswell_broadwell_cpu; static int --
Quoted 1 line
2.27.0
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh