]> git.openfabrics.org - ~shefty/libibverbs.git/commitdiff
Add support to ibv_devinfo for displaying extended speeds
authorMarcel Apfelbaum <marcela@dev.mellanox.co.il>
Mon, 3 Oct 2011 15:56:25 +0000 (18:56 +0300)
committerRoland Dreier <roland@purestorage.com>
Tue, 13 Dec 2011 19:20:07 +0000 (11:20 -0800)
Add code to ibv_devinfo to display the following new speeds:

    8:  FDR-10 is a proprietary link speed which is 10.3125 Gbps with 64b/66b
        encoding rather than 8b/10b encoding.
    16: FDR - 14.0625 Gbps
    32: EDR - 25.78125 Gbps

Signed-off-by: Marcel Apfelbaum <marcela@dev.mellanox.co.il>
Reviewed-by: Hal Rosenstock <hal@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
examples/devinfo.c

index 1621f33723567579d7c07b1df14ddec7c867991f..7dc046312dedc11b5f059e70112ffd161513287f 100644 (file)
@@ -139,7 +139,12 @@ static const char *speed_str(uint8_t speed)
        switch (speed) {
        case 1:  return "2.5 Gbps";
        case 2:  return "5.0 Gbps";
-       case 4:  return "10.0 Gbps";
+
+       case 4:  /* fall through */
+       case 8:  return "10.0 Gbps";
+
+       case 16: return "14.0 Gbps";
+       case 32: return "25.0 Gbps";
        default: return "invalid speed";
        }
 }