[openib-general] [PATCH] CM ACK timeout fix

Roland Dreier rolandd at cisco.com
Thu Sep 8 12:38:08 PDT 2005


Sean, is the patch below for the CM correct?  Unless I'm mistaken, the
current code always forces the ACK timeout to be 31 (~2 hours).

 - R.

--- infiniband/core/cm.c	(revision 3327)
+++ infiniband/core/cm.c	(working copy)
@@ -814,7 +814,7 @@ static void cm_format_req(struct cm_req_
 	cm_req_set_primary_sl(req_msg, param->primary_path->sl);
 	cm_req_set_primary_subnet_local(req_msg, 1); /* local only... */
 	cm_req_set_primary_local_ack_timeout(req_msg,
-		min(31, param->primary_path->packet_life_time + 1));
+		max(31, param->primary_path->packet_life_time + 1));
 
 	if (param->alternate_path) {
 		req_msg->alt_local_lid = param->alternate_path->slid;
@@ -829,7 +829,7 @@ static void cm_format_req(struct cm_req_
 		cm_req_set_alt_sl(req_msg, param->alternate_path->sl);
 		cm_req_set_alt_subnet_local(req_msg, 1); /* local only... */
 		cm_req_set_alt_local_ack_timeout(req_msg,
-			min(31, param->alternate_path->packet_life_time + 1));
+			max(31, param->alternate_path->packet_life_time + 1));
 	}
 
 	if (param->private_data && param->private_data_len)
@@ -2257,7 +2257,7 @@ static void cm_format_lap(struct cm_lap_
 	cm_lap_set_sl(lap_msg, alternate_path->sl);
 	cm_lap_set_subnet_local(lap_msg, 1); /* local only... */
 	cm_lap_set_local_ack_timeout(lap_msg,
-		min(31, alternate_path->packet_life_time + 1));
+		max(31, alternate_path->packet_life_time + 1));
 
 	if (private_data && private_data_len)
 		memcpy(lap_msg->private_data, private_data, private_data_len);



More information about the general mailing list