[openib-general] SRP: [PATCH] Handling DREQ

Ishai Rabinovitz ishai at mellanox.co.il
Mon May 22 05:20:29 PDT 2006


On Fri, May 19, 2006 at 02:54:35AM +0300, Ishai Rabinovitz wrote:
Hi

Fixed the patch a little bit.

> Hi,
> 
> I got "Unhandled CM event 6" (IB_CM_DREQ_ERROR) and "Unhandled CM event 7" 
> (IB_CM_DREQ_RECEIVED).
> 
> So here is a patch that handles these CM events.
> 
> This is an initial patch. Maybe it will be more efficient to initiate a reconnect 
> in case we get IB_CM_DREQ_RECEIVED.  What do you think?
> 
> Signed-off-by: Ishai Rabinovitz <ishai at mellanox.co.il>
> 


Index: last_stable/drivers/infiniband/ulp/srp/ib_srp.c
===================================================================
--- last_stable.orig/drivers/infiniband/ulp/srp/ib_srp.c	2006-05-21 18:19:58.000000000 +0300
+++ last_stable/drivers/infiniband/ulp/srp/ib_srp.c	2006-05-22 09:32:00.000000000 +0300
@@ -1217,6 +1217,20 @@ static int srp_cm_handler(struct ib_cm_i
 		target->status = 0;
 		break;
 
+	case IB_CM_DREQ_ERROR:
+		printk(KERN_ERR PFX
+		       "IB_CM_DREQ_ERROR received - connection closed\n");
+		/* no need to set comp - there will be a TIMEWAIT_EXIT */
+		break;
+
+	case IB_CM_DREQ_RECEIVED:
+		printk(KERN_WARNING PFX
+		       "IB_CM_DREQ_RECEIVED received - connection closed\n");
+		if (ib_send_cm_drep(cm_id, NULL, 0))
+			printk(KERN_ERR PFX "ib_send_cm_drep failed\n");
+		/* no need to set comp - there will be a TIMEWAIT_EXIT */
+		break;
+
 	default:
 		printk(KERN_WARNING PFX "Unhandled CM event %d\n", event->event);
 		break;

-- 
Ishai Rabinovitz



More information about the general mailing list