Add new IB rate for XDR (8x) support
Subsystems (2)
cover Add new IB rate for XDR (8x) support
Nothing super fancy, just addition of new 1600_8x lane speed.
---
Maher Sanalla (2):
RDMA/core: Add new IB rate for XDR (8x) support RDMA/mlx5: Add support for 1600_8x lane speed
drivers/infiniband/core/verbs.c | 3 +++ drivers/infiniband/hw/mlx5/main.c | 4 ++++ drivers/infiniband/hw/mlx5/qp.c | 5 +++-- include/rdma/ib_verbs.h | 1 + 4 files changed, 11 insertions(+), 2 deletions(-)
---
base-commit: d056bc45b62b5981ebcd18c4303a915490b8ebe9
change-id: 20251120-speed-8-bc95d6f7d170
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>
PATCH 1/2 RDMA/core: Add new IB rate for XDR (8x) support
From: Maher Sanalla <[email protected]>
Add the new rates as defined in the Infiniband spec for XDR and 8x link width support.
Furthermore, modify the utility conversion methods accordingly.
Reference: IB Spec Release 1.8
--- drivers/infiniband/core/verbs.c | 3 +++ include/rdma/ib_verbs.h | 1 + 2 files changed, 4 insertions(+)
drivers/infiniband/core/verbs.c +3 -0
@@ -148,6 +148,7 @@ __attribute_const__ int ib_rate_to_mult(enum ib_rate rate)case IB_RATE_400_GBPS :return 160 ;case IB_RATE_600_GBPS :return 240 ;case IB_RATE_800_GBPS :return 320 ; +case IB_RATE_1600_GBPS :return 640 ;default :return -1 ; } }
@@ -178,6 +179,7 @@ __attribute_const__ enum ib_rate mult_to_ib_rate(int mult)case 160 :return IB_RATE_400_GBPS ;case 240 :return IB_RATE_600_GBPS ;case 320 :return IB_RATE_800_GBPS ; +case 640 :return IB_RATE_1600_GBPS ;default :return IB_RATE_PORT_CURRENT ; } }
@@ -208,6 +210,7 @@ __attribute_const__ int ib_rate_to_mbps(enum ib_rate rate)case IB_RATE_400_GBPS :return 425000 ;case IB_RATE_600_GBPS :return 637500 ;case IB_RATE_800_GBPS :return 850000 ; +case IB_RATE_1600_GBPS :return 1700000 ;default :return -1 ; } }
include/rdma/ib_verbs.h +1 -0
@@ -859,6 +859,7 @@ enum ib_rate {IB_RATE_400_GBPS =21 ,IB_RATE_600_GBPS =22 ,IB_RATE_800_GBPS =23 , + IB_RATE_1600_GBPS = 25, };/**
Signature · 1 line
2.51.1
Re: [PATCH rdma-next 1/2] RDMA/core: Add new IB rate for XDR (8x) support
Quoted 6 lines · Leon Romanovsky
From: Maher Sanalla <[email protected]>
Add the new rates as defined in the Infiniband spec for XDR and 8x link width support.
Quoted 7 lines
Furthermore, modify the utility conversion methods accordingly.
Reference: IB Spec Release 1.8
Reviewed-by Michael Guralnik <[email protected]>Signed-off-by Maher Sanalla <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>
Signature · 2 lines
Regards, Kalesh AP
PATCH 2/2 RDMA/mlx5: Add support for 1600_8x lane speed
In reply to Leon RomanovskyFrom: Maher Sanalla <[email protected]>
Add a check for 1600G_8X link speed when querying PTYS and report it back correctly when needed.
While at it, adjust mlx5 function which maps the speed rate from IB spec values to internal driver values to be able to handle speeds up to 1600Gbps.
--- drivers/infiniband/hw/mlx5/main.c | 4 ++++ drivers/infiniband/hw/mlx5/qp.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-)
drivers/infiniband/hw/mlx5/main.c +4 -0
@@ -511,6 +511,10 @@ static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed, *active_width =IB_WIDTH_4X ; *active_speed =IB_SPEED_XDR ;break ; +case MLX5E_PROT_MASK (MLX5E_1600TAUI_8_1600TBASE_CR8_KR8 ): + *active_width =IB_WIDTH_8X ; + *active_speed =IB_SPEED_XDR ; +break ;default :return -EINVAL ; }
drivers/infiniband/hw/mlx5/qp.c +3 -2
@@ -3451,10 +3451,11 @@ int mlx5r_ib_rate(struct mlx5_ib_dev *dev, u8 rate) {u32 stat_rate_support; -if (rate ==IB_RATE_PORT_CURRENT || rate ==IB_RATE_800_GBPS ) +if (rate ==IB_RATE_PORT_CURRENT || rate ==IB_RATE_800_GBPS || + rate ==IB_RATE_1600_GBPS )return 0 ; -if (rate <IB_RATE_2_5_GBPS || rate >IB_RATE_800_GBPS ) +if (rate <IB_RATE_2_5_GBPS || rate >IB_RATE_1600_GBPS )return -EINVAL ; stat_rate_support =MLX5_CAP_GEN (dev->mdev, stat_rate_support);
Signature · 1 line
2.51.1
Re: [PATCH rdma-next 2/2] RDMA/mlx5: Add support for 1600_8x lane speed
Quoted 4 lines · Leon Romanovsky
From: Maher Sanalla <[email protected]>
Add a check for 1600G_8X link speed when querying PTYS and report it back correctly when needed.
Amazing — 1600G is supported. I’m not sure whether this rate is supported only for InfiniBand or if it’s also available for RoCEv2. In any case, having such a high data rate is truly impressive.
Zhu Yanjun
Quoted 47 lines
While at it, adjust mlx5 function which maps the speed rate from IB spec values to internal driver values to be able to handle speeds up to 1600Gbps.
Reviewed-by Michael Guralnik <[email protected]>Signed-off-by Maher Sanalla <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/hw/mlx5/main.c | 4 ++++ drivers/infiniband/hw/mlx5/qp.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-)drivers/infiniband/hw/mlx5/main.c +4
-0@@ -511,6 +511,10 @@ static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed, *active_width =IB_WIDTH_4X ; *active_speed =IB_SPEED_XDR ;break ; +case MLX5E_PROT_MASK (MLX5E_1600TAUI_8_1600TBASE_CR8_KR8 ): + *active_width =IB_WIDTH_8X ; + *active_speed =IB_SPEED_XDR ; +break ;default :return -EINVAL ; }drivers/infiniband/hw/mlx5/qp.c +3
-2@@ -3451,10 +3451,11 @@ int mlx5r_ib_rate(struct mlx5_ib_dev *dev, u8 rate) {u32 stat_rate_support; -if (rate ==IB_RATE_PORT_CURRENT || rate ==IB_RATE_800_GBPS ) +if (rate ==IB_RATE_PORT_CURRENT || rate ==IB_RATE_800_GBPS || + rate ==IB_RATE_1600_GBPS )return 0 ; -if (rate <IB_RATE_2_5_GBPS || rate >IB_RATE_800_GBPS ) +if (rate <IB_RATE_2_5_GBPS || rate >IB_RATE_1600_GBPS )return -EINVAL ; stat_rate_support =MLX5_CAP_GEN (dev->mdev, stat_rate_support);
Re: [PATCH rdma-next 2/2] RDMA/mlx5: Add support for 1600_8x lane speed
Quoted 9 lines · yanjun.zhu
Quoted 4 lines · Leon Romanovsky
From: Maher Sanalla <[email protected]>
Add a check for 1600G_8X link speed when querying PTYS and report it back correctly when needed.
Amazing — 1600G is supported. I’m not sure whether this rate is supported only for InfiniBand or if it’s also available for RoCEv2. In any case, having such a high data rate is truly impressive.
It is both for InfiniBand and RoCE.
Quoted 2 lines
Reviewed-by Zhu Yanjun <[email protected]>
Thanks
Quoted 49 lines
Zhu Yanjun
Quoted 44 lines
While at it, adjust mlx5 function which maps the speed rate from IB spec values to internal driver values to be able to handle speeds up to 1600Gbps.
Reviewed-by Michael Guralnik <[email protected]>Signed-off-by Maher Sanalla <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/hw/mlx5/main.c | 4 ++++ drivers/infiniband/hw/mlx5/qp.c | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-)drivers/infiniband/hw/mlx5/main.c +4
-0@@ -511,6 +511,10 @@ static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed, *active_width =IB_WIDTH_4X ; *active_speed =IB_SPEED_XDR ;break ; +case MLX5E_PROT_MASK (MLX5E_1600TAUI_8_1600TBASE_CR8_KR8 ): + *active_width =IB_WIDTH_8X ; + *active_speed =IB_SPEED_XDR ; +break ;default :return -EINVAL ; }drivers/infiniband/hw/mlx5/qp.c +3
-2@@ -3451,10 +3451,11 @@ int mlx5r_ib_rate(struct mlx5_ib_dev *dev, u8 rate) {u32 stat_rate_support; -if (rate ==IB_RATE_PORT_CURRENT || rate ==IB_RATE_800_GBPS ) +if (rate ==IB_RATE_PORT_CURRENT || rate ==IB_RATE_800_GBPS || + rate ==IB_RATE_1600_GBPS )return 0 ; -if (rate <IB_RATE_2_5_GBPS || rate >IB_RATE_800_GBPS ) +if (rate <IB_RATE_2_5_GBPS || rate >IB_RATE_1600_GBPS )return -EINVAL ; stat_rate_support =MLX5_CAP_GEN (dev->mdev, stat_rate_support);
Re: [PATCH rdma-next 2/2] RDMA/mlx5: Add support for 1600_8x lane speed
In reply to Leon RomanovskyQuoted 6 lines · Leon Romanovsky
From: Maher Sanalla <[email protected]>
Add a check for 1600G_8X link speed when querying PTYS and report it back correctly when needed.
Quoted 7 lines
While at it, adjust mlx5 function which maps the speed rate from IB spec values to internal driver values to be able to handle speeds up to 1600Gbps.
Reviewed-by Michael Guralnik <[email protected]>Signed-off-by Maher Sanalla <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>
Signature · 2 lines
Regards, Kalesh AP
Leon Romanovsky
AppliedQuoted 3 lines · Leon Romanovsky
Nothing super fancy, just addition of new 1600_8x lane speed.
Applied, thanks!
[1/2] RDMA/core: Add new IB rate for XDR (8x) support
https://git.kernel.org/rdma/rdma/c/9e119870a99e50 [2/2] RDMA/mlx5: Add support for 1600_8x lane speed https://git.kernel.org/rdma/rdma/c/45085ad3b2a358
Best regards,
Signature · 1 line
Leon Romanovsky <[email protected]>