* [dpdk-dev] [PATCH] common/mlx5: fix link with ibverbs glue dlopen option
@ 2020-07-13 15:37 Thomas Monjalon
2020-07-14 5:02 ` Matan Azrad
2020-07-18 13:34 ` Raslan Darawsheh
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Monjalon @ 2020-07-13 15:37 UTC (permalink / raw)
To: dev; +Cc: rasland, ophirmu, Matan Azrad, Shahaf Shuler, Viacheslav Ovsiienko
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.
Fixes: 79aa430721b1 ("common/mlx5: split common file under Linux directory")
Cc: ophirmu@mellanox.com
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/common/mlx5/mlx5_common.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/common/mlx5/mlx5_common.c b/drivers/common/mlx5/mlx5_common.c
index 693e2c68c8..341239d164 100644
--- a/drivers/common/mlx5/mlx5_common.c
+++ b/drivers/common/mlx5/mlx5_common.c
@@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] common/mlx5: fix link with ibverbs glue dlopen option
2020-07-13 15:37 [dpdk-dev] [PATCH] common/mlx5: fix link with ibverbs glue dlopen option Thomas Monjalon
@ 2020-07-14 5:02 ` Matan Azrad
2020-07-18 13:34 ` Raslan Darawsheh
1 sibling, 0 replies; 3+ messages in thread
From: Matan Azrad @ 2020-07-14 5:02 UTC (permalink / raw)
To: Thomas Monjalon, dev
Cc: Raslan Darawsheh, Ophir Munk, Shahaf Shuler, Slava Ovsiienko
From: Thomas Monjalon
> 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.
>
> Fixes: 79aa430721b1 ("common/mlx5: split common file under Linux
> directory")
> Cc: ophirmu@mellanox.com
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Matan Azrad <matan@mellanox.com>
> ---
> drivers/common/mlx5/mlx5_common.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/common/mlx5/mlx5_common.c
> b/drivers/common/mlx5/mlx5_common.c
> index 693e2c68c8..341239d164 100644
> --- a/drivers/common/mlx5/mlx5_common.c
> +++ b/drivers/common/mlx5/mlx5_common.c
> @@ -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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] common/mlx5: fix link with ibverbs glue dlopen option
2020-07-13 15:37 [dpdk-dev] [PATCH] common/mlx5: fix link with ibverbs glue dlopen option Thomas Monjalon
2020-07-14 5:02 ` Matan Azrad
@ 2020-07-18 13:34 ` Raslan Darawsheh
1 sibling, 0 replies; 3+ messages in thread
From: Raslan Darawsheh @ 2020-07-18 13:34 UTC (permalink / raw)
To: Thomas Monjalon, dev
Cc: Ophir Munk, Matan Azrad, Shahaf Shuler, Slava Ovsiienko
Him
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Monday, July 13, 2020 6:37 PM
> To: dev@dpdk.org
> Cc: Raslan Darawsheh <rasland@mellanox.com>; Ophir Munk
> <ophirmu@mellanox.com>; Matan Azrad <matan@mellanox.com>; Shahaf
> Shuler <shahafs@mellanox.com>; Slava Ovsiienko
> <viacheslavo@mellanox.com>
> Subject: [PATCH] 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.
>
> Fixes: 79aa430721b1 ("common/mlx5: split common file under Linux
> directory")
> Cc: ophirmu@mellanox.com
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> ---
> drivers/common/mlx5/mlx5_common.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/drivers/common/mlx5/mlx5_common.c
> b/drivers/common/mlx5/mlx5_common.c
> index 693e2c68c8..341239d164 100644
> --- a/drivers/common/mlx5/mlx5_common.c
> +++ b/drivers/common/mlx5/mlx5_common.c
> @@ -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
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-18 13:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-13 15:37 [dpdk-dev] [PATCH] common/mlx5: fix link with ibverbs glue dlopen option Thomas Monjalon
2020-07-14 5:02 ` Matan Azrad
2020-07-18 13:34 ` Raslan Darawsheh
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).