ibroute: When multiple paths, indicate port GUID on alternate paths

Signed-off-by: Hal Rosenstock <[EMAIL PROTECTED]>

Index: diags/src/ibroute.c
===================================================================
--- diags/src/ibroute.c (revision 7646)
+++ diags/src/ibroute.c (working copy)
@@ -272,10 +272,22 @@ dump_lid(char *str, int strlen, int lid,
                if (!valid)
                        return snprintf(str, strlen, ": (path #%d - illegal 
port)",
                                        lid - base_port_lid);
-               else
-                       return snprintf(str, strlen, ": (path #%d out of %d)",
-                                       lid - base_port_lid + 1,
-                                       last_port_lid - base_port_lid + 1);
+               else {
+                       lidport.lid = lid;
+                       if (!smp_query(ni, &lidport, IB_ATTR_NODE_INFO, 0, 100))
+                               return snprintf(str, strlen,
+                                               ": (path #%d out of %d)",
+                                               lid - base_port_lid + 1,
+                                               last_port_lid - base_port_lid + 
1);
+                       else {
+                               mad_decode_field(ni, IB_NODE_PORT_GUID_F, 
&portguid);
+                               return snprintf(str, strlen,
+                                               ": (path #%d out of %d: 
portguid %s)",
+                                               lid - base_port_lid + 1,
+                                               last_port_lid - base_port_lid + 
1,
+                                               
mad_dump_val(IB_NODE_PORT_GUID_F, sguid, sizeof sguid, &portguid));
+                       }
+               }
        }
 
        if (!valid)




_______________________________________________
openib-general mailing list
[email protected]
http://openib.org/mailman/listinfo/openib-general

To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general

Reply via email to