[openib-general] [PATCH] osm_switch.c : bug fix
Ofer Gigi
oferg at mellanox.co.il
Mon May 1 01:33:10 PDT 2006
Hi Hal,
Bug fix:
In the function osm_switch_get_fwd_tbl_block in osm_switch.c we were
missing one block in case the maximum lid was the multiplication of
lids_per_block (==64).
Adding <= instead of < to fix the problem.
Please apply to trunk and branch.
Thanks
Ofer G.
Signed-off-by: Ofer Gigi <oferg at mellanox.co.il>
Index: osm_switch.c
===================================================================
--- osm_switch.c (revision 6640)
+++ osm_switch.c (working copy)
@@ -191,7 +191,7 @@ osm_switch_get_fwd_tbl_block(
lids_per_block = osm_fwd_tbl_get_lids_per_block( &p_sw->fwd_tbl );
base_lid_ho = (uint16_t)(block_id * lids_per_block);
- if( base_lid_ho < max_lid_ho )
+ if( base_lid_ho <= max_lid_ho )
{
cl_memclr( p_block, IB_SMP_DATA_SIZE );
/*
More information about the general
mailing list