<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2654.45">
<TITLE>Complib changes to support OpenSM in OpenIB</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>Fab</FONT>
</P>

<P><FONT SIZE=2>While porting OpenSM to IBAL environment we encounter few problems </FONT>
<BR><FONT SIZE=2>In the past I sent you few patches but notice that most of them you did not commit</FONT>
<BR><FONT SIZE=2>I would appreciate if you review them again and find the time to commit them in.</FONT>
<BR><FONT SIZE=2>We want to be able to run OpenSM over OpenIB code.</FONT>
<BR><FONT SIZE=2>I will list the changes that I recall:</FONT>
</P>

<P><FONT SIZE=2>1. cl_timers:</FONT>
<BR>        <FONT SIZE=2>a. </FONT>
<BR>        <FONT SIZE=2>we tried to call cl_timer_start from within the timer call back, and the thread enter to deadlock . We notice that cl_timer_star call   to cl_timer_stop which call to DeleteTimerQueueTimer with INVALI_HANDLE which cause it to wait to all the callbacks to finish. </FONT></P>

<P>        <FONT SIZE=2>Msdn:"...If this parameter is INVALID_HANDLE_VALUE, the function waits for the timer callback function to complete before returning.    " So if we call it within the timer callback we cause deadlock.</FONT></P>

<P>        
</P>

<P>        <FONT SIZE=2>The kernel implementation of cl_timer_start does not call cl_timer_stop why ?( I am not sure that in the Kernel one can be sure that    he want get more DPCs)</FONT></P>

<P>        <FONT SIZE=2>Solution to this problem is to add cl_timer_strat_cb function that wont call to timer stop and be able to call </FONT>
<BR><FONT SIZE=2>      from within the callback</FONT>
</P>

<P>        <FONT SIZE=2>b.</FONT>
<BR>        <FONT SIZE=2>I added few function for timers in order to add our perf_main tool To OpenIB</FONT>
<BR>        <FONT SIZE=2>it include</FONT>
<BR>        <FONT SIZE=2>cl_get_time_staamp_usec</FONT>
<BR>        <FONT SIZE=2>cl_get_time_staamp_nsec</FONT>
<BR>        <FONT SIZE=2>cl_get_frequancy</FONT>
<BR>        <FONT SIZE=2>I can send patch to that.</FONT>
</P>

<P><FONT SIZE=2>2. cl_is_debug function - I send you patch for that , currently Linux version of OpenSM use it so we need it in our complib as well</FONT></P>

<P>        <FONT SIZE=2>I don't think its too risky</FONT>
</P>

<P><FONT SIZE=2>3. cl_qlock_pool.c - as Eitan said we need it in OpenSM for know and he will change the code to work with external locks</FONT></P>

<P><FONT SIZE=2>4. Not related to the OpenSM  but I also sent patch for IB_COMPANY_NAME env variable for installsp.exe can you apply it and I will also change the ics_ver.h file</FONT></P>
<BR>

<P><FONT SIZE=2>I think that for most of the things I already sent patches, If not just tell me.</FONT>
<BR><FONT SIZE=2>We really appreciate if you can apply the patches so we can move forward to add OpenSM</FONT>
</P>

<P><FONT SIZE=2>- We intend to merge OpenSM ib_types.h to ibal ib_types.h but it takes time , mean while we create copy of ib_types locally for OpenSM </FONT></P>

<P><FONT SIZE=2>10x</FONT>
<BR><FONT SIZE=2>Yossi </FONT>
</P>

</BODY>
</HTML>