[ofa-general] [PATCH] infiniband-diags/ibtracert.c: Fix linearcap test in switch_lookup
Hal Rosenstock
hnrose at comcast.net
Mon Jul 20 05:58:47 PDT 2009
Signed-off-by: Hal Rosenstock <hal.rosenstock at gmail.com>
---
diff --git a/infiniband-diags/src/ibtracert.c b/infiniband-diags/src/ibtracert.c
index dc05a29..f1ca310 100644
--- a/infiniband-diags/src/ibtracert.c
+++ b/infiniband-diags/src/ibtracert.c
@@ -160,7 +160,7 @@ switch_lookup(Switch *sw, ib_portid_t *portid, int lid)
mad_decode_field(si, IB_SW_LINEAR_FDB_CAP_F, &sw->linearcap);
mad_decode_field(si, IB_SW_LINEAR_FDB_TOP_F, &sw->linearFDBtop);
- if (lid > sw->linearcap && lid > sw->linearFDBtop)
+ if (lid >= sw->linearcap && lid > sw->linearFDBtop)
return -1;
if (!smp_query_via(fdb, portid, IB_ATTR_LINEARFORWTBL, lid / 64,
More information about the general
mailing list