[openib-general] [PATCH] diags/ibroute: fix double calculated block value
Sasha Khapyorsky
sashak at voltaire.com
Thu Oct 19 06:49:22 PDT 2006
Initial value of LFT block variable was double calculated (first time
as 'startblock' and then block = startblock/BLOCK_SIZE).
Signed-off-by: Sasha Khapyorsky <sashak at voltaire.com>
---
diags/src/ibroute.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/diags/src/ibroute.c b/diags/src/ibroute.c
index 08bdbdf..98f20e0 100644
--- a/diags/src/ibroute.c
+++ b/diags/src/ibroute.c
@@ -352,7 +352,7 @@ #endif
printf(" Port Info \n");
startblock = startlid / IB_SMP_DATA_SIZE;
endblock = ALIGN(endlid, IB_SMP_DATA_SIZE) / IB_SMP_DATA_SIZE;
- for (block = startblock / IB_SMP_DATA_SIZE; block <= endblock; block++) {
+ for (block = startblock; block <= endblock; block++) {
DEBUG("reading block %d", block);
if (!smp_query(lft, portid, IB_ATTR_LINEARFORWTBL, block, 0))
return "linear forwarding table get failed";
--
1.4.2.3.g128e
More information about the general
mailing list