From 170572d8f92c3298d847fba67702bee034d2cbb2 Mon Sep 17 00:00:00 2001 From: Ophir Munk Date: Wed, 10 Jun 2020 09:32:31 +0000 Subject: [PATCH] common/mlx5: flag Verbs dependency in a DevX command 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 Acked-by: Matan Azrad --- 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 fba485e724..091a825ab5 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.20.1