From: Thomas Monjalon <thomas@monjalon.net>
To: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
Cc: dev@dpdk.org, Tal Shnaiderman <talshn@nvidia.com>,
Matan Azrad <matan@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Subject: Re: [PATCH v2 3/4] net/mlx5: remove weak stub functions
Date: Tue, 24 Jan 2023 15:42:27 +0100 [thread overview]
Message-ID: <2957690.GUH7pLUipS@thomas> (raw)
In-Reply-To: <20230123224212.45743cdd@sovereign>
23/01/2023 20:42, Dmitry Kozlyuk:
> 2023-01-12 21:37 (UTC+0100), Thomas Monjalon:
> > The vector Rx functions are conditionally compiled.
> > Some stub functions were also always compiled with weak attribute.
> > If there is no vector support, the weak functions were linked.
> >
> > These weak functions are moved in a specific file
> > which is compiled only if there is no vector support.
> > This way it is simpler to understand,
> > and the weak attributes can be removed.
> >
> > This change helps to compile with MinGW GCC
> > which has no support for weak functions.
> >
> > Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
> > ---
> > drivers/net/mlx5/meson.build | 13 +++++----
> > drivers/net/mlx5/mlx5_rx.c | 35 ------------------------
> > drivers/net/mlx5/mlx5_rxtx_vec_null.c | 38 +++++++++++++++++++++++++++
> > 3 files changed, 46 insertions(+), 40 deletions(-)
> > create mode 100644 drivers/net/mlx5/mlx5_rxtx_vec_null.c
> >
> > diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
> > index abd507bd88..dba911693e 100644
> > --- a/drivers/net/mlx5/meson.build
> > +++ b/drivers/net/mlx5/meson.build
> > @@ -49,11 +49,14 @@ if is_linux
> > 'mlx5_hws_cnt.c',
> > 'mlx5_flow_verbs.c',
> > )
> > - if (dpdk_conf.has('RTE_ARCH_X86_64')
> > - or dpdk_conf.has('RTE_ARCH_ARM64')
> > - or dpdk_conf.has('RTE_ARCH_PPC_64'))
> > - sources += files('mlx5_rxtx_vec.c')
> > - endif
> > +endif
> > +
> > +if is_linux and (dpdk_conf.has('RTE_ARCH_X86_64')
> > + or dpdk_conf.has('RTE_ARCH_ARM64')
> > + or dpdk_conf.has('RTE_ARCH_PPC_64'))
> > + sources += files('mlx5_rxtx_vec.c')
> > +else
> > + sources += files('mlx5_rxtx_vec_null.c')
> > endif
>
> Can "is_linux" be dropped now?
> I suspect that vector routines were compiled only for Linux
> to prevent linker errors from both weak and non-weak symbols present,
> not because vector code is somehow Linux-specific.
Maybe but we should enable vector routines on Windows in a separate patch.
next prev parent reply other threads:[~2023-01-24 14:42 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-05 16:10 [PATCH 0/3] fix mlx5 build with MinGW Thomas Monjalon
2023-01-05 16:10 ` [PATCH 1/3] eal/windows: fix pedantic build Thomas Monjalon
2023-01-05 16:40 ` Tyler Retzlaff
2023-01-05 16:10 ` [PATCH 2/3] common/mlx5: get Windows dependency from standard variables Thomas Monjalon
2023-01-05 16:10 ` [PATCH 3/3] net/mlx5: fix Windows build with MinGW GCC 12 Thomas Monjalon
2023-01-12 20:37 ` [PATCH v2 0/4] fix Windows build with MinGW and mlx5 Thomas Monjalon
2023-01-12 20:37 ` [PATCH v2 1/4] eal/windows: fix pedantic build Thomas Monjalon
2023-03-01 16:33 ` Thomas Monjalon
2023-01-12 20:37 ` [PATCH v2 2/4] common/mlx5: get Windows dependency from standard variables Thomas Monjalon
2023-01-12 20:37 ` [PATCH v2 3/4] net/mlx5: remove weak stub functions Thomas Monjalon
2023-01-23 19:42 ` Dmitry Kozlyuk
2023-01-24 14:42 ` Thomas Monjalon [this message]
2023-01-12 20:37 ` [PATCH v2 4/4] net/mlx5: fix Windows build with MinGW GCC 12 Thomas Monjalon
2023-03-02 13:21 ` [PATCH v3 0/3] mlx5: fix Windows build with Linux MinGW Thomas Monjalon
2023-03-02 13:21 ` [PATCH v3 1/3] common/mlx5: get Windows dependency from standard variables Thomas Monjalon
2023-03-02 17:17 ` Tyler Retzlaff
2023-03-03 14:12 ` Thomas Monjalon
2023-03-03 21:09 ` Tyler Retzlaff
2023-03-06 8:30 ` Thomas Monjalon
2023-03-06 20:55 ` Tyler Retzlaff
2023-03-08 10:24 ` Tal Shnaiderman
2023-03-02 13:21 ` [PATCH v3 2/3] net/mlx5: remove weak stub functions Thomas Monjalon
2023-03-02 17:19 ` Tyler Retzlaff
2023-03-08 10:26 ` Tal Shnaiderman
2023-03-02 13:21 ` [PATCH v3 3/3] net/mlx5: fix Windows build with MinGW GCC 12 Thomas Monjalon
2023-03-02 17:28 ` Tyler Retzlaff
2023-03-08 10:27 ` Tal Shnaiderman
2023-03-12 15:44 ` [PATCH v3 0/3] mlx5: fix Windows build with Linux MinGW Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2957690.GUH7pLUipS@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=dmitry.kozliuk@gmail.com \
--cc=matan@nvidia.com \
--cc=talshn@nvidia.com \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).