[dpdk-stable] [PATCH 19.11] net/mlx5: fix build with separate glue lib for dlopen

Luca Boccassi bluca at debian.org
Mon Jun 8 09:59:09 CEST 2020


On Sat, 2020-06-06 at 12:08 +0200, Thomas Monjalon wrote:
> If building with option RTE_IBVERBS_LINK_DLOPEN (make)
> or ibverbs_link=dlopen (meson), the glue is a separate library
> which can be dlopen.
> In such case, the object mlx5_glue must be allocated in two places:
> one in the glue, and one outside of the glue to be assigned when
> loading the glue with dlopen/dlsym.
> 
> When backporting the allocation split for gcc 10, both allocations
> were made inside the glue. As a consequence, the symbol is undefined
> outside of the glue:
> 	drivers/net/mlx5/mlx5.c: undefined reference to 'mlx5_glue'
> 
> The second allocation is restored outside of the glue, in mlx5.c.
> 
> Fixes: b3e01cd3e46f ("common/mlx5: fix build with -fno-common")
> 
> Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
> ---
>  drivers/net/mlx5/mlx5.c      | 4 ++++
>  drivers/net/mlx5/mlx5_glue.c | 4 ----
>  2 files changed, 4 insertions(+), 4 deletions(-)

Acked-by: Luca Boccassi <bluca at debian.org>

Thanks for the fix, applied

-- 
Kind regards,
Luca Boccassi


More information about the stable mailing list