> Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] common/mlx5: fix missing
> __rte_internal tags in exported functions
> 
> External email: Use caution opening links or attachments
> 
> 
> On Mon, Apr 12, 2021 at 3:35 PM Ferruh Yigit <ferruh.yi...@intel.com>
> wrote:
> >
> > On 4/12/2021 2:06 PM, Thomas Monjalon wrote:
> > > 12/04/2021 14:59, Ferruh Yigit:
> > >> On 4/12/2021 12:25 PM, Raslan Darawsheh wrote:
> > >>> Hi,
> > >>>
> > >>> From: Tal Shnaiderman <tal...@nvidia.com>
> > >>>>
> > >>> Removed __ from the commit title to fix wrong headline format issue.
> > >>>
> > >>>> Several functions introduced in the addition of the Windows
> > >>>> support to
> > >>>> mlx5 were missing the __rte_internal tag although being exported.
> > >>>>
> > >>>> Fixes: 1552fb287166 ("common/mlx5: add alloc/dealloc PD on
> > >>>> Windows")
> > >>>> Fixes: 1969ee424405 ("common/mlx5: add UMEM reg/dereg
> functions
> > >>>> on
> > >>>> Windows")
> > >>>> Fixes: ba420719823c ("common/mlx5: add reg/dereg MR on
> Windows")
> > >>>> Cc: sta...@dpdk.org
> > >>>>
> > >>>> Signed-off-by: Tal Shnaiderman <tal...@nvidia.com>
> > >>>
> > >>> Patch applied to next-net-mlx,
> > >>>
> > >>
> > >> Can we merge this directly to main repo?
> > >> Since debug build is broken without it.
> > >
> > > Which debug option?
> > > It is broken since when?
> > >
> > >
> >
> > "meson --buildtype=debug build && ninja -C build" is broken [1], I
> > thought that is why this patch is done at first place.
> > Some checks are done now only in the debug mode, since checks are
> > reduced to developer mode [2].
> 
> I don't think [2] has something to do with it.
> 
> The symbols fixed here are inlined.
> In release (and debugoptimized) modes, I can see no trace of them in the .o
> 
> $ nm build/drivers/librte_common_mlx5.a |grep umem_reg
>                  U mlx5dv_devx_umem_reg
> 0000000000000410 t mlx5_glue_devx_umem_reg
> 
> While in debug mode:
> $ nm build.debug/drivers/librte_common_mlx5.a |grep umem_reg
> 00000000000000b9 t mlx5_os_umem_reg
>                  ^^^^^^^^^^^^^^^^^^
>                  U mlx5dv_devx_umem_reg
> 0000000000001578 t mlx5_glue_devx_umem_reg
> 
> 
> The symbol check then catches mlx5_os_umem_reg wrt the version.map
> and complains mlx5_os_umem_reg is not tagged internal.
> 
> 
> --
> David Marchand

Right, the issue was in observed from commit 56ea803e878e ("build: remove 
Windows export symbol list") and this patch fixes it, apologies for not stating 
it in the commit log.

Since rte_common_mlx5_exports.def was merged to version.map several functions 
which needed export only for Windows were brought in, e.g. mlx5_os_umem_reg, in 
Linux it is implemented in the .h file but has a .c implementation on Windows 
so it is needed to be in version.map.

Windows doesn't run symbol check in debug so up until the file merge it wasn't 
caught.

Reply via email to