[3/4] eal: export needed functions for mbuf
Checks
Commit Message
From: Tal Shnaiderman <talshn@mellanox.com>
Export needed eal functions used by the lib.
Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
---
lib/librte_eal/common/meson.build | 1 +
lib/librte_eal/rte_eal_exports.def | 3 +++
lib/librte_eal/rte_eal_version.map | 1 +
3 files changed, 5 insertions(+)
Comments
01/06/2020 11:38, talshn@mellanox.com:
> From: Tal Shnaiderman <talshn@mellanox.com>
>
> Export needed eal functions used by the lib.
>
> Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> ---
> --- a/lib/librte_eal/rte_eal_exports.def
> +++ b/lib/librte_eal/rte_eal_exports.def
> @@ -3,6 +3,7 @@ EXPORTS
> per_lcore__rte_errno
> rte_calloc
> rte_calloc_socket
> + per_lcore__lcore_id
[...]
> --- a/lib/librte_eal/rte_eal_version.map
> +++ b/lib/librte_eal/rte_eal_version.map
> @@ -394,4 +394,5 @@ EXPERIMENTAL {
> rte_mem_unmap;
> __emutls_v.per_lcore__rte_errno;
> __rte_trace_mem_per_thread_alloc;
> + __emutls_v.per_lcore__lcore_id;
I'm surprised about this one in the Linux/BSD map.
Can it be removed?
> Subject: Re: [dpdk-dev] [PATCH 3/4] eal: export needed functions for mbuf
>
> 01/06/2020 11:38, talshn@mellanox.com:
> > From: Tal Shnaiderman <talshn@mellanox.com>
> >
> > Export needed eal functions used by the lib.
> >
> > Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> > ---
> > --- a/lib/librte_eal/rte_eal_exports.def
> > +++ b/lib/librte_eal/rte_eal_exports.def
> > @@ -3,6 +3,7 @@ EXPORTS
> > per_lcore__rte_errno
> > rte_calloc
> > rte_calloc_socket
> > + per_lcore__lcore_id
> [...]
> > --- a/lib/librte_eal/rte_eal_version.map
> > +++ b/lib/librte_eal/rte_eal_version.map
> > @@ -394,4 +394,5 @@ EXPERIMENTAL {
> > rte_mem_unmap;
> > __emutls_v.per_lcore__rte_errno;
> > __rte_trace_mem_per_thread_alloc;
> > + __emutls_v.per_lcore__lcore_id;
>
> I'm surprised about this one in the Linux/BSD map.
> Can it be removed?
>
It is needed for the MingGW build which requires the __emutls_v. prefix.
16/06/2020 10:33, Tal Shnaiderman:
> > 01/06/2020 11:38, talshn@mellanox.com:
> > > From: Tal Shnaiderman <talshn@mellanox.com>
> > >
> > > Export needed eal functions used by the lib.
> > >
> > > Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> > > ---
> > > --- a/lib/librte_eal/rte_eal_exports.def
> > > +++ b/lib/librte_eal/rte_eal_exports.def
> > > @@ -3,6 +3,7 @@ EXPORTS
> > > per_lcore__rte_errno
> > > rte_calloc
> > > rte_calloc_socket
> > > + per_lcore__lcore_id
> > [...]
> > > --- a/lib/librte_eal/rte_eal_version.map
> > > +++ b/lib/librte_eal/rte_eal_version.map
> > > @@ -394,4 +394,5 @@ EXPERIMENTAL {
> > > rte_mem_unmap;
> > > __emutls_v.per_lcore__rte_errno;
> > > __rte_trace_mem_per_thread_alloc;
> > > + __emutls_v.per_lcore__lcore_id;
Note the alphabetical order is not respected above.
> > I'm surprised about this one in the Linux/BSD map.
> > Can it be removed?
>
> It is needed for the MingGW build which requires the __emutls_v. prefix.
We already have per_lcore__lcore_id and per_lcore__rte_errno
for Linux and FreeBSD.
The prefix __emutls_v. for MinGW looks wrong.
If it is really required, it should be added automatically
in my opinion.
I think we can do it in buildtools/map_to_def.py
by adding this prefix to per_lcore__ when required.
On Tue, 16 Jun 2020 10:45:49 +0200
Thomas Monjalon <thomas@monjalon.net> wrote:
> 16/06/2020 10:33, Tal Shnaiderman:
> > > 01/06/2020 11:38, talshn@mellanox.com:
> > > > From: Tal Shnaiderman <talshn@mellanox.com>
> > > >
> > > > Export needed eal functions used by the lib.
> > > >
> > > > Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> > > > ---
> > > > --- a/lib/librte_eal/rte_eal_exports.def
> > > > +++ b/lib/librte_eal/rte_eal_exports.def
> > > > @@ -3,6 +3,7 @@ EXPORTS
> > > > per_lcore__rte_errno
> > > > rte_calloc
> > > > rte_calloc_socket
> > > > + per_lcore__lcore_id
> > > [...]
> > > > --- a/lib/librte_eal/rte_eal_version.map
> > > > +++ b/lib/librte_eal/rte_eal_version.map
> > > > @@ -394,4 +394,5 @@ EXPERIMENTAL {
> > > > rte_mem_unmap;
> > > > __emutls_v.per_lcore__rte_errno;
> > > > __rte_trace_mem_per_thread_alloc;
> > > > + __emutls_v.per_lcore__lcore_id;
>
> Note the alphabetical order is not respected above.
>
> > > I'm surprised about this one in the Linux/BSD map.
> > > Can it be removed?
> >
> > It is needed for the MingGW build which requires the __emutls_v. prefix.
>
> We already have per_lcore__lcore_id and per_lcore__rte_errno
> for Linux and FreeBSD.
> The prefix __emutls_v. for MinGW looks wrong.
> If it is really required, it should be added automatically
> in my opinion.
> I think we can do it in buildtools/map_to_def.py
> by adding this prefix to per_lcore__ when required.
MinGW doesn't use .def, it's for link.exe only (used by Clang). To my
understanding, multiple .map files can be used [1]. The "overlay .map" for
MinGW can then be generated from the generic .map by a separate script.
[1]: https://github.com/PlushBeaver/dpdk/blob/windows/lib/meson.build#L174
16/06/2020 11:26, Dmitry Kozlyuk:
> Thomas Monjalon <thomas@monjalon.net> wrote:
> > 16/06/2020 10:33, Tal Shnaiderman:
> > > > 01/06/2020 11:38, talshn@mellanox.com:
> > > > > From: Tal Shnaiderman <talshn@mellanox.com>
> > > > >
> > > > > Export needed eal functions used by the lib.
> > > > >
> > > > > Signed-off-by: Tal Shnaiderman <talshn@mellanox.com>
> > > > > ---
> > > > > --- a/lib/librte_eal/rte_eal_version.map
> > > > > +++ b/lib/librte_eal/rte_eal_version.map
> > > > > @@ -394,4 +394,5 @@ EXPERIMENTAL {
> > > > > rte_mem_unmap;
> > > > > __emutls_v.per_lcore__rte_errno;
> > > > > __rte_trace_mem_per_thread_alloc;
> > > > > + __emutls_v.per_lcore__lcore_id;
> >
> > We already have per_lcore__lcore_id and per_lcore__rte_errno
> > for Linux and FreeBSD.
> > The prefix __emutls_v. for MinGW looks wrong.
> > If it is really required, it should be added automatically
> > in my opinion.
> > I think we can do it in buildtools/map_to_def.py
> > by adding this prefix to per_lcore__ when required.
>
> MinGW doesn't use .def, it's for link.exe only (used by Clang). To my
> understanding, multiple .map files can be used [1]. The "overlay .map" for
> MinGW can then be generated from the generic .map by a separate script.
>
> [1]: https://github.com/PlushBeaver/dpdk/blob/windows/lib/meson.build#L174
Yes please generate a map with the fixed prefix.
It can be done in a script similar to buildtools/map_to_def.py, right?
@@ -12,6 +12,7 @@ if is_windows
'eal_common_dynmem.c',
'eal_common_errno.c',
'eal_common_fbarray.c',
+ 'eal_common_hexdump.c',
'eal_common_launch.c',
'eal_common_lcore.c',
'eal_common_log.c',
@@ -3,6 +3,7 @@ EXPORTS
per_lcore__rte_errno
rte_calloc
rte_calloc_socket
+ per_lcore__lcore_id
per_lcore__rte_errno
rte_bus_register
rte_dev_is_probed
@@ -12,6 +13,7 @@ EXPORTS
rte_eal_has_hugepages
rte_eal_init
rte_eal_iova_mode
+ rte_eal_mbuf_user_pool_ops
rte_eal_mp_remote_launch
rte_eal_mp_wait_lcore
rte_eal_process_type
@@ -20,6 +22,7 @@ EXPORTS
rte_eal_tailq_register
rte_eal_using_phys_addrs
rte_free
+ rte_hexdump
rte_log
rte_malloc
rte_malloc_dump_stats
@@ -394,4 +394,5 @@ EXPERIMENTAL {
rte_mem_unmap;
__emutls_v.per_lcore__rte_errno;
__rte_trace_mem_per_thread_alloc;
+ __emutls_v.per_lcore__lcore_id;
};