<br><br>
<div class="gmail_quote">On Mon, Sep 21, 2009 at 8:59 AM, Sasha Khapyorsky <span dir="ltr"><<a href="mailto:sashak@voltaire.com">sashak@voltaire.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div></div>
<div class="h5">On 10:31 Wed 02 Sep     , Hal Rosenstock wrote:<br>><br>> Add support for SwitchInfo:MulticastFDBTop<br>> Added by MgtWG errata #4505-4508<br>> Also, per MgtWG RefID #4640, MulticastFDBTop value of 0xbfff means no entries<br>
><br>> In osm_mcast_mgr.c:mcast_mgr_set_mftables call new routine<br>> mcast_mgr_set_mfttop to set MulticastFDBTop in SwitchInfo<br>> based on max_block_in_use when switch port 0 indicates<br>> IsMulticastFDBTop is supported.<br>
><br>> Signed-off-by: Hal Rosenstock <<a href="mailto:hal.rosenstock@gmail.com">hal.rosenstock@gmail.com</a>><br>> ---<br>> diff --git a/opensm/opensm/osm_mcast_mgr.c b/opensm/opensm/osm_mcast_mgr.c<br>> index d7c5ce1..3671e08 100644<br>
> --- a/opensm/opensm/osm_mcast_mgr.c<br>> +++ b/opensm/opensm/osm_mcast_mgr.c<br>> @@ -1066,6 +1066,83 @@ Exit:<br>><br>>  /**********************************************************************<br>>   **********************************************************************/<br>
> +static void mcast_mgr_set_mfttop(IN osm_sm_t * sm, IN osm_switch_t * p_sw)<br>> +{<br>> +     osm_node_t *p_node;<br>> +     osm_dr_path_t *p_path;<br>> +     osm_physp_t *p_physp;<br>> +     osm_mcast_tbl_t *p_tbl;<br>
> +     osm_madw_context_t context;<br>> +     ib_api_status_t status;<br>> +     ib_switch_info_t si;<br>> +     boolean_t set_swinfo_require = FALSE;<br>> +     uint16_t mcast_top;<br>> +     uint8_t life_state;<br>
> +<br>> +     OSM_LOG_ENTER(sm->p_log);<br>> +<br>> +     CL_ASSERT(p_sw);<br>> +<br>> +     p_node = p_sw->p_node;<br>> +<br>> +     CL_ASSERT(p_node);<br>> +<br>> +     p_physp = osm_node_get_physp_ptr(p_node, 0);<br>
> +     p_path = osm_physp_get_dr_path_ptr(p_physp);<br>> +     p_tbl = osm_switch_get_mcast_tbl_ptr(p_sw);<br>> +<br>> +     if (p_physp->port_info.capability_mask & IB_PORT_CAP_HAS_MCAST_FDB_TOP) {<br>
<br></div></div>BTW any reason why this capability bit if placed in PortInfo and not in<br>SwitchInfo (it is not port but switch related feature)?</blockquote>
<div> </div>
<div>I don't recall.</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im"><br>> +             /*<br>> +                Set the top of the multicast forwarding table.<br>> +              */<br>> +             si = p_sw->switch_info;<br>> +             if (p_tbl->max_block_in_use == -1)<br>
> +                     mcast_top = cl_hton16(IB_LID_MCAST_START_HO - 1);<br>> +             else<br>> +                     mcast_top = cl_hton16(IB_LID_MCAST_START_HO +<br>> +                                           (p_tbl->max_block_in_use + 1) * IB_MCAST_BLOCK_SIZE - 1);<br>
> +             if (mcast_top != si.mcast_top) {<br>> +                     set_swinfo_require = TRUE;<br>> +                     si.mcast_top = mcast_top;<br>> +             }<br>> +<br>> +             /* check to see if the change state bit is on. If it is - then<br>
> +                we need to clear it. */<br>> +             if (ib_switch_info_get_state_change(&si))<br>> +                     life_state = ((sm->p_subn->opt.packet_life_time << 3)<br>> +                                   | (si.life_state & IB_SWITCH_PSC)) & 0xfc;<br>
> +             else<br>> +                     life_state = (sm->p_subn->opt.packet_life_time << 3) & 0xf8;<br>> +<br>> +             if (life_state != si.life_state ||<br>> +                 ib_switch_info_get_state_change(&si)) {<br>
> +                     set_swinfo_require = TRUE;<br>> +                     si.life_state = life_state;<br>> +             }<br><br></div>Switch's StateChange and LifeState are handled when unicast routing is<br>
configured. Why do we need duplicate it here?<br></blockquote>
<div> </div>
<div>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.</div>
<div> </div>
<div>-- Hal</div></div>