[openib-general] [PATCH v2 2/2] iWARP changes to librdmacm.
Steve Wise
swise at opengridcomputing.com
Fri Jun 23 13:31:37 PDT 2006
Sean,
Are these changes acceptable?
Steve.
On Tue, 2006-06-20 at 15:03 -0500, Steve Wise wrote:
> For iWARP, rdma_disconnect() moves the QP to SQD instead of ERR. The
> iWARP providers map SQD to the RDMAC verbs CLOSING state.
> ---
>
> librdmacm/src/cma.c | 22 +++++++++++++++++++++-
> 1 files changed, 21 insertions(+), 1 deletions(-)
>
> diff --git a/librdmacm/src/cma.c b/librdmacm/src/cma.c
> index e99d15c..a250f69 100644
> --- a/librdmacm/src/cma.c
> +++ b/librdmacm/src/cma.c
> @@ -633,6 +633,17 @@ static int ucma_modify_qp_rts(struct rdm
> return ibv_modify_qp(id->qp, &qp_attr, qp_attr_mask);
> }
>
> +static int ucma_modify_qp_sqd(struct rdma_cm_id *id)
> +{
> + struct ibv_qp_attr qp_attr;
> +
> + if (!id->qp)
> + return 0;
> +
> + qp_attr.qp_state = IBV_QPS_SQD;
> + return ibv_modify_qp(id->qp, &qp_attr, IBV_QP_STATE);
> +}
> +
> static int ucma_modify_qp_err(struct rdma_cm_id *id)
> {
> struct ibv_qp_attr qp_attr;
> @@ -881,7 +892,16 @@ int rdma_disconnect(struct rdma_cm_id *i
> void *msg;
> int ret, size;
>
> - ret = ucma_modify_qp_err(id);
> + switch (ibv_get_transport_type(id->verbs)) {
> + case IBV_TRANSPORT_IB:
> + ret = ucma_modify_qp_err(id);
> + break;
> + case IBV_TRANSPORT_IWARP:
> + ret = ucma_modify_qp_sqd(id);
> + break;
> + default:
> + ret = -EINVAL;
> + }
> if (ret)
> return ret;
>
>
> _______________________________________________
> openib-general mailing list
> openib-general at openib.org
> http://openib.org/mailman/listinfo/openib-general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
More information about the general
mailing list