By default, the responder_resources parameter is set to that received
in a connection request. The passive side may override this value
when accepting the connection. Use the value provided by the passive
side when transitioning the QP to RTR state, rather than the value
given in the connect request. Without this change, the RTR transition
may fail if the passive side supports fewer responder_resources than
that in the request.
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
return 0;
}
-static int ucma_modify_qp_rtr(struct rdma_cm_id *id)
+static int ucma_modify_qp_rtr(struct rdma_cm_id *id,
+ struct rdma_conn_param *conn_param)
{
struct ibv_qp_attr qp_attr;
int qp_attr_mask, ret;
if (ret)
return ret;
+ if (conn_param)
+ qp_attr.max_dest_rd_atomic = conn_param->responder_resources;
return ibv_modify_qp(id->qp, &qp_attr, qp_attr_mask);
}
return ret;
if (!ucma_is_ud_ps(id->ps)) {
- ret = ucma_modify_qp_rtr(id);
+ ret = ucma_modify_qp_rtr(id, conn_param);
if (ret)
return ret;
}
void *msg;
int ret, size;
- ret = ucma_modify_qp_rtr(&id_priv->id);
+ ret = ucma_modify_qp_rtr(&id_priv->id, NULL);
if (ret)
goto err;