[ewg] strange value of IB port rate

Hal Rosenstock hal at dev.mellanox.co.il
Wed Feb 20 03:54:35 PST 2013


On 2/20/2013 6:51 AM, Mahesh Chaudhari wrote:
> Hi All,
> i have Mellanox dual port IB card installed in m/c
> when i do :
>              "cat /sys/class/infiniband/mthca0/ports/1/rate "
> it shows 20 Gb/sec (4X DDR)
> 
> while on port2
>                 " cat /sys/class/infiniband/mthca0/ports/2/rate "
> it shows 8.5 Gb/sec (4X)
> 
> when i looked at source code, i found a equation to calculate rate :
> 
>                        rate = 25 *
> ib_width_enum_to_int(attr.active_width) * attr.active_speed;
>                       
>                        return sprintf(buf, "%d%s Gb/sec (%dX%s)\n",
>                        rate / 10, rate % 10 ? ".5" : "",
>                        ib_width_enum_to_int(attr.active_width), speed);
> 
> 
>                                 where  
> ib_width_enum_to_int(attr.active_width) =  1 | 4 |8 |12 | -1(error)
>                                              attr.active_speed = 1 | 2 | 4 
> 
> 
>     i am wondering, how could it possible to get such an odd value (8.5
> Gbps)
> 
> /usr/ofed/sbin/ibstatus utility also shows :
> 
> Infiniband device 'mthca0' port 1 status:
>     default gid:     fe80:0000:0000:0000:001a:4bff:ff0c:96e5
>     base lid:     0x6
>     sm lid:         0x1
>     state:         4: ACTIVE
>     phys state:     5: LinkUp
>     rate:         20 Gb/sec (4X DDR)
>     link_layer:     InfiniBand
> 
> Infiniband device 'mthca0' port 2 status:
>     default gid:     fe80:0000:0000:0000:001a:4bff:ff0c:96e6
>     base lid:     0x0
>     sm lid:         0x0
>     state:         1: DOWN
>     phys state:     2: Polling
>     rate:         8.5 Gb/sec (4X)
>     link_layer:     InfiniBand
> 
> 
> 
> 
> Any Clue ???

In the case of DOWN ports, rate is meaningless and should be ignored.

-- Hal

> 
> 
> _______________________________________________
> ewg mailing list
> ewg at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ewg




More information about the ewg mailing list