[openib-general] [PATCH] for 2.6.20 rdma/cm: remove setting local write as part of QP access flags

Sean Hefty sean.hefty at intel.com
Tue Oct 24 13:35:27 PDT 2006


From: Dotan Barak <dotanb at mellanox.co.il>

The qp_access_flags are for remote access permissions only,
so local write is an invalid value.

Signed-off-by: Dotan Barak <dotanb at mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
Current drivers appear to ignore this flag being set when the QP is
modified to INIT, but for correctness, it should not be there.

diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c
index 25b1018..1cf0d42 100644
--- a/drivers/infiniband/core/cm.c
+++ b/drivers/infiniband/core/cm.c
@@ -3173,8 +3173,7 @@ static int cm_init_qp_init_attr(struct c
 	case IB_CM_ESTABLISHED:
 		*qp_attr_mask = IB_QP_STATE | IB_QP_ACCESS_FLAGS |
 				IB_QP_PKEY_INDEX | IB_QP_PORT;
-		qp_attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE |
-					   IB_ACCESS_REMOTE_WRITE;
+		qp_attr->qp_access_flags = IB_ACCESS_REMOTE_WRITE;
 		if (cm_id_priv->responder_resources)
 			qp_attr->qp_access_flags |= IB_ACCESS_REMOTE_READ |
 						    IB_ACCESS_REMOTE_ATOMIC;
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index d8ca3c1..2b4748e 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -343,7 +343,7 @@ static int cma_init_ib_qp(struct rdma_id
 		return ret;
 
 	qp_attr.qp_state = IB_QPS_INIT;
-	qp_attr.qp_access_flags = IB_ACCESS_LOCAL_WRITE;
+	qp_attr.qp_access_flags = 0;
 	qp_attr.port_num = id_priv->id.port_num;
 	return ib_modify_qp(qp, &qp_attr, IB_QP_STATE | IB_QP_ACCESS_FLAGS |
 					  IB_QP_PKEY_INDEX | IB_QP_PORT);





More information about the general mailing list