[v3,2/2] common/mlx5: fix compilation flag on port query API

Message ID 20210701071552.3339-2-viacheslavo@nvidia.com (mailing list archive)
State Superseded, archived
Delegated to: Raslan Darawsheh
Headers
Series [v3,1/2] common/mlx5: add provider query port support to glue library |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/github-robot success github build: passed
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/iol-mellanox-Functional fail Functional Testing issues
ci/iol-intel-Performance fail Performance Testing issues
ci/iol-abi-testing success Testing PASS

Commit Message

Slava Ovsiienko July 1, 2021, 7:15 a.m. UTC
  There is the compilation flag HAVE_MLX5DV_DR_DEVX_PORT
that depends on presence of mlx5dv_query_devx_port routine
in rdma-core library.

The mlx5dv_query_devx_port routine is vendor specific, exists
only in OFED version of rdma-core library and there are the plans
to remove the routine and replace one with Upstream compatible
mlx5dv_query_port version.

As mlx5dv_query_devx_port is being removed we should reconsider
all the dependencies on the HAVE_MLX5DV_DR_DEVX_PORT compilation
flag and introduce the new dedicated compilation flags as needed.

Fixes: 6cfe84fbe7b1 ("net/mlx5: fix port action for LAG")
Cc: stable@dpdk.org

Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
---
 drivers/common/mlx5/linux/meson.build | 2 ++
 drivers/common/mlx5/linux/mlx5_glue.c | 2 +-
 drivers/net/mlx5/mlx5_flow_dv.c       | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
  

Comments

Thomas Monjalon July 6, 2021, 1:49 p.m. UTC | #1
01/07/2021 09:15, Viacheslav Ovsiienko:
> There is the compilation flag HAVE_MLX5DV_DR_DEVX_PORT
> that depends on presence of mlx5dv_query_devx_port routine
> in rdma-core library.

The english syntax is difficult here.
You probably mean:
"The compilation flag HAVE_MLX5DV_DR_DEVX_PORT depends on the presence of
mlx5dv_query_devx_port routine in rdma-core library."

> The mlx5dv_query_devx_port routine is vendor specific, exists
> only in OFED version of rdma-core library and there are the plans

"there are plans"

> to remove the routine and replace one with Upstream compatible
> mlx5dv_query_port version.

Which OFED version will have this change?

> As mlx5dv_query_devx_port is being removed we should reconsider
> all the dependencies on the HAVE_MLX5DV_DR_DEVX_PORT compilation
> flag and introduce the new dedicated compilation flags as needed.

"introduce a new"

It doesn't explain why HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT
is a better flag.
  

Patch

diff --git a/drivers/common/mlx5/linux/meson.build b/drivers/common/mlx5/linux/meson.build
index 5a0ee51b37..5cea1b44d7 100644
--- a/drivers/common/mlx5/linux/meson.build
+++ b/drivers/common/mlx5/linux/meson.build
@@ -95,6 +95,8 @@  has_sym_args = [
             'mlx5dv_query_devx_port' ],
 	[ 'HAVE_MLX5DV_DR_DEVX_PORT_V35', 'infiniband/mlx5dv.h',
 	    'mlx5dv_query_port' ],
+	[ 'HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT', 'infiniband/mlx5dv.h',
+	    'mlx5dv_dr_action_create_dest_ib_port' ],
         [ 'HAVE_IBV_DEVX_OBJ', 'infiniband/mlx5dv.h',
             'mlx5dv_devx_obj_create' ],
         [ 'HAVE_IBV_FLOW_DEVX_COUNTERS', 'infiniband/mlx5dv.h',
diff --git a/drivers/common/mlx5/linux/mlx5_glue.c b/drivers/common/mlx5/linux/mlx5_glue.c
index 38b174aa31..00be8114be 100644
--- a/drivers/common/mlx5/linux/mlx5_glue.c
+++ b/drivers/common/mlx5/linux/mlx5_glue.c
@@ -391,7 +391,7 @@  mlx5_glue_dr_create_flow_action_dest_flow_tbl(void *tbl)
 static void *
 mlx5_glue_dr_create_flow_action_dest_port(void *domain, uint32_t port)
 {
-#ifdef HAVE_MLX5DV_DR_DEVX_PORT
+#ifdef HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT
 	return mlx5dv_dr_action_create_dest_ib_port(domain, port);
 #else
 #ifdef HAVE_MLX5DV_DR_ESWITCH
diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c
index 62edc4fa85..c5d4b01e57 100644
--- a/drivers/net/mlx5/mlx5_flow_dv.c
+++ b/drivers/net/mlx5/mlx5_flow_dv.c
@@ -10342,7 +10342,7 @@  flow_dv_translate_action_port_id(struct rte_eth_dev *dev,
 					  RTE_FLOW_ERROR_TYPE_ACTION,
 					  NULL,
 					  "No eswitch info was found for port");
-#ifdef HAVE_MLX5DV_DR_DEVX_PORT
+#ifdef HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT
 	/*
 	 * This parameter is transferred to
 	 * mlx5dv_dr_action_create_dest_ib_port().