[ofa-general] Re: [PATCH 2/3] opensm: adding missing comparison by to_lid/from_lid in LinkRecord processing
Hal Rosenstock
hrosenstock at xsigo.com
Mon Dec 3 07:26:56 PST 2007
On Mon, 2007-12-03 at 17:15 +0200, Yevgeny Kliteynik wrote:
> Sasha Khapyorsky wrote:
> > Hi Yevgeny,
> >
> > On 14:15 Sun 02 Dec , Yevgeny Kliteynik wrote:
> >> 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;
> >
> > Would this be correct LMC > 0? As far as I understand aliased (not based)
> > LIDs can be used in a query.
>
> Good catch, thanks.
Note that:
In a query request, any LID of a port can be requested as the ToLID. In
a query response, only the base LID of a port is returned as the ToLID.
-- Hal
>
> -- Yevgeny
>
> > Sasha
> >
> >> +
> >> 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
> >>
> >
>
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
More information about the general
mailing list