[openib-general] Re: Latest CM and retransmissions

Sean Hefty sean.hefty at intel.com
Tue May 24 13:20:37 PDT 2005


Can you apply this patch (applies to the tip) and let me know what,
if any, output you see?

- Sean


Index: cm.c
===================================================================
--- cm.c	(revision 2473)
+++ cm.c	(working copy)
@@ -1862,8 +1862,10 @@ static int cm_drep_handler(struct cm_wor
 	drep_msg = (struct cm_drep_msg *)work->mad_recv_wc->recv_buf.mad;
 	cm_id_priv = cm_acquire_id(drep_msg->remote_comm_id,
 				   drep_msg->local_comm_id);
-	if (!cm_id_priv)
+	if (!cm_id_priv) {
+		printk("cm_drep_handler - could not acquire cm_id\n");
 		return -EINVAL;
+	}
 
 	work->cm_event.private_data = &drep_msg->private_data;
 
@@ -1871,12 +1873,16 @@ static int cm_drep_handler(struct cm_wor
 	if (cm_id_priv->id.state != IB_CM_DREQ_SENT &&
 	    cm_id_priv->id.state != IB_CM_DREQ_RCVD) {
 		spin_unlock_irqrestore(&cm_id_priv->lock, flags);
+		printk("cm_drep_handler - cm_id in invalid state: %d\n",
+		       cm_id_priv->id.state);
 		goto out;
 	}
 	cm_enter_timewait(cm_id_priv);
 
-	ib_cancel_mad(cm_id_priv->av.port->mad_agent,
-		      (unsigned long) cm_id_priv->msg);
+	ret = ib_modify_mad(cm_id_priv->av.port->mad_agent,
+			    (unsigned long) cm_id_priv->msg, 0);
+	if (ret)
+		printk("cm_drep_handler - unable to cancel DREQ\n");
 	ret = atomic_inc_and_test(&cm_id_priv->work_count);
 	if (!ret)
 		list_add_tail(&work->list, &cm_id_priv->work_list);






More information about the general mailing list