<div><br><br> </div>
<div class="gmail_quote">On Wed, Aug 12, 2009 at 5:03 AM, Sasha Khapyorsky <span dir="ltr"><<a href="mailto:sashak@voltaire.com" target="_blank">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>On 09:43 Fri 07 Aug     , Hal Rosenstock wrote:<br>><br>> so use TRUE/FALSE rather than IB_INVALID_PARMETER<br>><br>> Signed-off-by: Hal Rosenstock <<a href="mailto:hal.rosenstock@gmail.com" target="_blank">hal.rosenstock@gmail.com</a>><br>
> ---<br>> diff --git a/opensm/opensm/osm_mcast_tbl.c b/opensm/opensm/osm_mcast_tbl.c<br>> index 82850be..38c06c1 100644<br>> --- a/opensm/opensm/osm_mcast_tbl.c<br>> +++ b/opensm/opensm/osm_mcast_tbl.c<br>
> @@ -273,7 +273,7 @@ osm_mcast_tbl_get_block(IN osm_mcast_tbl_t * const p_tbl,<br>>       mlid_start_ho = (uint16_t) (block_num * IB_MCAST_BLOCK_SIZE);<br>><br>>       if (mlid_start_ho + IB_MCAST_BLOCK_SIZE - 1 > p_tbl->max_mlid_ho)<br>
> -             return (IB_INVALID_PARAMETER);<br>> +             return (TRUE);<br><br></div>In this case p_block array is not initialized, so just returning 'TRUE'<br>is not a good idea.</blockquote>
<div> </div>
<div>That's how it's handled now in the code.</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span></span><br><br>Actually if we are hitting this case it can indicate an inconsistent<br>mcast_tbl initialization</blockquote>

<div> </div>
<div>That's one possibility. The other would be a SA query for a specific block that is not validated first.</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span></span>- I would suggest to rework this part and likely to drop this check at all.</blockquote>
<div> </div>
<div>Dropping it should be OK as long as all callers validate prior to calling (and it looks like they do).</div>
<div> </div>
<div>-- Hal</div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><span></span><br><font color="#888888"><br>Sasha<br></font>
<div>
<div></div>
<div>_______________________________________________<br>general mailing list<br><a href="mailto:general@lists.openfabrics.org" target="_blank">general@lists.openfabrics.org</a><br><a href="http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general" target="_blank">http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general</a><br>
<br>To unsubscribe, please visit <a href="http://openib.org/mailman/listinfo/openib-general" target="_blank">http://openib.org/mailman/listinfo/openib-general</a><br></div></div></blockquote></div><br>