From: Dariusz Sosnowski <dsosnowski@nvidia.com>
To: Raslan Darawsheh <rasland@nvidia.com>,
Viacheslav Ovsiienko <viacheslavo@nvidia.com>,
Bing Zhao <bingz@nvidia.com>, Ori Kam <orika@nvidia.com>,
Suanming Mou <suanmingm@nvidia.com>,
Matan Azrad <matan@nvidia.com>
Cc: <dev@dpdk.org>
Subject: [PATCH 1/3] net/mlx5: fix mingw stubs link issue in flow creation
Date: Wed, 30 Oct 2024 11:54:10 +0100 [thread overview]
Message-ID: <20241030105412.482107-2-dsosnowski@nvidia.com> (raw)
In-Reply-To: <20241030105412.482107-1-dsosnowski@nvidia.com>
Offending commit used weak symbols to implement stubs
for functions for creating control flow rules
for MAC address and VLAN matching.
Since weak symbols are not supported with MinGW and
concrete implementations of these functions are required
if and only if PMD is compiled on Linux and DV API is available
in rdma-core, this patch removes the __rte_weak and
adds mlx5_flow_hw_stubs.c to compilation only if aforementioned
conditions are specified.
Fixes: 17f2e7992fcb ("net/mlx5: rework creation of unicast flow rules")
Signed-off-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
---
drivers/net/mlx5/meson.build | 8 +++++++-
drivers/net/mlx5/mlx5_flow_hw_stubs.c | 6 +++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/drivers/net/mlx5/meson.build b/drivers/net/mlx5/meson.build
index 0114673491..e65fac0f6f 100644
--- a/drivers/net/mlx5/meson.build
+++ b/drivers/net/mlx5/meson.build
@@ -23,7 +23,6 @@ sources = files(
'mlx5_flow_dv.c',
'mlx5_flow_aso.c',
'mlx5_flow_flex.c',
- 'mlx5_flow_hw_stubs.c',
'mlx5_mac.c',
'mlx5_rss.c',
'mlx5_rx.c',
@@ -57,6 +56,13 @@ if is_linux
)
endif
+if is_windows or (mlx5_config.get('HAVE_INFINIBAND_VERBS_H', false) and
+ not mlx5_config.get('HAVE_IBV_FLOW_DV_SUPPORT', false))
+ sources += files(
+ 'mlx5_flow_hw_stubs.c',
+ )
+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'))
diff --git a/drivers/net/mlx5/mlx5_flow_hw_stubs.c b/drivers/net/mlx5/mlx5_flow_hw_stubs.c
index 0e79e6c1f2..1df615d94c 100644
--- a/drivers/net/mlx5/mlx5_flow_hw_stubs.c
+++ b/drivers/net/mlx5/mlx5_flow_hw_stubs.c
@@ -8,7 +8,7 @@
* mlx5_flow_hw.c source file is included in the build only on Linux.
* Functions defined there are compiled if and only if available rdma-core supports DV.
*
- * This file contains stubs (through weak linking) for any functions exported from that file.
+ * This file contains stubs for any functions exported from that file.
*/
#include "mlx5_flow.h"
@@ -18,7 +18,7 @@
* - PMD is compiled on Windows or
* - available rdma-core does not support HWS.
*/
-__rte_weak int
+int
mlx5_flow_hw_ctrl_flow_dmac(struct rte_eth_dev *dev __rte_unused,
const struct rte_ether_addr *addr __rte_unused)
{
@@ -44,7 +44,7 @@ mlx5_flow_hw_ctrl_flow_dmac_destroy(struct rte_eth_dev *dev __rte_unused,
* - PMD is compiled on Windows or
* - available rdma-core does not support HWS.
*/
-__rte_weak int
+int
mlx5_flow_hw_ctrl_flow_dmac_vlan(struct rte_eth_dev *dev __rte_unused,
const struct rte_ether_addr *addr __rte_unused,
const uint16_t vlan __rte_unused)
--
2.39.5
next prev parent reply other threads:[~2024-10-30 10:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-30 10:54 [PATCH 0/3] net/mlx5: fix mingw link issues Dariusz Sosnowski
2024-10-30 10:54 ` Dariusz Sosnowski [this message]
2024-10-30 10:54 ` [PATCH 2/3] net/mlx5: fix mingw stubs link issue in flow destroy Dariusz Sosnowski
2024-10-30 10:54 ` [PATCH 3/3] net/mlx5: fix stub for HWS context validation Dariusz Sosnowski
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=20241030105412.482107-2-dsosnowski@nvidia.com \
--to=dsosnowski@nvidia.com \
--cc=bingz@nvidia.com \
--cc=dev@dpdk.org \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=rasland@nvidia.com \
--cc=suanmingm@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).