[openib-general] [PATCH] Add CM reject code 25 (Port and CM redirection)

Sean Hefty sean.hefty at intel.com
Thu Jul 28 12:02:12 PDT 2005


Patch to add CM reject code 25 as pointed out by Roland.

Roland, can you please verify that SRP changes look right?

Signed-off-by: Sean Hefty <sean.hefty at intel.com>


Index: src/userspace/libibcm/include/infiniband/cm.h
===================================================================
--- src/userspace/libibcm/include/infiniband/cm.h	(revision 2915)
+++ src/userspace/libibcm/include/infiniband/cm.h	(working copy)
@@ -137,7 +137,8 @@ enum ib_cm_rej_reason {
 	IB_CM_REJ_INVALID_ALT_TRAFFIC_CLASS	= 21,
 	IB_CM_REJ_INVALID_ALT_HOP_LIMIT		= 22,
 	IB_CM_REJ_INVALID_ALT_PACKET_RATE	= 23,
-	IB_CM_REJ_PORT_REDIRECT			= 24,
+	IB_CM_REJ_PORT_CM_REDIRECT		= 24,
+	IB_CM_REJ_PORT_REDIRECT			= 25,
 	IB_CM_REJ_INVALID_MTU			= 26,
 	IB_CM_REJ_INSUFFICIENT_RESP_RESOURCES	= 27,
 	IB_CM_REJ_CONSUMER_DEFINED		= 28,
Index: src/linux-kernel/infiniband/ulp/srp/ib_srp.c
===================================================================
--- src/linux-kernel/infiniband/ulp/srp/ib_srp.c	(revision 2926)
+++ src/linux-kernel/infiniband/ulp/srp/ib_srp.c	(working copy)
@@ -628,7 +628,7 @@ static int srp_cm_handler(struct ib_cm_i
 		printk(KERN_DEBUG PFX "REJ received\n");
 		comp = 1;
 
-		if (event->param.rej_rcvd.reason == IB_CM_REJ_PORT_REDIRECT) {
+		if (event->param.rej_rcvd.reason == IB_CM_REJ_PORT_CM_REDIRECT) {
 			/*
 			 * Additional Reject Info contains
 			 * ClassPortInfo, which has the RedirectGID
@@ -640,7 +640,7 @@ static int srp_cm_handler(struct ib_cm_i
 			target->status = SRP_PORT_REDIRECT;
 		} else if (topspin_workarounds &&
 			   !memcmp(&target->ioc_guid, topspin_oui, 3) &&
-			   event->param.rej_rcvd.reason == __constant_htons(25)) {
+			   event->param.rej_rcvd.reason == IB_CM_REJ_PORT_REDIRECT) {
 			/*
 			 * Topspin/Cisco SRP gateways incorrectly send
 			 * reject reason code 25 when they mean 24
Index: src/linux-kernel/infiniband/include/ib_cm.h
===================================================================
--- src/linux-kernel/infiniband/include/ib_cm.h	(revision 2928)
+++ src/linux-kernel/infiniband/include/ib_cm.h	(working copy)
@@ -169,7 +169,8 @@ enum ib_cm_rej_reason {
 	IB_CM_REJ_INVALID_ALT_TRAFFIC_CLASS	= 21,
 	IB_CM_REJ_INVALID_ALT_HOP_LIMIT		= 22,
 	IB_CM_REJ_INVALID_ALT_PACKET_RATE	= 23,
-	IB_CM_REJ_PORT_REDIRECT			= 24,
+	IB_CM_REJ_PORT_CM_REDIRECT		= 24,
+	IB_CM_REJ_PORT_REDIRECT			= 25,
 	IB_CM_REJ_INVALID_MTU			= 26,
 	IB_CM_REJ_INSUFFICIENT_RESP_RESOURCES	= 27,
 	IB_CM_REJ_CONSUMER_DEFINED		= 28,






More information about the general mailing list