[openib-general] [PATCH] - iWARP Core Support for librdmacm

Steve Wise swise at opengridcomputing.com
Tue Oct 3 14:23:40 PDT 2006


Here is an updated patch for the iwarp core support in librdmacm.  This
is updated to use roland'd transport type changes.

Sean, can you add this to librdmacm?

Signed-off-by: Steve Wise <swise at opengridcomputing.com>

Index: librdmacm/src/cma.c
===================================================================
--- librdmacm/src/cma.c	(revision 9694)
+++ librdmacm/src/cma.c	(working copy)
@@ -643,6 +643,17 @@
 	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;
@@ -890,7 +901,16 @@
 	void *msg;
 	int ret, size;
 
-	ret = ucma_modify_qp_err(id);
+	switch (id->verbs->device->transport_type) {
+	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;
 








More information about the general mailing list