[openib-general] [PATCH] OpenSM/osm_sa_lft_record.c: In __osm_lftr_rcv_by_comp_mask, when BlockNum component is wildcarded, fix max_block calculation
Hal Rosenstock
halr at voltaire.com
Thu Dec 28 13:12:18 PST 2006
OpenSM/osm_sa_lft_record.c: In __osm_lftr_rcv_by_comp_mask, when
BlockNum component is wildcarded, fix max_block calculation
Signed-off-by: Hal Rosenstock <halr at voltaire.com>
diff --git a/osm/opensm/osm_sa_lft_record.c b/osm/opensm/osm_sa_lft_record.c
index 7d37074..46bebf2 100644
--- a/osm/opensm/osm_sa_lft_record.c
+++ b/osm/opensm/osm_sa_lft_record.c
@@ -226,7 +226,6 @@ __osm_lftr_rcv_by_comp_mask(
osm_port_t* p_port;
uint16_t min_lid_ho, max_lid_ho;
uint16_t min_block, max_block, block;
- uint16_t lids_per_block;
const osm_physp_t* p_physp;
/* In switches, the port guid is the node guid. */
@@ -283,10 +282,9 @@ __osm_lftr_rcv_by_comp_mask(
}
else
{
- /* use as many blocks as possible */
+ /* use as many blocks as "in use" */
min_block = 0;
- lids_per_block = osm_fwd_tbl_get_lids_per_block( osm_switch_get_fwd_tbl_ptr( p_sw ) );
- max_block = (max_lid_ho + lids_per_block - 1)/lids_per_block;
+ max_block = osm_switch_get_max_block_id_in_use(p_sw);
}
/* so we can add these blocks one by one ... */
More information about the general
mailing list