From: Ophir Munk Date: Wed, 10 Jun 2020 09:32:31 +0000 (+0000) Subject: common/mlx5: flag Verbs dependency in a DevX command X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=170572d8f92c3298d847fba67702bee034d2cbb2;p=dpdk.git 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 --- 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 } /**