Skip to content

Commit fbdb0ba

Browse files
msanallajgunthorpe
authored andcommitted
IB/mlx5: Expose NDR speed through MAD
Under MAD query port, Report NDR speed when NDR is supported in the port capability mask. Link: https://lore.kernel.org/r/a2ab630d2a634547db9b581faa9d65da2edb9d05.1639554831.git.leonro@nvidia.com Signed-off-by: Maher Sanalla <[email protected]> Reviewed-by: Michael Guralnik <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent e375b9c commit fbdb0ba

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

drivers/infiniband/hw/mlx5/mad.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,11 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u32 port,
584584
props->port_cap_flags2 & IB_PORT_LINK_SPEED_HDR_SUP)
585585
props->active_speed = IB_SPEED_HDR;
586586
break;
587+
case 8:
588+
if (props->port_cap_flags & IB_PORT_CAP_MASK2_SUP &&
589+
props->port_cap_flags2 & IB_PORT_LINK_SPEED_NDR_SUP)
590+
props->active_speed = IB_SPEED_NDR;
591+
break;
587592
}
588593
}
589594

include/rdma/ib_mad.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ enum ib_port_capability_mask2_bits {
276276
IB_PORT_SWITCH_PORT_STATE_TABLE_SUP = 1 << 3,
277277
IB_PORT_LINK_WIDTH_2X_SUP = 1 << 4,
278278
IB_PORT_LINK_SPEED_HDR_SUP = 1 << 5,
279+
IB_PORT_LINK_SPEED_NDR_SUP = 1 << 10,
279280
};
280281

281282
#define OPA_CLASS_PORT_INFO_PR_SUPPORT BIT(26)

0 commit comments

Comments
 (0)