common/mlx5: fix missing __rte_internal tags in exported functions
PATCH 1/1 common/mlx5: fix missing __rte_internal tags in exported functions
Several functions introduced in the addition of the Windows support to mlx5 were missing the __rte_internal tag although being exported.
--- drivers/common/mlx5/linux/mlx5_common_os.h | 4 ++++ drivers/common/mlx5/windows/mlx5_common_os.h | 6 ++++++ 2 files changed, 10 insertions(+)
drivers/common/mlx5/linux/mlx5_common_os.h +4 -0
@@ -203,24 +203,28 @@ mlx5_os_get_devx_uar_page_id(void *uar)#endif } +__rte_internal static inline void *mlx5_os_alloc_pd (void *ctx) {return mlx5_glue->alloc_pd (ctx); } +__rte_internal static inline intmlx5_os_dealloc_pd (void *pd) {return mlx5_glue->dealloc_pd (pd); } +__rte_internal static inline void *mlx5_os_umem_reg (void *ctx,void *addr,size_t size,uint32_t access) {return mlx5_glue->devx_umem_reg (ctx, addr, size, access); } +__rte_internal static inline intmlx5_os_umem_dereg (void *pumem) {
drivers/common/mlx5/windows/mlx5_common_os.h +6 -0
@@ -248,11 +248,17 @@ mlx5_os_devx_subscribe_devx_event(void *eventc,return -ENOTSUP ; } +__rte_internal void *mlx5_os_alloc_pd(void *ctx); +__rte_internal int mlx5_os_dealloc_pd(void *pd); +__rte_internal void *mlx5_os_umem_reg(void *ctx, void *addr, size_t size, uint32_t access); +__rte_internal int mlx5_os_umem_dereg(void *pumem); +__rte_internal int mlx5_os_reg_mr(void *pd,void *addr,size_t length,struct mlx5_pmd_mr *pmd_mr); +__rte_internal void mlx5_os_dereg_mr(struct mlx5_pmd_mr *pmd_mr);#endif /* RTE_PMD_MLX5_COMMON_OS_H_ */
Signature · 1 line
2.16.1.windows.4
From: Tal Shnaiderman
Quoted 10 lines
Several functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag although being exported.Fixes 1552fb287166 ("common/mlx5: add alloc/dealloc PD on Windows")Fixes 1969ee424405 ("common/mlx5: add UMEM reg/dereg functions onWindows")
Fixes ba420719823c ("common/mlx5: add reg/dereg MR on Windows")Signed-off-by Tal Shnaiderman <[email protected]>
Quoted 60 lines
--- drivers/common/mlx5/linux/mlx5_common_os.h | 4 ++++ drivers/common/mlx5/windows/mlx5_common_os.h | 6 ++++++ 2 files changed, 10 insertions(+)drivers/common/mlx5/linux/mlx5_common_os.h +4
-0@@ -203,24 +203,28 @@ mlx5_os_get_devx_uar_page_id(void *uar) #endif } +__rte_internal static inline void *mlx5_os_alloc_pd (void *ctx) {return mlx5_glue->alloc_pd (ctx); } +__rte_internal static inline intmlx5_os_dealloc_pd (void *pd) {return mlx5_glue->dealloc_pd (pd); } +__rte_internal static inline void *mlx5_os_umem_reg (void *ctx,void *addr,size_t size,uint32_t access) {return mlx5_glue->devx_umem_reg (ctx, addr, size, access); } +__rte_internal static inline intmlx5_os_umem_dereg (void *pumem) {drivers/common/mlx5/windows/mlx5_common_os.h +6
-0@@ -248,11 +248,17 @@ mlx5_os_devx_subscribe_devx_event(void *eventc,return -ENOTSUP ; } +__rte_internal void *mlx5_os_alloc_pd(void *ctx); +__rte_internal int mlx5_os_dealloc_pd(void *pd); +__rte_internal void *mlx5_os_umem_reg(void *ctx, void *addr, size_t size, uint32_t access); +__rte_internal int mlx5_os_umem_dereg(void *pumem); +__rte_internal int mlx5_os_reg_mr(void *pd,void *addr,size_t length,struct mlx5_pmd_mr *pmd_mr); +__rte_internal void mlx5_os_dereg_mr(struct mlx5_pmd_mr *pmd_mr); #endif /*
RTE_PMD_MLX5_COMMON_OS_H_*/
--
2.16.1.windows.4
Hi,
Quoted 14 lines
-----Original Message-----
From: Tal Shnaiderman <[email protected]>
Sent: Sunday, April 11, 2021 3:22 PM
To: [email protected]
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; Asaf Penso <[email protected]>; Wisam Monther <[email protected]>; [email protected]
Subject: [PATCH] common/mlx5: fix missing__rte_internaltags in exported functionsSeveral functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag although being exported.
Quoted 7 lines
Fixes 1552fb287166 ("common/mlx5: add alloc/dealloc PD on Windows")Fixes 1969ee424405 ("common/mlx5: add UMEM reg/dereg functions onWindows")
Fixes ba420719823c ("common/mlx5: add reg/dereg MR on Windows")Signed-off-by Tal Shnaiderman <[email protected]>
Hi,
Quoted 11 lines
-----Original Message-----
From: Tal Shnaiderman <[email protected]>
Sent: Sunday, April 11, 2021 3:22 PM
To: [email protected]
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; Asaf Penso <[email protected]>; Wisam Monther <[email protected]>; [email protected]
Subject: [PATCH] common/mlx5: fix missing__rte_internaltags in exported functions
Removed __ from the commit title to fix wrong headline format issue.
Quoted 10 lines
Several functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag although being exported.Fixes 1552fb287166 ("common/mlx5: add alloc/dealloc PD on Windows")Fixes 1969ee424405 ("common/mlx5: add UMEM reg/dereg functions onWindows")
Fixes ba420719823c ("common/mlx5: add reg/dereg MR on Windows")Signed-off-by Tal Shnaiderman <[email protected]>
Patch applied to next-net-mlx,
Kindest regards,
Raslan Darawsheh
12/04/2021 13:25, Raslan Darawsheh:
Quoted 1 line
Removed __ from the commit title to fix wrong headline format issue.
Removing __ makes it wrong: rte_internal does not exist. The idea of discouraging the use of underscore is to avoid naming bits and bytes in the title.
Here it should be: "add missing internal tags to some functions"
Quoted 2 lines
Quoted 2 lines
Several functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag although being exported.
Hi,
Quoted 11 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Monday, April 12, 2021 3:26 PM
To: Tal Shnaiderman <[email protected]>; Raslan Darawsheh <[email protected]>
Cc: [email protected]; Matan Azrad <[email protected]>; Asaf Penso <[email protected]>; Wisam Monther <[email protected]>; [email protected]
Subject: Re: [PATCH] common/mlx5: fix missing__rte_internaltags in exported functions
Quoted 7 lines
12/04/2021 13:25, Raslan Darawsheh:
Quoted 1 line
Removed __ from the commit title to fix wrong headline format issue.
Removing __ makes it wrong:
rte_internaldoes not exist. The idea of discouraging the use of underscore is to avoid naming bits and bytes in the title.
Here it should be: "add missing internal tags to some functions"
My suggestion was to make it like this:
"fix missing rte internal tags in exported functions"
But, I find your suggestion even better, so I'd change it to that
Quoted 5 lines
Quoted 3 lines
Quoted 3 lines
Several functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag although being exported.
Kindest regards
Raslan Darawsheh
Quoted 24 lines · Raslan Darawsheh
Hi,
Quoted 11 lines
-----Original Message-----
From: Tal Shnaiderman <[email protected]>
Sent: Sunday, April 11, 2021 3:22 PM
To: [email protected]
Cc: NBU-Contact-Thomas Monjalon <[email protected]>; Matan Azrad <[email protected]>; Raslan Darawsheh <[email protected]>; Asaf Penso <[email protected]>; Wisam Monther <[email protected]>; [email protected]
Subject: [PATCH] common/mlx5: fix missing__rte_internaltags in exported functionsRemoved __ from the commit title to fix wrong headline format issue.
Quoted 9 lines
Several functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag although being exported.Fixes 1552fb287166 ("common/mlx5: add alloc/dealloc PD on Windows")Fixes 1969ee424405 ("common/mlx5: add UMEM reg/dereg functions onWindows")
Fixes ba420719823c ("common/mlx5: add reg/dereg MR on Windows")
Quoted 4 lines
Quoted 1 line
Signed-off-by Tal Shnaiderman <[email protected]>Patch applied to next-net-mlx,
Can we merge this directly to main repo?
Since debug build is broken without it.
12/04/2021 14:59, Ferruh Yigit:
Quoted 16 lines · Raslan Darawsheh
Quoted 15 lines
Hi,
From: Tal Shnaiderman <[email protected]>
Quoted 1 line
Removed __ from the commit title to fix wrong headline format issue.
Quoted 9 lines
Several functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag although being exported.Fixes 1552fb287166 ("common/mlx5: add alloc/dealloc PD on Windows")Fixes 1969ee424405 ("common/mlx5: add UMEM reg/dereg functions onWindows")
Fixes ba420719823c ("common/mlx5: add reg/dereg MR on Windows")
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Signed-off-by Tal Shnaiderman <[email protected]>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?
Quoted 19 lines · Thomas Monjalon
12/04/2021 14:59, Ferruh Yigit:
Quoted 18 lines · Raslan Darawsheh
Quoted 17 lines
Hi,
From: Tal Shnaiderman <[email protected]>
Quoted 1 line
Removed __ from the commit title to fix wrong headline format issue.
Quoted 10 lines
Several functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag although being exported.Fixes 1552fb287166 ("common/mlx5: add alloc/dealloc PD on Windows")Fixes 1969ee424405 ("common/mlx5: add UMEM reg/dereg functions onWindows")
Fixes ba420719823c ("common/mlx5: add reg/dereg MR on Windows")Signed-off-by Tal Shnaiderman <[email protected]>
Quoted 10 lines
Quoted 5 lines
Quoted 2 lines
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].
It become visible when .def file removed [3], since that is when symbols are added to the .map file.
[1]
FAILED: drivers/rte_common_mlx5.sym_chk
.../meson --internal exe --capture drivers/rte_common_mlx5.sym_chk -- .../buildtools/check-symbols.sh .../drivers/common/mlx5/version.map drivers/librte_common_mlx5.a mlx5_os_umem_reg is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of mlx5_os_umem_regmlx5_os_umem_dereg is not flagged as internal
but is listed in version map
Please add __rte_internal to the definition of mlx5_os_umem_dereg
[2]
Commit 720dfda4551e ("build: limit symbol checks to developer mode")
[3]
Commit 56ea803e878e ("build: remove Windows export symbol list")
Quoted 32 lines · Ferruh Yigit
Quoted 19 lines · Thomas Monjalon
12/04/2021 14:59, Ferruh Yigit:
Quoted 18 lines · Raslan Darawsheh
Quoted 17 lines
Hi,
From: Tal Shnaiderman <[email protected]>
Quoted 1 line
Removed __ from the commit title to fix wrong headline format issue.
Quoted 10 lines
Several functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag although being exported.Fixes 1552fb287166 ("common/mlx5: add alloc/dealloc PD on Windows")Fixes 1969ee424405 ("common/mlx5: add UMEM reg/dereg functions onWindows")
Fixes ba420719823c ("common/mlx5: add reg/dereg MR on Windows")Signed-off-by Tal Shnaiderman <[email protected]>Quoted 10 lines
Quoted 5 lines
Quoted 2 lines
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?
Quoted 4 lines
"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_regWhile 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_regThe symbol check then catches mlx5_os_umem_reg wrt the version.map and complains mlx5_os_umem_reg is not tagged internal.
Signature · 1 line
David Marchand
Quoted 67 lines
Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH] common/mlx5: fix missing
__rte_internaltags in exported functionsExternal email: Use caution opening links or attachments
Quoted 10 lines · Ferruh Yigit
Quoted 8 lines · Thomas Monjalon
12/04/2021 14:59, Ferruh Yigit:
Quoted 7 lines · Raslan Darawsheh
Quoted 6 lines
Hi,
From: Tal Shnaiderman <[email protected]>
Quoted 1 line
Removed __ from the commit title to fix wrong headline format issue.
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Quoted 7 lines
Several functions introduced in the addition of the Windows support to
mlx5 were missing the__rte_internaltag although being exported.Fixes 1552fb287166 ("common/mlx5: add alloc/dealloc PD onWindows")
Fixes 1969ee424405 ("common/mlx5: add UMEM reg/deregfunctions
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
Quoted 3 lines
on
Windows")Fixes ba420719823c ("common/mlx5: add reg/dereg MR onWindows")
Quoted 15 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
Signed-off-by Tal Shnaiderman <[email protected]>Quoted 10 lines
Quoted 5 lines
Quoted 2 lines
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?Quoted 4 lines
"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_regWhile 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
Quoted 6 lines
The symbol check then catches
mlx5_os_umem_regwrt the version.map and complainsmlx5_os_umem_regis 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.
Quoted 55 lines · David Marchand
Quoted 32 lines · Ferruh Yigit
Quoted 19 lines · Thomas Monjalon
12/04/2021 14:59, Ferruh Yigit:
Quoted 18 lines · Raslan Darawsheh
Quoted 17 lines
Hi,
From: Tal Shnaiderman <[email protected]>
Quoted 1 line
Removed __ from the commit title to fix wrong headline format issue.
Quoted 10 lines
Several functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag although being exported.Fixes 1552fb287166 ("common/mlx5: add alloc/dealloc PD on Windows")Fixes 1969ee424405 ("common/mlx5: add UMEM reg/dereg functions onWindows")
Fixes ba420719823c ("common/mlx5: add reg/dereg MR on Windows")Signed-off-by Tal Shnaiderman <[email protected]>Quoted 10 lines
Quoted 5 lines
Quoted 2 lines
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?Quoted 4 lines
"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_regWhile 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
Quoted 4 lines
The symbol check then catches
mlx5_os_umem_regwrt the version.map and complainsmlx5_os_umem_regis not tagged internal.
Got it, if so this is not related to [2] as you said, but related to the debug mode build, thanks for clarification.
Thomas Monjalon
Applied11/04/2021 14:21, Tal Shnaiderman:
Quoted 9 lines
Several functions introduced in the addition of the Windows support to mlx5 were missing the
__rte_internaltag 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")Signed-off-by Tal Shnaiderman <[email protected]>
It is fixing Linux debug build (note: should be added to CI).
Applied in main tree with this message, thanks:
common/mlx5: add missing internal tags
Several functions introduced in the addition of the Windows support to mlx5 were missing the __rte_internal tag.
This miss is better revealed when symbols became exported on Linux too, and it is caught by the symbol checker with --buildtype=debug.