On Mon, Sep 21, 2009 at 8:59 AM, Sasha Khapyorsky <[email protected]>wrote:
> On 10:31 Wed 02 Sep , Hal Rosenstock wrote: > > > > Add support for SwitchInfo:MulticastFDBTop > > Added by MgtWG errata #4505-4508 > > Also, per MgtWG RefID #4640, MulticastFDBTop value of 0xbfff means no > entries > > > > In osm_mcast_mgr.c:mcast_mgr_set_mftables call new routine > > mcast_mgr_set_mfttop to set MulticastFDBTop in SwitchInfo > > based on max_block_in_use when switch port 0 indicates > > IsMulticastFDBTop is supported. > > > > Signed-off-by: Hal Rosenstock <[email protected]> > > --- > > diff --git a/opensm/opensm/osm_mcast_mgr.c > b/opensm/opensm/osm_mcast_mgr.c > > index d7c5ce1..3671e08 100644 > > --- a/opensm/opensm/osm_mcast_mgr.c > > +++ b/opensm/opensm/osm_mcast_mgr.c > > @@ -1066,6 +1066,83 @@ Exit: > > > > /********************************************************************** > > **********************************************************************/ > > +static void mcast_mgr_set_mfttop(IN osm_sm_t * sm, IN osm_switch_t * > p_sw) > > +{ > > + osm_node_t *p_node; > > + osm_dr_path_t *p_path; > > + osm_physp_t *p_physp; > > + osm_mcast_tbl_t *p_tbl; > > + osm_madw_context_t context; > > + ib_api_status_t status; > > + ib_switch_info_t si; > > + boolean_t set_swinfo_require = FALSE; > > + uint16_t mcast_top; > > + uint8_t life_state; > > + > > + OSM_LOG_ENTER(sm->p_log); > > + > > + CL_ASSERT(p_sw); > > + > > + p_node = p_sw->p_node; > > + > > + CL_ASSERT(p_node); > > + > > + p_physp = osm_node_get_physp_ptr(p_node, 0); > > + p_path = osm_physp_get_dr_path_ptr(p_physp); > > + p_tbl = osm_switch_get_mcast_tbl_ptr(p_sw); > > + > > + if (p_physp->port_info.capability_mask & > IB_PORT_CAP_HAS_MCAST_FDB_TOP) { > > BTW any reason why this capability bit if placed in PortInfo and not in > SwitchInfo (it is not port but switch related feature)? I don't recall. > > > + /* > > + Set the top of the multicast forwarding table. > > + */ > > + si = p_sw->switch_info; > > + if (p_tbl->max_block_in_use == -1) > > + mcast_top = cl_hton16(IB_LID_MCAST_START_HO - 1); > > + else > > + mcast_top = cl_hton16(IB_LID_MCAST_START_HO + > > + (p_tbl->max_block_in_use + 1) > * IB_MCAST_BLOCK_SIZE - 1); > > + if (mcast_top != si.mcast_top) { > > + set_swinfo_require = TRUE; > > + si.mcast_top = mcast_top; > > + } > > + > > + /* check to see if the change state bit is on. If it is - > then > > + we need to clear it. */ > > + if (ib_switch_info_get_state_change(&si)) > > + life_state = ((sm->p_subn->opt.packet_life_time << > 3) > > + | (si.life_state & IB_SWITCH_PSC)) & > 0xfc; > > + else > > + life_state = (sm->p_subn->opt.packet_life_time << > 3) & 0xf8; > > + > > + if (life_state != si.life_state || > > + ib_switch_info_get_state_change(&si)) { > > + set_swinfo_require = TRUE; > > + si.life_state = life_state; > > + } > > Switch's StateChange and LifeState are handled when unicast routing is > configured. Why do we need duplicate it here? > I thought we could lose a PortStateChange but it looks like just making sure that this bit is 0 on set should be fine. I'll send a revised patch shortly. -- Hal
_______________________________________________ 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
