<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hi All,</div><div>i have Mellanox dual port IB card installed in m/c</div><div>when i do :<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab"> </span><span class="tab"> </span><span class="tab"> "cat /sys/class/infiniband/mthc</span><span class="tab">a0/ports</span><span class="tab">/1/rate </span>"</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">it shows 20 Gb/sec (4X DDR)</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style:
normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">while on port2 <br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> " cat /sys/class/infiniband/mthca0/ports/2/rate "</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">it shows 8.5 Gb/sec (4X)</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span
class="tab"></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">when i looked at source code, i found a equation to calculate rate :</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span class="tab"></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> rate = 25 * ib_width_enum_to_int(attr.active_width) * attr.active_speed;</span></div><div
style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> <br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span>return sprintf(buf, "%d%s Gb/sec
(%dX%s)\n",<br> rate / 10, rate % 10 ? ".5" : "",<br> ib_width_enum_to_int(attr.active_width), speed);<br><span class="tab"></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br><span class="tab"></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab"><br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab">
</span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> where ib_width_enum_to_int(attr.active_width) = 1 | 4 |8 |12 | -1(error)</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span class="tab"> </span><span
class="tab"> </span><span class="tab"> attr.active_speed = 1 | 2 | 4 </span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><span class="tab"> i am wondering, how could it possible to get such an odd value (8.5 Gbps) <br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times
new roman,new york,times,serif; background-color: transparent; font-style: normal;">/usr<span class="tab">/ofed/sbin/ibstatus utility also shows :<br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Infiniband device 'mthca0' port 1 status:<br> default gid: fe80:0000:0000:0000:001a:4bff:ff0c:96e5<br> base lid: 0x6<br> sm lid: 0x1<br> state: 4: ACTIVE<br> phys state: 5: LinkUp<br> rate:
20 Gb/sec (4X DDR)<br> link_layer: InfiniBand<br><br>Infiniband device 'mthca0' port 2 status:<br> default gid: fe80:0000:0000:0000:001a:4bff:ff0c:96e6<br> base lid: 0x0<br> sm lid: 0x0<br> state: 1: DOWN<br> phys state: 2: Polling<br> rate: 8.5 Gb/sec (4X)<br> link_layer: InfiniBand<br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new
york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;"><br></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; background-color: transparent; font-style: normal;">Any Clue ???<br><span class="tab"></span></div></div></body></html>