git: 304a69596b36 - stable/13 - mlx5ib: Add support for NDR link speed.

From: Hans Petter Selasky <hselasky_at_FreeBSD.org>
Date: Thu, 03 Mar 2022 14:30:10 UTC
The branch stable/13 has been updated by hselasky:

URL: https://cgit.FreeBSD.org/src/commit/?id=304a69596b3619ed5ad28e1ddb0c232953fb6141

commit 304a69596b3619ed5ad28e1ddb0c232953fb6141
Author:     Hans Petter Selasky <hselasky@FreeBSD.org>
AuthorDate: 2022-02-21 08:25:29 +0000
Commit:     Hans Petter Selasky <hselasky@FreeBSD.org>
CommitDate: 2022-03-03 14:28:53 +0000

    mlx5ib: Add support for NDR link speed.
    
    The IBTA specification has new speed - NDR. That speed supports signaling
    rate of 100Gb. mlx5 IB driver translates link modes reported by ConnectX
    device to IB speed and width. Added translation of new 100Gb, 200Gb and
    400Gb link modes to NDR IB type and width of x1, x2 or x4 respectively.
    
    Linux commits:
    f946e45f59ef01ff54ffb3b1eba3a8e7915e7326
    
    Sponsored by:   NVIDIA Networking
    
    (cherry picked from commit 91c8ffd7e60fa7f017731cd234c01b7cddc05272)
---
 sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
index 95214f6003ce..1d4842160d4a 100644
--- a/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
+++ b/sys/dev/mlx5/mlx5_ib/mlx5_ib_main.c
@@ -258,10 +258,22 @@ static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u8 *active_speed,
 		*active_width = IB_WIDTH_2X;
 		*active_speed = IB_SPEED_HDR;
 		break;
+	case MLX5E_PROT_MASK(MLX5E_100GAUI_1_100GBASE_CR_KR):
+		*active_width = IB_WIDTH_1X;
+		*active_speed = IB_SPEED_NDR;
+		break;
 	case MLX5E_PROT_MASK(MLX5E_200GAUI_4_200GBASE_CR4_KR4):
 		*active_width = IB_WIDTH_4X;
 		*active_speed = IB_SPEED_HDR;
 		break;
+	case MLX5E_PROT_MASK(MLX5E_200GAUI_2_200GBASE_CR2_KR2):
+		*active_width = IB_WIDTH_2X;
+		*active_speed = IB_SPEED_NDR;
+		break;
+	case MLX5E_PROT_MASK(MLX5E_400GAUI_4_400GBASE_CR4_KR4):
+		*active_width = IB_WIDTH_4X;
+		*active_speed = IB_SPEED_NDR;
+		break;
 	default:
 		*active_width = IB_WIDTH_4X;
 		*active_speed = IB_SPEED_QDR;