<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">


<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 10">
<meta name=Originator content="Microsoft Word 10">
<link rel=File-List href="cid:filelist.xml@01C7230D.A0677430">
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="Street"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="country-region"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PostalCode"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="City"/>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="address"/>
<!--[if gte mso 9]><xml>
 <o:OfficeDocumentSettings>
  <o:DoNotRelyOnCSS/>
 </o:OfficeDocumentSettings>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <w:WordDocument>
  <w:DontDisplayPageBoundaries/>
  <w:SpellingState>Clean</w:SpellingState>
  <w:DocumentKind>DocumentEmail</w:DocumentKind>
  <w:EnvelopeVis/>
  <w:Compatibility>
   <w:BreakWrappedTables/>
   <w:SnapToGridInCell/>
   <w:ApplyBreakingRules/>
   <w:WrapTextWithPunct/>
   <w:UseAsianBreakRules/>
  </w:Compatibility>
  <w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel>
 </w:WordDocument>
</xml><![endif]--><!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;
        mso-font-charset:2;
        mso-generic-font-family:auto;
        mso-font-pitch:variable;
        mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:1627421319 -2147483648 8 0 66047 0;}
@font-face
        {font-family:"Century Gothic";
        panose-1:2 11 5 2 2 2 2 2 2 4;
        mso-font-charset:0;
        mso-generic-font-family:swiss;
        mso-font-pitch:variable;
        mso-font-signature:647 0 0 0 159 0;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {mso-style-parent:"";
        margin:0cm;
        margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:12.0pt;
        font-family:"Times New Roman";
        mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;
        text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;
        text-underline:single;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        mso-style-noshow:yes;
        mso-ansi-font-size:10.0pt;
        mso-bidi-font-size:10.0pt;
        font-family:Arial;
        mso-ascii-font-family:Arial;
        mso-hansi-font-family:Arial;
        mso-bidi-font-family:Arial;
        color:windowtext;}
span.SpellE
        {mso-style-name:"";
        mso-spl-e:yes;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;
        mso-header-margin:36.0pt;
        mso-footer-margin:36.0pt;
        mso-paper-source:0;}
div.Section1
        {page:Section1;}
 /* List Definitions */
 @list l0
        {mso-list-id:1339842610;
        mso-list-type:hybrid;
        mso-list-template-ids:1710538076 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:\F0B7;
        mso-level-tab-stop:36.0pt;
        mso-level-number-position:left;
        text-indent:-18.0pt;
        font-family:Symbol;}
ol
        {margin-bottom:0cm;}
ul
        {margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 10]>
<style>
 /* Style Definitions */ 
 table.MsoNormalTable
        {mso-style-name:"Table Normal";
        mso-tstyle-rowband-size:0;
        mso-tstyle-colband-size:0;
        mso-style-noshow:yes;
        mso-style-parent:"";
        mso-padding-alt:0cm 5.4pt 0cm 5.4pt;
        mso-para-margin:0cm;
        mso-para-margin-bottom:.0001pt;
        mso-pagination:widow-orphan;
        font-size:10.0pt;
        font-family:"Times New Roman";}
</style>
<![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple style='tab-interval:36.0pt'>

<div class=Section1>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Hi Hal.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>I have a
question about some patch that I want to send regarding lid matrices usage in
osm ucast<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>manager:<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>The FatTree
routing doesn’t use the min hop tables, so we can skip the lid matrices
building in OSM.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>However, ucast
manager uses these lid matrices also to get the max lid that is accessible from
each<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>switch, which
defines the LTF table size.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>This max lid
is obtained by calling osm_switch_get_max_lid_ho() function, which in turn,
calls <o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>osm_lid_matrix_get_max_lid_ho()
for the switch’s lid matrix.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>If the lid
matrices weren’t built, then the <span
style='mso-spacerun:yes'> </span>osm_switch_get_max_lid_ho() function will
return 0xFFFF,<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>and
eventually osm will crash.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Of course, I
don’t want to build all the lid matrices just to know the max lid, so
here’s what I’ve done:<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<ul style='mso-margin-top-alt:0cm' type=disc>
 <li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;
     mso-layout-grid-align:none;text-autospace:none'><font size=2 face=Arial><span
     style='font-size:10.0pt;font-family:Arial'>I added a field to the osm_switch_t
     object: max_lid_ho (with default value 0xFFFF, should it <br>
     be 0x0 instead?).<o:p></o:p></span></font></li>
 <li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;
     mso-layout-grid-align:none;text-autospace:none'><font size=2 face=Arial><span
     style='font-size:10.0pt;font-family:Arial'>Added and three osm_switch_t
     methods for this new field: getter, setter, and is_set that returns<br>
     true if this field has been set.<o:p></o:p></span></font></li>
 <li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;
     mso-layout-grid-align:none;text-autospace:none'><font size=2 face=Arial><span
     style='font-size:10.0pt;font-family:Arial'>The original osm_switch_get_max_lid_ho()
     has been updated to return this field value if it’s set.<o:p></o:p></span></font></li>
 <li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;
     mso-layout-grid-align:none;text-autospace:none'><font size=2 face=Arial><span
     style='font-size:10.0pt;font-family:Arial'>Then in FatTree routing I set
     this field for each switch (I get the max lid ‘for free’ as a
     byproduct<br>
     of the algorithm).<o:p></o:p></span></font></li>
 <li class=MsoNormal style='mso-list:l0 level1 lfo1;tab-stops:list 36.0pt;
     mso-layout-grid-align:none;text-autospace:none'><font size=2 face=Arial><span
     style='font-size:10.0pt;font-family:Arial'>Now everything in the ucast
     manager works fine, except for the following two dump functions:<br>
     <span style='mso-spacerun:yes'>       
     </span>__osm_ucast_mgr_dump_ucast_routes (it uses hops)<br>
     <span style='mso-spacerun:yes'>       
     </span>ucast_mgr_dump_lid_matrix (obviously…)<br>
     These two functions check at the beginning whether the max_lid_ho was set
     (using the ‘is_set’<br>
     method), and return w/o printing anything if the answer is yes.<o:p></o:p></span></font></li>
</ul>

<p class=MsoNormal style='margin-left:36.0pt;mso-layout-grid-align:none;
text-autospace:none'><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>This way any
other routing engine that uses lid matrix is not affected by this change, and
any routing <o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>engine that
doesn’t use the lid matrix has a way to set the max lid per switch
explicitly.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>This
approach works great, but I have a feeling that this is kinda hack…<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>What do you
think about this solution?<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Any other
suggestions?<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none;text-autospace:none'><font
size=2 face=Arial><span style='font-size:10.0pt;font-family:Arial'>Anyway, just
wanted to hear your opinion before sending the patch.<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial;mso-no-proof:yes'>   </span></font><span
style='mso-no-proof:yes'><o:p></o:p></span></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2 face=Arial><span
style='font-size:10.0pt;font-family:Arial;mso-no-proof:yes'>Regards,<o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2 face=Tahoma><span
style='font-size:11.0pt;font-family:Tahoma;mso-no-proof:yes'><span
style='mso-spacerun:yes'> </span><o:p></o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><strong><b><font size=2
face=Tahoma><span style='font-size:11.0pt;font-family:Tahoma;mso-no-proof:yes'>Yevgeny
Kliteynik</span></font><span style='mso-no-proof:yes'><o:p></o:p></span></b></strong></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=1
face="Times New Roman"><span style='font-size:8.5pt;mso-no-proof:yes'><o:p> </o:p></span></font></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><font size=2 face=Tahoma><span
style='font-size:10.0pt;font-family:Tahoma;mso-no-proof:yes'>Mellanox
Technologies LTD<o:p></o:p></span></font></p>

<p class=MsoNormal><em><i style='mso-ansi-font-style:normal;mso-bidi-font-style:
normal'><font size=3 face="Century Gothic"><span style='font-size:12.0pt;
font-family:"Century Gothic";font-style:normal;mso-no-proof:yes'>Tel:
+972-4-909-7200 ext: 394</span></font></i></em><span style='mso-no-proof:yes'><o:p></o:p></span></p>

<p class=MsoNormal><em><i style='mso-ansi-font-style:normal;mso-bidi-font-style:
normal'><font size=3 face="Century Gothic"><span style='font-size:12.0pt;
font-family:"Century Gothic";font-style:normal;mso-no-proof:yes'>Fax:
+972-4-959-3245</span></font></i></em><i><span style='font-style:italic;
mso-no-proof:yes'><o:p></o:p></span></i></p>

<p class=MsoNormal style='mso-layout-grid-align:none'><st1:address><st1:Street><font
  size=2 face="Century Gothic"><span style='font-size:10.0pt;font-family:"Century Gothic";
  mso-bidi-font-family:Tahoma;mso-no-proof:yes'>P.O. Box 586</span></font></st1:Street><font
 size=2 face="Century Gothic"><span style='font-size:10.0pt;font-family:"Century Gothic";
 mso-bidi-font-family:Tahoma;mso-no-proof:yes'> </span></font><st1:City><font
  size=2 face="Century Gothic"><span style='font-size:10.0pt;font-family:"Century Gothic";
  mso-bidi-font-family:Tahoma;mso-no-proof:yes'>Yokneam</span></font></st1:City><font
 size=2 face="Century Gothic"><span style='font-size:10.0pt;font-family:"Century Gothic";
 mso-bidi-font-family:Tahoma;mso-no-proof:yes'> </span></font><st1:PostalCode><font
  size=2 face="Century Gothic"><span style='font-size:10.0pt;font-family:"Century Gothic";
  mso-bidi-font-family:Tahoma;mso-no-proof:yes'>20692</span></font></st1:PostalCode><font
 size=2 face="Century Gothic"><span style='font-size:10.0pt;font-family:"Century Gothic";
 mso-bidi-font-family:Tahoma;mso-no-proof:yes'> </span></font><st1:country-region><font
  size=2 face="Century Gothic"><span style='font-size:10.0pt;font-family:"Century Gothic";
  mso-bidi-font-family:Tahoma;mso-no-proof:yes'>ISRAEL</span></font></st1:country-region></st1:address><span
style='mso-no-proof:yes'> </span><font size=2 face="Century Gothic"><span
style='font-size:10.0pt;font-family:"Century Gothic";mso-bidi-font-family:Tahoma;
mso-no-proof:yes'><o:p></o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

</div>

</body>

</html>