[openib-general] [PATCH] ib_smi: Check node type against switch rather than not CA

Hal Rosenstock halr at voltaire.com
Tue Oct 12 06:34:50 PDT 2004


ib_smi: Check node type against switch rather than not CA 
(handles router case as well, in case this happens)

Index: ib_smi.c
===================================================================
--- ib_smi.c	(revision 970)
+++ ib_smi.c	(working copy)
@@ -73,7 +73,7 @@
 		if (hop_ptr == hop_cnt) {
 			/* smp->return_path set when received */
 			smp->hop_ptr++;
-			return (mad_agent->device->node_type != IB_NODE_CA ||
+			return (mad_agent->device->node_type == IB_NODE_SWITCH ||
 				smp->dr_dlid == IB_LID_PERMISSIVE);
 		}
 
@@ -178,7 +178,7 @@
 				smp->return_path[hop_ptr] = mad_agent->port_num;
 			/* smp->hop_ptr updated when sending */
 
-			return (mad_agent->device->node_type != IB_NODE_CA ||
+			return (mad_agent->device->node_type == IB_NODE_SWITCH ||
 				smp->dr_dlid == IB_LID_PERMISSIVE);
 		}
 		
@@ -210,7 +210,7 @@
 				return 1;
 			}
 			/* smp->hop_ptr updated when sending */
-			return (mad_agent->device->node_type != IB_NODE_CA);
+			return (mad_agent->device->node_type == IB_NODE_SWITCH);
 		}
 
 		/* C14-13:4 -- hop_ptr = 0 -> give to SM. */






More information about the general mailing list