You can get hardware max rdma atomic by doing ib_query_qp

CM save the initiator's req->init_depth to its cm_id_priv->responder_resources in cm_req_handler (Win's srp initiator set it at 16)

srpt call ib_cm_init_qp_attr() which will initialize qp_attr->max_dest_rd_atomic = cm_id_priv->responder_resources = 16;

then srpt call ib_modify_qp() without checking/reseting the hw max rdma atomic in qp_attr; therefore, ib_modify_qp() failed

You can try a quick dirty fix by applying this patch to ib_srpt.c

-vu




So the client is requesting a QP with a max rdma_atomic of 15, but the
target initializes the QP with a max of 4. Is this max rdma_atomic of 4
based on hardware capabilities (Memory vs MemFree adapters), or a target
QP initialization preset value? I'll swap adapters if needed.

-----Original Message-----
From: chas williams - CONTRACTOR [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 22, 2007 4:28 AM
To: Sufficool, Stanley
Cc: Vu Pham; Stanley Sufficool; general
Subject: Re: [ofa-general] [PATCH] SRPT for current SCST
In message
<[EMAIL PROTECTED]>,"Su
fficool, Stanley" writes:
I'm still researching where the rdma_atomic is getting the invalid attribute. I will give an update if I find anything else.

srp clients set this value as the responder_resources during login i
believe.  this seems to be done in srp_get_responder_resources() on the
windows srp client.  its taken from the qp attributes instead of picking
a fixed number, like 4 in the linux version of the srp client.

diff --git a/ib_srpt.c b/ib_srpt.c
index c5582b8..e6764c8 100644
--- a/ib_srpt.c
+++ b/ib_srpt.c
@@ -662,6 +662,11 @@ static int srpt_ch_qp_rtr_rts(struct srpt_rdma_ch *ch, struct ib_qp *qp,
 	if (ret)
 		goto out;
 
+	if (qp_state == IB_QPS_RTR)
+		qp_attr->max_dest_rd_atomic = 4;
+	else
+		qp_attr->max_rd_atomic = 4;
+
 	ret = ib_modify_qp(qp, qp_attr, attr_mask);
 
       out:
@@ -1447,13 +1452,8 @@ static int srpt_cm_req_recv(struct ib_cm_id *cm_id,
 	rep_param->failover_accepted = 0;
 	rep_param->srq = 1;
 
-	rep_param->responder_resources =
-	    param->initiator_depth && param->initiator_depth < 16 ?
-	    param->initiator_depth : 4;
-
-	rep_param->initiator_depth =
-	    param->responder_resources && param->responder_resources < 16 ?
-	    param->responder_resources : 4;
+	rep_param->responder_resources = 4;
+	rep_param->initiator_depth = 4;
 
 	ret = ib_send_cm_rep(cm_id, rep_param);
 	if (ret)
_______________________________________________
general mailing list
[email protected]
http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to