[dpdk-dev] [PATCH v1 6/8] common/mlx5: exclude ibv dependent calls in devx commands
Ophir Munk
ophirmu at mellanox.com
Wed Jun 10 11:32:31 CEST 2020
Function mlx5_devx_cmd_qp_query_tis_td() receives as parameter a pointer
to verbs QP returned by ibv_create_qp. Therefore support it only if
HAVE_IBV_FLOW_DV_SUPPORT is defined. Otherwise return an error ENOTSUP.
Signed-off-by: Ophir Munk <ophirmu at mellanox.com>
---
drivers/common/mlx5/mlx5_devx_cmds.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/common/mlx5/mlx5_devx_cmds.c b/drivers/common/mlx5/mlx5_devx_cmds.c
index fba485e..091a825 100644
--- a/drivers/common/mlx5/mlx5_devx_cmds.c
+++ b/drivers/common/mlx5/mlx5_devx_cmds.c
@@ -577,6 +577,7 @@ int
mlx5_devx_cmd_qp_query_tis_td(void *qp, uint32_t tis_num,
uint32_t *tis_td)
{
+#ifdef HAVE_IBV_FLOW_DV_SUPPORT
uint32_t in[MLX5_ST_SZ_DW(query_tis_in)] = {0};
uint32_t out[MLX5_ST_SZ_DW(query_tis_out)] = {0};
int rc;
@@ -592,6 +593,12 @@ mlx5_devx_cmd_qp_query_tis_td(void *qp, uint32_t tis_num,
tis_ctx = MLX5_ADDR_OF(query_tis_out, out, tis_context);
*tis_td = MLX5_GET(tisc, tis_ctx, transport_domain);
return 0;
+#else
+ (void)qp;
+ (void)tis_num;
+ (void)tis_td;
+ return -ENOTSUP;
+#endif
}
/**
--
2.8.4
More information about the dev
mailing list