[Bug 285306] RDMA/libibverbs: active_speed value from ibv_devinfo shows as invalid speed for 400G

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 10 Mar 2025 11:04:44 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=285306

            Bug ID: 285306
           Summary: RDMA/libibverbs: active_speed value from ibv_devinfo
                    shows as invalid speed for 400G
           Product: Base System
           Version: 15.0-CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: sreekanth.reddy@broadcom.com

Connected the 400G cable to Broadcom's Thor2 controllers and ibv_devinfo shows
the active speed as "invalid speed (128)" as shown below,

# ibv_devinfo -d bnxt_re2 -vv
hca_id: bnxt_re2
        transport:                      InfiniBand (0)
        fw_ver:                         234.0.67.0
        ...
                        active_width:           4X (2)
                        active_speed:           invalid speed (128)
                        phys_state:             LINK_UP (5)

in file /usr/src/contrib/ofed/libibverbs/examples/devinfo.c

static const char *speed_str(uint8_t speed)
{
        switch (speed) {
        case 1:  return "2.5 Gbps";
        case 2:  return "5.0 Gbps";

        case 4:  /* fall through */
        case 8:  return "10.0 Gbps";

        case 16: return "14.0 Gbps";
        case 32: return "25.0 Gbps";
        case 64: return "50.0 Gbps";
        default: return "invalid speed";
        }
}

There is no case statement for speed value 128 ("IB_SPEED_NDR") and hence
active  _speed shown as "invalid speed". Please update the devinfo.c to support
400G speed modules.

Thanks,
Sreekanth

-- 
You are receiving this mail because:
You are the assignee for the bug.