From 3abddaf0ed78614cff79e86dcde959c7a14fa330 Mon Sep 17 00:00:00 2001 From: dmitrygx Date: Mon, 19 Apr 2021 13:22:06 +0300 Subject: [PATCH] UCT/IB: Set correct CQE scatter value on DEVX and fix TX_INLINE_RESP=0 behavior --- src/uct/ib/base/ib_iface.c | 2 +- src/uct/ib/mlx5/dv/ib_mlx5_dv.c | 3 ++- src/uct/ib/mlx5/ib_mlx5.c | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/uct/ib/base/ib_iface.c b/src/uct/ib/base/ib_iface.c index 3e27d910418..52e1eb2a2e5 100644 --- a/src/uct/ib/base/ib_iface.c +++ b/src/uct/ib/base/ib_iface.c @@ -1094,7 +1094,7 @@ UCS_CLASS_INIT_FUNC(uct_ib_iface_t, uct_ib_iface_ops_t *ops, uct_md_h md, goto err_destroy_comp_channel; } - inl = config->rx.inl; + inl = config->tx.inl_resp; status = uct_ib_iface_create_cq(self, init_attr->tx_cq_len, &inl, preferred_cpu, init_attr->flags, &self->cq[UCT_IB_DIR_TX]); diff --git a/src/uct/ib/mlx5/dv/ib_mlx5_dv.c b/src/uct/ib/mlx5/dv/ib_mlx5_dv.c index 5105ec26d09..2826938c1c0 100644 --- a/src/uct/ib/mlx5/dv/ib_mlx5_dv.c +++ b/src/uct/ib/mlx5/dv/ib_mlx5_dv.c @@ -127,7 +127,8 @@ ucs_status_t uct_ib_mlx5_devx_create_qp(uct_ib_iface_t *iface, UCT_IB_MLX5DV_SET(qpc, qpc, cqn_rcv, dvrcq.cqn); UCT_IB_MLX5DV_SET(qpc, qpc, log_sq_size, ucs_ilog2_or0(max_tx)); UCT_IB_MLX5DV_SET(qpc, qpc, log_rq_size, ucs_ilog2_or0(max_rx)); - UCT_IB_MLX5DV_SET(qpc, qpc, cs_req, UCT_IB_MLX5_QPC_CS_REQ_UP_TO_64B); + UCT_IB_MLX5DV_SET(qpc, qpc, cs_req, + uct_ib_mlx5_qpc_cs_req(attr->max_inl_recv)); UCT_IB_MLX5DV_SET(qpc, qpc, cs_res, uct_ib_mlx5_qpc_cs_res(attr->max_inl_resp)); UCT_IB_MLX5DV_SET64(qpc, qpc, dbr_addr, qp->devx.dbrec->offset); diff --git a/src/uct/ib/mlx5/ib_mlx5.c b/src/uct/ib/mlx5/ib_mlx5.c index 454de0b6833..b273ea171bf 100644 --- a/src/uct/ib/mlx5/ib_mlx5.c +++ b/src/uct/ib/mlx5/ib_mlx5.c @@ -79,7 +79,7 @@ ucs_status_t uct_ib_mlx5_create_cq(struct ibv_context *context, int cqe, } *cq_p = cq; - *inl = dv_attr.cqe_size / 2; + *inl = (*inl > 0) ? (dv_attr.cqe_size / 2) : 0; return UCS_OK; #else return uct_ib_verbs_create_cq(context, cqe, channel, comp_vector,