]> git.openfabrics.org - ~shefty/rdma-win.git/commitdiff
Opensm - client reregistration bit handling
authoreitan <eitan@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 23 Nov 2005 13:10:19 +0000 (13:10 +0000)
committereitan <eitan@ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86>
Wed, 23 Nov 2005 13:10:19 +0000 (13:10 +0000)
Currently when sending mads with PortInfo Set we set client_rereg to
be one if we are in first_time_master_sweep and relevant capability
mask is on). In other cases - we send in client_reregister bit the
data we have saved. If this data is 1 - then we will keep on sending
it.

This patch assures that we send 0 in the client_reregister bit,
unless we specifically want to send 1.

git-svn-id: svn://openib.tc.cornell.edu/gen1@186 ad392aa1-c5ef-ae45-8dd8-e69d62a5ef86

trunk/ulp/opensm/user/opensm/osm_lid_mgr.c

index 46d630d63927b2bf8dd433d017ac6887a70cc6d6..c42ab7d5540f4db85d650f17d138a785227354bd 100644 (file)
@@ -205,7 +205,7 @@ __osm_lid_mgr_validate_db(
         /* check that if the lids define a range - that range is valid
            for the current LMC mask */
         osm_log( p_mgr->p_log, OSM_LOG_ERROR,
-                 "__osm_lid_mgr_validate_db: ERR 0313: " 
+                 "__osm_lid_mgr_validate_db: ERR 0313: "
                  "LID range [0x%x:0x%x] for guid:0x%016" PRIx64
                  " is not aligned acording to mask:0x%04x.\n",
                  min_lid, max_lid, p_item->guid, lmc_mask
@@ -221,7 +221,7 @@ __osm_lid_mgr_validate_db(
               ( cl_ptr_vector_get( &p_mgr->used_lids, lid ) ) )
           {
             osm_log( p_mgr->p_log, OSM_LOG_ERROR,
-                     "__osm_lid_mgr_validate_db: ERR 0314: " 
+                     "__osm_lid_mgr_validate_db: ERR 0314: "
                      "0x%04x for guid:0x%016" PRIx64
                      " was previously used.\n",
                      lid, p_item->guid
@@ -235,9 +235,9 @@ __osm_lid_mgr_validate_db(
       {
         if (osm_db_guid2lid_delete( p_mgr->p_g2l, p_item->guid ))
           osm_log( p_mgr->p_log, OSM_LOG_ERROR,
-                   "__osm_lid_mgr_validate_db: ERR 0315: " 
+                   "__osm_lid_mgr_validate_db: ERR 0315: "
                    "failed to delete entry for guid:0x%016" PRIx64
-                   " .\n",
+                   ".\n",
                    p_item->guid
                    );
       }
@@ -287,7 +287,7 @@ osm_lid_mgr_init(
   if (! p_mgr->p_g2l)
   {
     osm_log( p_mgr->p_log, OSM_LOG_ERROR,
-             "osm_lid_mgr_init: ERR 0316: " 
+             "osm_lid_mgr_init: ERR 0316: "
              "Error initializing Guid-to-Lid persistent database.\n");
     status = IB_ERROR;
     goto Exit;
@@ -302,7 +302,7 @@ osm_lid_mgr_init(
     if (osm_db_restore(p_mgr->p_g2l))
     {
       osm_log( p_mgr->p_log, OSM_LOG_ERROR,
-               "osm_lid_mgr_init: ERR 0317: " 
+               "osm_lid_mgr_init: ERR 0317: "
                "Error restoring Guid-to-Lid persistent database.\n");
       status = IB_ERROR;
       goto Exit;
@@ -348,7 +348,7 @@ __osm_lid_mgr_init_sweep(
   uint8_t              lmc_num_lids = (uint8_t)(1 << p_mgr->p_subn->opt.lmc);
   uint16_t             lmc_mask;
   uint16_t             req_lid, num_lids;
-  
+
   OSM_LOG_ENTER( p_mgr->p_log, __osm_lid_mgr_init_sweep );
 
   if (p_mgr->p_subn->opt.lmc)
@@ -356,7 +356,7 @@ __osm_lid_mgr_init_sweep(
   else
     lmc_mask = 0xffff;
 
-  /* if we came out of standby we need to discard any previous guid 2 lid
+  /* if we came out of standby we need to discard any previous guid2lid
      info we might have */
   if ( p_mgr->p_subn->coming_out_of_standby == TRUE )
   {
@@ -377,8 +377,8 @@ __osm_lid_mgr_init_sweep(
   for (lid = 0; lid < cl_ptr_vector_get_size(p_discovered_vec); lid++)
     cl_ptr_vector_set(p_discovered_vec, lid, NULL);
 
-  /* we if are in the first sweep and in re-assign lids mode 
-     we should ignore all the available info and simply define one 
+  /* we if are in the first sweep and in re-assign lids mode
+     we should ignore all the available info and simply define one
      huge empty range */
   if ((p_mgr->p_subn->first_time_master_sweep == TRUE) &&
       (p_mgr->p_subn->opt.reassign_lids == TRUE ))
@@ -421,7 +421,7 @@ __osm_lid_mgr_init_sweep(
         osm_log( p_mgr->p_log, OSM_LOG_DEBUG,
                  "__osm_lid_mgr_init_sweep: "
                  "Cleaning persistent entry for guid:0x%016" PRIx64
-                 " illegal range:[0x%x:0x%x] \n",
+                 " illegal range:[0x%x:0x%x]\n",
                  cl_ntoh64(osm_port_get_guid(p_port)), db_min_lid,
                  db_max_lid );
         osm_db_guid2lid_delete( p_mgr->p_g2l,
@@ -436,8 +436,8 @@ __osm_lid_mgr_init_sweep(
      Our task is to find free lid ranges.
      A lid can be used if
      1. a persistent assignment exists
-     2. the lid is used by a discovered port that does not have a persistent 
-     assignment.
+     2. the lid is used by a discovered port that does not have a persistent
+        assignment.
      
      scan through all lid values of both the persistent table and
      discovered table. 
@@ -482,13 +482,13 @@ __osm_lid_mgr_init_sweep(
         /* we have a port. Now lets see if we can preserve its lid range. */
         /* For that - we need to make sure:
            1. The port has a (legal) persistency entry. Then the local lid
-           is free (we will use the persistency value).
+              is free (we will use the persistency value).
            2. Can the port keep its local assignment?
-           a. Make sure the lid a aligned.
-           b. Make sure all needed lids (for the lmc) are free according
-           to persistency table.
+              a. Make sure the lid a aligned.
+              b. Make sure all needed lids (for the lmc) are free according
+                 to persistency table.
         */
-        /* qualify the guid of the port is not persistently mapped to 
+        /* qualify the guid of the port is not persistently mapped to
            another range */
         if (!osm_db_guid2lid_get( p_mgr->p_g2l,
                                   cl_ntoh64(osm_port_get_guid(p_port)),
@@ -1143,6 +1143,8 @@ __osm_lid_mgr_set_physp_pi(
   if ( ( p_mgr->p_subn->first_time_master_sweep == TRUE ) &&
        ( (p_old_pi->capability_mask & IB_PORT_CAP_HAS_CLIENT_REREG) != 0 ) )
     ib_port_info_set_client_rereg( p_pi, 1 );
+  else
+    ib_port_info_set_client_rereg( p_pi, 0 );
 
   /* We need to send the PortInfoSet request with the new sm_lid
      in the following cases: