All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-rc] IB/mlx5: Add support for 400G_8X lane speed
@ 2023-03-16 13:40 Leon Romanovsky
  2023-03-20  7:52 ` Leon Romanovsky
  0 siblings, 1 reply; 2+ messages in thread
From: Leon Romanovsky @ 2023-03-16 13:40 UTC (permalink / raw)
  To: Jason Gunthorpe
  Cc: Maher Sanalla, Aya Levin, Aya Levin, linux-rdma, Saeed Mahameed

From: Maher Sanalla <msanalla@nvidia.com>

Currently, when driver queries PTYS to report which link speed is being
used on its RoCE ports, it does not check the case of having 400Gbps
transmitted over 8 lanes. Thus it fails to report the said speed and
instead it defaults to report 10G over 4 lanes.

Add a check for the said speed when querying PTYS and report it back
correctly when needed.

Fixes: 08e8676f1607 ("IB/mlx5: Add support for 50Gbps per lane link modes")
Signed-off-by: Maher Sanalla <msanalla@nvidia.com>
Reviewed-by: Aya Levin <ayal@nvidia.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
---
 drivers/infiniband/hw/mlx5/main.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c
index 5e5ed1c8299d..f0b394ed7452 100644
--- a/drivers/infiniband/hw/mlx5/main.c
+++ b/drivers/infiniband/hw/mlx5/main.c
@@ -442,6 +442,10 @@ static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed,
 		*active_width = IB_WIDTH_2X;
 		*active_speed = IB_SPEED_NDR;
 		break;
+	case MLX5E_PROT_MASK(MLX5E_400GAUI_8):
+		*active_width = IB_WIDTH_8X;
+		*active_speed = IB_SPEED_HDR;
+		break;
 	case MLX5E_PROT_MASK(MLX5E_400GAUI_4_400GBASE_CR4_KR4):
 		*active_width = IB_WIDTH_4X;
 		*active_speed = IB_SPEED_NDR;
-- 
2.39.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH rdma-rc] IB/mlx5: Add support for 400G_8X lane speed
  2023-03-16 13:40 [PATCH rdma-rc] IB/mlx5: Add support for 400G_8X lane speed Leon Romanovsky
@ 2023-03-20  7:52 ` Leon Romanovsky
  0 siblings, 0 replies; 2+ messages in thread
From: Leon Romanovsky @ 2023-03-20  7:52 UTC (permalink / raw)
  To: Jason Gunthorpe, Leon Romanovsky
  Cc: Maher Sanalla, Aya Levin, Aya Levin, linux-rdma, Saeed Mahameed


On Thu, 16 Mar 2023 15:40:49 +0200, Leon Romanovsky wrote:
> Currently, when driver queries PTYS to report which link speed is being
> used on its RoCE ports, it does not check the case of having 400Gbps
> transmitted over 8 lanes. Thus it fails to report the said speed and
> instead it defaults to report 10G over 4 lanes.
> 
> Add a check for the said speed when querying PTYS and report it back
> correctly when needed.
> 
> [...]

Applied, thanks!

[1/1] IB/mlx5: Add support for 400G_8X lane speed
      https://git.kernel.org/rdma/rdma/c/88c9483faf15ad

Best regards,
-- 
Leon Romanovsky <leon@kernel.org>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-20  7:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 13:40 [PATCH rdma-rc] IB/mlx5: Add support for 400G_8X lane speed Leon Romanovsky
2023-03-20  7:52 ` Leon Romanovsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.