[openib-general] [RFC] [PATCH 3/7] rdma_cm 2.6.20: remove specifying qp_type when connecting

Sean Hefty sean.hefty at intel.com
Tue Oct 10 16:04:32 PDT 2006


Ideally, there should be a 1:1 correspondence between the qp_type for
a connection and the port space associated with an rdma_cm_id.  Remove
the qp_type from the rdma_cm interface.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
This is a new patch, and is not part of svn.  The qp_type isn't needed
given the port space type, and removal make the userspace interface
a little cleaner.

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index b9ba68d..1028548 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -132,7 +132,6 @@ struct rdma_id_private {
 
 	u32			seq_num;
 	u32			qp_num;
-	enum ib_qp_type		qp_type;
 	u8			srq;
 };
 
@@ -391,7 +390,6 @@ int rdma_create_qp(struct rdma_cm_id *id
 
 	id->qp = qp;
 	id_priv->qp_num = qp->qp_num;
-	id_priv->qp_type = qp->qp_type;
 	id_priv->srq = (qp->srq != NULL);
 	return 0;
 err:
@@ -1854,7 +1852,7 @@ static int cma_connect_ib(struct rdma_id
 	req.service_id = cma_get_service_id(id_priv->id.ps,
 					    &route->addr.dst_addr);
 	req.qp_num = id_priv->qp_num;
-	req.qp_type = id_priv->qp_type;
+	req.qp_type = IB_QPT_RC;
 	req.starting_psn = id_priv->seq_num;
 	req.responder_resources = conn_param->responder_resources;
 	req.initiator_depth = conn_param->initiator_depth;
@@ -1931,7 +1929,6 @@ int rdma_connect(struct rdma_cm_id *id, 
 
 	if (!id->qp) {
 		id_priv->qp_num = conn_param->qp_num;
-		id_priv->qp_type = conn_param->qp_type;
 		id_priv->srq = conn_param->srq;
 	}
 
@@ -2015,7 +2012,6 @@ int rdma_accept(struct rdma_cm_id *id, s
 
 	if (!id->qp && conn_param) {
 		id_priv->qp_num = conn_param->qp_num;
-		id_priv->qp_type = conn_param->qp_type;
 		id_priv->srq = conn_param->srq;
 	}
 
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h
old mode 100644
new mode 100755
index deb5a0a..4c07f96
--- a/include/rdma/rdma_cm.h
+++ b/include/rdma/rdma_cm.h
@@ -215,7 +215,6 @@ struct rdma_conn_param {
 	/* Fields below ignored if a QP is created on the rdma_cm_id. */
 	u8 srq;
 	u32 qp_num;
-	enum ib_qp_type qp_type;
 };
 
 /**





More information about the general mailing list