On Thu, Mar 5, 2009 at 9:40 AM, Eli Dorfman (Voltaire) <[email protected]> wrote: > - Show quoted text - > Hal Rosenstock wrote: >> On Thu, Mar 5, 2009 at 7:59 AM, Eli Dorfman (Voltaire) >> <[email protected]> wrote: >>> fix local port smlid >>> >>> when opensm goes from master to standby due to handover its local >>> port smlid will be wrong (equal to its own lid). >>> the new master opensm will change smlid only after local sm >>> (previous master) is in standby and will not query its port again. >>> >>> Signed-off-by: Eli Dorfman <[email protected]> >>> --- >>> opensm/opensm/osm_req.c | 15 +++++++++++++++ >>> 1 files changed, 15 insertions(+), 0 deletions(-) >>> >>> diff --git a/opensm/opensm/osm_req.c b/opensm/opensm/osm_req.c >>> index 0865ce5..df138d7 100644 >>> --- a/opensm/opensm/osm_req.c >>> +++ b/opensm/opensm/osm_req.c >>> @@ -217,6 +217,7 @@ int osm_send_trap144(osm_sm_t *sm, ib_net16_t local) >>> ib_smp_t *smp; >>> ib_mad_notice_attr_t *ntc; >>> osm_port_t *port; >>> + osm_port_t *smport; >>> ib_port_info_t *pi; >>> >>> port = osm_get_port_by_guid(sm->p_subn, sm->p_subn->sm_port_guid); >>> @@ -229,6 +230,20 @@ int osm_send_trap144(osm_sm_t *sm, ib_net16_t local) >>> >>> pi = &port->p_physp->port_info; >>> >>> + smport = osm_get_port_by_guid(sm->p_subn, sm->master_sm_guid); >>> + if (!port) { >> >> smport ? >> > > meaning master sm port.
Should the check be if (!smport) rather than if (!port) there ? >>> + OSM_LOG(sm->p_log, OSM_LOG_ERROR, >>> + "ERR 1104: cannot find SM port by guid 0x%" PRIx64 >>> "\n", >> >> nit: 1104 is already used. >> > should i just pick a free number or there is some rules about error numbers? A free number within the module's range (e.g. 1106 or 1103 look like they would work). > - Show quoted text - >> -- Hal >> >>> + cl_ntoh64(sm->master_sm_guid)); >>> + return -1; >>> + } >>> + >>> + /* update local port's smlid - since we may have */ >>> + /* wrong value in local portinfo */ >>> + /* this may happen when we move to standby and master updates */ >>> + /* out smlid but we will not query it */ >>> + pi->master_sm_base_lid = >>> smport->p_physp->port_info.master_sm_base_lid; >>> + >>> /* don't bother with sending trap when SMA supports this */ >>> if (!local && >>> >>> pi->capability_mask&(IB_PORT_CAP_HAS_TRAP|IB_PORT_CAP_HAS_CAP_NTC)) >>> -- >>> 1.5.5 >>> >>> _______________________________________________ >>> general mailing list >>> [email protected] >>> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general >>> >>> To unsubscribe, please visit >>> http://openib.org/mailman/listinfo/openib-general >>> > > _______________________________________________ general mailing list [email protected] http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
