[ofa-general] [PATCH] opensm/osm_state_mgr.c: small bug in scanning lid table
Yevgeny Kliteynik
kliteyn at dev.mellanox.co.il
Thu Feb 12 07:01:22 PST 2009
Hi Sasha,
ref_size and curr_size return the size of the array,
which counts LIDs from 0, so max_lid will be out of
actual LIDs that are used.
Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
opensm/opensm/osm_state_mgr.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/opensm/opensm/osm_state_mgr.c b/opensm/opensm/osm_state_mgr.c
index f5d3837..0a27044 100644
--- a/opensm/opensm/osm_state_mgr.c
+++ b/opensm/opensm/osm_state_mgr.c
@@ -932,7 +932,7 @@ static void __osm_state_mgr_check_tbl_consistency(IN osm_sm_t * sm)
/* They should be the same, but compare it anyway */
max_lid = (ref_size > curr_size) ? ref_size : curr_size;
- for (lid = 1; lid <= max_lid; lid++) {
+ for (lid = 1; lid < max_lid; lid++) {
p_port_ref = NULL;
p_port_stored = NULL;
cl_ptr_vector_at(p_port_lid_tbl, lid, (void *)&p_port_stored);
@@ -1006,7 +1006,7 @@ static void cleanup_switch(cl_map_item_t *item, void *log)
if (!sw->new_lft)
return;
-
+
if (memcmp(sw->lft, sw->new_lft, IB_LID_UCAST_END_HO + 1))
osm_log(log, OSM_LOG_ERROR, "ERR 331D: "
"LFT of switch 0x%016" PRIx64 " is not up to date.\n",
--
1.5.1.4
More information about the general
mailing list