[ofa-general] [PATCH 2/3] opensm: adding missing comparison by to_lid/from_lid in LinkRecord processing
Yevgeny Kliteynik
kliteyn at dev.mellanox.co.il
Sun Dec 2 04:15:23 PST 2007
Comparison for IB_LR_COMPMASK_FROM_LID/IB_LR_COMPMASK_TO_LID
component mask bits was missing in LinkRecord processing.
Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
opensm/opensm/osm_sa_link_record.c | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/opensm/opensm/osm_sa_link_record.c b/opensm/opensm/osm_sa_link_record.c
index ba52aea..0970ad7 100644
--- a/opensm/opensm/osm_sa_link_record.c
+++ b/opensm/opensm/osm_sa_link_record.c
@@ -256,6 +256,17 @@ __osm_lr_rcv_get_physp_link(IN osm_lr_rcv_t * const p_rcv,
if (dest_port_num != p_lr->to_port_num)
goto Exit;
+ __get_base_lid(p_src_physp, &from_base_lid);
+ __get_base_lid(p_dest_physp, &to_base_lid);
+
+ if (comp_mask & IB_LR_COMPMASK_FROM_LID)
+ if (from_base_lid != p_lr->from_lid)
+ goto Exit;
+
+ if (comp_mask & IB_LR_COMPMASK_TO_LID)
+ if (to_base_lid != p_lr->to_lid)
+ goto Exit;
+
if (osm_log_is_active(p_rcv->p_log, OSM_LOG_DEBUG))
osm_log(p_rcv->p_log, OSM_LOG_DEBUG,
"__osm_lr_rcv_get_physp_link: "
@@ -267,8 +278,6 @@ __osm_lr_rcv_get_physp_link(IN osm_lr_rcv_t * const p_rcv,
cl_ntoh64(osm_physp_get_port_guid(p_dest_physp)),
dest_port_num);
- __get_base_lid(p_src_physp, &from_base_lid);
- __get_base_lid(p_dest_physp, &to_base_lid);
__osm_lr_rcv_build_physp_link(p_rcv, from_base_lid,
to_base_lid, src_port_num,
--
1.5.1.4
More information about the general
mailing list