[openib-general] [PATCH] Opensm - duplicated guids handling - new

Yael Kalka yael at mellanox.co.il
Sun Jan 22 00:26:12 PST 2006


Hi Hal,

Here is a patch using O_NONBLOCK instead of the static variable.

Thanks,
Yael


Signed-off-by:  Yael Kalka <yael at mellanox.co.il>

Index: libvendor/osm_vendor_ibumad.c
===================================================================
--- libvendor/osm_vendor_ibumad.c       (revision 4951)
+++ libvendor/osm_vendor_ibumad.c       (working copy)
@@ -1146,7 +1146,7 @@ osm_vendor_set_sm(
        OSM_LOG_ENTER( p_vend->p_log, osm_vendor_set_sm );
        sprintf(issmstring, "/dev/infiniband/issm%d", p_vend->umad_port_id);
        if (TRUE == is_sm_val) {
-               p_vend->issmfd = open(issmstring, 0);
+     p_vend->issmfd = open(issmstring, O_NONBLOCK);
                if (p_vend->issmfd < 0) {
                        osm_log(p_vend->p_log, OSM_LOG_ERROR,
                                "osm_vendor_set_sm: ERR 5431: "
Index: opensm/osm_node_info_rcv.c
===================================================================
--- opensm/osm_node_info_rcv.c  (revision 4951)
+++ opensm/osm_node_info_rcv.c  (working copy)
@@ -229,6 +229,14 @@ __osm_ni_rcv_set_links(
               osm_dump_dr_path(p_rcv->p_log,
                                osm_physp_get_dr_path_ptr(p_physp),
                                OSM_LOG_ERROR);
+
+            osm_log( p_rcv->p_log, OSM_LOG_SYS,
+                     "Errors on subnet. Duplicate GUID found "
+                     "by link from a port to itself. "
+                     "See osm log for more details\n");
+
+            if ( p_rcv->p_subn->opt.exit_on_fatal == TRUE )
+              exit( 1 );
           }
           else
           {




More information about the general mailing list