From patchwork Wed Sep 20 10:07:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13392458 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D3A9315AC3 for ; Wed, 20 Sep 2023 10:08:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2ED25C433C7; Wed, 20 Sep 2023 10:08:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695204487; bh=AMzd8aTw1wdmBkqMSRGACywvP7lB5QZvFpo1MiU8psE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GQeo/8TWRIT8ee2s9OpeacidvagHS98nQZn/ZGdzANU2nqLqQHQxjlF77Zgjl1XKH Pd8yMl+9uokxLLfDuZQBkaH2PeOgOdq0U73ppsoIr9hxaDrkldt00wReVvFVX4iYEI PXNtZCUbbIZVmMLxCjHXnw8WUIAFPx2p9YIRieSm1niJ8Zi18FIeqjyY+9mOBaVfPo hUMezGskR/OQn51souuazIQdN0D4NoKYvbW23dFk/VjSNuJ0YQltr85/HQ7Q0HZje7 AzO/WrLHRTTrdhY9b4McyfBvuuXcT+kl+fru1qYkoNPJwVHCu9vwH4i+9yT2Tp0Grr fnBl7zFsRyU2g== From: Leon Romanovsky To: Jason Gunthorpe Cc: Or Har-Toov , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-rdma@vger.kernel.org, Mark Zhang , netdev@vger.kernel.org, Paolo Abeni , Saeed Mahameed Subject: [PATCH rdma-next 1/6] IB/core: Add support for XDR link speed Date: Wed, 20 Sep 2023 13:07:40 +0300 Message-ID: <9d235fc600a999e8274010f0e18b40fa60540e6c.1695204156.git.leon@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Or Har-Toov Add new IBTA speed XDR, the new rate that was added to Infiniband spec as part of XDR and supporting signaling rate of 200Gb. In order to report that value to rdma-core, add new u32 field to query_port response. Signed-off-by: Or Har-Toov Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky --- drivers/infiniband/core/sysfs.c | 4 ++++ drivers/infiniband/core/uverbs_std_types_device.c | 3 ++- drivers/infiniband/core/verbs.c | 3 +++ include/rdma/ib_verbs.h | 2 ++ include/uapi/rdma/ib_user_ioctl_verbs.h | 3 ++- 5 files changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c index ec5efdc16660..9f97bef02149 100644 --- a/drivers/infiniband/core/sysfs.c +++ b/drivers/infiniband/core/sysfs.c @@ -342,6 +342,10 @@ static ssize_t rate_show(struct ib_device *ibdev, u32 port_num, speed = " NDR"; rate = 1000; break; + case IB_SPEED_XDR: + speed = " XDR"; + rate = 2000; + break; case IB_SPEED_SDR: default: /* default to SDR for invalid rates */ speed = " SDR"; diff --git a/drivers/infiniband/core/uverbs_std_types_device.c b/drivers/infiniband/core/uverbs_std_types_device.c index 049684880ae0..fb0555647336 100644 --- a/drivers/infiniband/core/uverbs_std_types_device.c +++ b/drivers/infiniband/core/uverbs_std_types_device.c @@ -203,6 +203,7 @@ static int UVERBS_HANDLER(UVERBS_METHOD_QUERY_PORT)( copy_port_attr_to_resp(&attr, &resp.legacy_resp, ib_dev, port_num); resp.port_cap_flags2 = attr.port_cap_flags2; + resp.active_speed_ex = attr.active_speed; return uverbs_copy_to_struct_or_zero(attrs, UVERBS_ATTR_QUERY_PORT_RESP, &resp, sizeof(resp)); @@ -461,7 +462,7 @@ DECLARE_UVERBS_NAMED_METHOD( UVERBS_ATTR_PTR_OUT( UVERBS_ATTR_QUERY_PORT_RESP, UVERBS_ATTR_STRUCT(struct ib_uverbs_query_port_resp_ex, - reserved), + active_speed_ex), UA_MANDATORY)); DECLARE_UVERBS_NAMED_METHOD( diff --git a/drivers/infiniband/core/verbs.c b/drivers/infiniband/core/verbs.c index cc2c37096bba..8a6da87f464b 100644 --- a/drivers/infiniband/core/verbs.c +++ b/drivers/infiniband/core/verbs.c @@ -147,6 +147,7 @@ __attribute_const__ int ib_rate_to_mult(enum ib_rate rate) case IB_RATE_50_GBPS: return 20; case IB_RATE_400_GBPS: return 160; case IB_RATE_600_GBPS: return 240; + case IB_RATE_800_GBPS: return 320; default: return -1; } } @@ -176,6 +177,7 @@ __attribute_const__ enum ib_rate mult_to_ib_rate(int mult) case 20: return IB_RATE_50_GBPS; case 160: return IB_RATE_400_GBPS; case 240: return IB_RATE_600_GBPS; + case 320: return IB_RATE_800_GBPS; default: return IB_RATE_PORT_CURRENT; } } @@ -205,6 +207,7 @@ __attribute_const__ int ib_rate_to_mbps(enum ib_rate rate) case IB_RATE_50_GBPS: return 53125; case IB_RATE_400_GBPS: return 425000; case IB_RATE_600_GBPS: return 637500; + case IB_RATE_800_GBPS: return 850000; default: return -1; } } diff --git a/include/rdma/ib_verbs.h b/include/rdma/ib_verbs.h index e36c0d9aad27..fd61c3a56fa7 100644 --- a/include/rdma/ib_verbs.h +++ b/include/rdma/ib_verbs.h @@ -561,6 +561,7 @@ enum ib_port_speed { IB_SPEED_EDR = 32, IB_SPEED_HDR = 64, IB_SPEED_NDR = 128, + IB_SPEED_XDR = 256, }; enum ib_stat_flag { @@ -840,6 +841,7 @@ enum ib_rate { IB_RATE_50_GBPS = 20, IB_RATE_400_GBPS = 21, IB_RATE_600_GBPS = 22, + IB_RATE_800_GBPS = 23, }; /** diff --git a/include/uapi/rdma/ib_user_ioctl_verbs.h b/include/uapi/rdma/ib_user_ioctl_verbs.h index d7c5aaa32744..fe15bc7e9f70 100644 --- a/include/uapi/rdma/ib_user_ioctl_verbs.h +++ b/include/uapi/rdma/ib_user_ioctl_verbs.h @@ -220,7 +220,8 @@ enum ib_uverbs_advise_mr_flag { struct ib_uverbs_query_port_resp_ex { struct ib_uverbs_query_port_resp legacy_resp; __u16 port_cap_flags2; - __u8 reserved[6]; + __u8 reserved[2]; + __u32 active_speed_ex; }; struct ib_uverbs_qp_cap { From patchwork Wed Sep 20 10:07:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13392456 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 10E4F15AC3 for ; Wed, 20 Sep 2023 10:07:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5EDCEC433C7; Wed, 20 Sep 2023 10:07:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695204478; bh=W9mskMLw14fbfxM2rYmwWGjNyVKja6spum3kDsRFlgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uWPtFpm8bvWxErLdXXvlstAnwm9jJr3Z/pjrsTG990N1K2PtTvshtVM161MtN0DOi gTx7frnR1k0R8h3mCDZOf24qcpGsrvAH6PGlo/7LvsCP+32NPNSu+d6oZcrwN9eZca 2T9KW6GVOKBhGX/dFpiFFqexNZRTM0fnAPURnNPzbUmELDpjxyCZuy3YeeviJ1wb0S GZZn01gB3CsRwWAw55By3SF5NxDBf7q6NKe4dlR1CwFN5WT1mnBDtuR2qbLlmTo7dL WKWsdsdlj376Fsb92bsdA+MW/9wo0lL5DqbZ7LXgoeF6QQwKv2UiPuwn9Yx8+HyCnt 109QlKyPhd6sQ== From: Leon Romanovsky To: Jason Gunthorpe Cc: Or Har-Toov , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-rdma@vger.kernel.org, Mark Zhang , netdev@vger.kernel.org, Paolo Abeni , Saeed Mahameed Subject: [PATCH rdma-next 2/6] IB/mlx5: Expose XDR speed through MAD Date: Wed, 20 Sep 2023 13:07:41 +0300 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Or Har-Toov Under MAD query port, Report NDR speed when NDR is supported in the port capability mask. Signed-off-by: Or Har-Toov Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/mad.c | 13 +++++++++++++ include/rdma/ib_mad.h | 2 ++ 2 files changed, 15 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/mad.c b/drivers/infiniband/hw/mlx5/mad.c index 8102ef113b7e..0c3c4e64812c 100644 --- a/drivers/infiniband/hw/mlx5/mad.c +++ b/drivers/infiniband/hw/mlx5/mad.c @@ -619,6 +619,19 @@ int mlx5_query_mad_ifc_port(struct ib_device *ibdev, u32 port, } } + /* Check if extended speeds 2 (XDR/...) are supported */ + if (props->port_cap_flags & IB_PORT_CAP_MASK2_SUP && + props->port_cap_flags2 & IB_PORT_EXTENDED_SPEEDS2_SUP) { + ext_active_speed = (out_mad->data[56] >> 4) & 0x6; + + switch (ext_active_speed) { + case 2: + if (props->port_cap_flags2 & IB_PORT_LINK_SPEED_XDR_SUP) + props->active_speed = IB_SPEED_XDR; + break; + } + } + /* If reported active speed is QDR, check if is FDR-10 */ if (props->active_speed == 4) { if (dev->port_caps[port - 1].ext_port_cap & diff --git a/include/rdma/ib_mad.h b/include/rdma/ib_mad.h index 2e3843b761e8..3f1b58d8b4bf 100644 --- a/include/rdma/ib_mad.h +++ b/include/rdma/ib_mad.h @@ -277,6 +277,8 @@ enum ib_port_capability_mask2_bits { IB_PORT_LINK_WIDTH_2X_SUP = 1 << 4, IB_PORT_LINK_SPEED_HDR_SUP = 1 << 5, IB_PORT_LINK_SPEED_NDR_SUP = 1 << 10, + IB_PORT_EXTENDED_SPEEDS2_SUP = 1 << 11, + IB_PORT_LINK_SPEED_XDR_SUP = 1 << 12, }; #define OPA_CLASS_PORT_INFO_PR_SUPPORT BIT(26) From patchwork Wed Sep 20 10:07:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13392457 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BF8215AC3 for ; Wed, 20 Sep 2023 10:08:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7AB42C433C8; Wed, 20 Sep 2023 10:08:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695204483; bh=o+qXj8W7DVoYQY75qK0NxoUqduddIC1gpz+smx2PevM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KRR6FXeT5AiW6/DkOLsjN6sdIp8u5kb5ntic7SMz0hxatwt6TDsYUDYi7SgGDW9fV Rk262MQwrobsyVIhMGPAl9nJTxfBT2cv0YJwPHOtglJZozGY3CLUamyL2Oso6jy/pM mAg5VH6irnF62svLk7PV/gfhb1uW4Hc8ud36kOpwT2XfHSoowPLa0ZYWIers4Ekwkx Dgk0xo2PxcTSJZjQfRCPfDoxiaCjvHhB26jcUeG1sxQNc9IVmSCW5k7DRNXRuYj0X/ 1UVCzAiMBZEheKzY3JMKjXF5fbpCh1+nnoeSW8mFUyUt7Ne7w/tRXaBdS4biS5M0Ub 6+JN09mzPDVhg== From: Leon Romanovsky To: Jason Gunthorpe Cc: Patrisious Haddad , Eric Dumazet , Jakub Kicinski , linux-rdma@vger.kernel.org, Mark Zhang , netdev@vger.kernel.org, Or Har-Toov , Paolo Abeni , Saeed Mahameed Subject: [PATCH rdma-next 3/6] IB/mlx5: Add support for 800G_8X lane speed Date: Wed, 20 Sep 2023 13:07:42 +0300 Message-ID: <26fd0b6e1fac071c3eb779657bb3d8ba47f47c4f.1695204156.git.leon@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Patrisious Haddad Add a check for 800G_8X speed when querying PTYS and report it back correctly when needed. Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c | 4 ++++ drivers/net/ethernet/mellanox/mlx5/core/port.c | 1 + include/linux/mlx5/port.h | 1 + 3 files changed, 6 insertions(+) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index f9286820ad3b..830dac95c163 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -482,6 +482,10 @@ static int translate_eth_ext_proto_oper(u32 eth_proto_oper, u16 *active_speed, *active_width = IB_WIDTH_4X; *active_speed = IB_SPEED_NDR; break; + case MLX5E_PROT_MASK(MLX5E_800GAUI_8_800GBASE_CR8_KR8): + *active_width = IB_WIDTH_8X; + *active_speed = IB_SPEED_NDR; + break; default: return -EINVAL; } diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c b/drivers/net/ethernet/mellanox/mlx5/core/port.c index be70d1f23a5d..43423543f34c 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/port.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c @@ -1102,6 +1102,7 @@ static const u32 mlx5e_ext_link_speed[MLX5E_EXT_LINK_MODES_NUMBER] = { [MLX5E_100GAUI_1_100GBASE_CR_KR] = 100000, [MLX5E_200GAUI_2_200GBASE_CR2_KR2] = 200000, [MLX5E_400GAUI_4_400GBASE_CR4_KR4] = 400000, + [MLX5E_800GAUI_8_800GBASE_CR8_KR8] = 800000, }; int mlx5_port_query_eth_proto(struct mlx5_core_dev *dev, u8 port, bool ext, diff --git a/include/linux/mlx5/port.h b/include/linux/mlx5/port.h index 98b2e1e149f9..794001ebd003 100644 --- a/include/linux/mlx5/port.h +++ b/include/linux/mlx5/port.h @@ -117,6 +117,7 @@ enum mlx5e_ext_link_mode { MLX5E_200GAUI_2_200GBASE_CR2_KR2 = 13, MLX5E_400GAUI_8 = 15, MLX5E_400GAUI_4_400GBASE_CR4_KR4 = 16, + MLX5E_800GAUI_8_800GBASE_CR8_KR8 = 19, MLX5E_EXT_LINK_MODES_NUMBER, }; From patchwork Wed Sep 20 10:07:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13392461 X-Patchwork-Delegate: kuba@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5535B168A9 for ; Wed, 20 Sep 2023 10:08:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A2ABCC433C9; Wed, 20 Sep 2023 10:08:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695204499; bh=nM2JZKt2cwScGFOnX9WSpTvISbSkR2tPaohBnwD2i38=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZTgRAXYHDAuTFhNIix4CUH7nZCwcSbCjDJzv91b12zKpapwPnt2d8jqPe4/w/OH8Y PROimOwtctoPm/vZPD9JKQMQtuxHQWG42O7eGY5g+ph91Eyq3Sf99YlxDoU1lX+JrF y0c1AMqLcukY8cPrpSVrspfPUwKoeZGamoN5iLHCWcecAf0Drw36vEfbP4xt4pmsmm fGHj7VJ1+90ZgdyQLwQ3oQ1KVT+WZ0C/eJbD22nFnHckym206kfqLisQA1EdBRzxXk GEcW54Paz7JhK5J/Toi3Via/HT26/PCNhWf2BiY4qcgP1ytu52+6QTfqdnRiivwIxr 76RIseFM42qhg== From: Leon Romanovsky To: Jason Gunthorpe Cc: Patrisious Haddad , Eric Dumazet , Jakub Kicinski , linux-rdma@vger.kernel.org, Mark Zhang , netdev@vger.kernel.org, Or Har-Toov , Paolo Abeni , Saeed Mahameed Subject: [PATCH rdma-next 4/6] IB/mlx5: Rename 400G_8X speed to comply to naming convention Date: Wed, 20 Sep 2023 13:07:43 +0300 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Delegate: kuba@kernel.org From: Patrisious Haddad Rename 400G_8X speed to comply to naming convention. Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/main.c | 2 +- drivers/net/ethernet/mellanox/mlx5/core/port.c | 2 +- include/linux/mlx5/port.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 830dac95c163..026f6c04f81e 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -474,7 +474,7 @@ 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): + case MLX5E_PROT_MASK(MLX5E_400GAUI_8_400GBASE_CR8): *active_width = IB_WIDTH_8X; *active_speed = IB_SPEED_HDR; break; diff --git a/drivers/net/ethernet/mellanox/mlx5/core/port.c b/drivers/net/ethernet/mellanox/mlx5/core/port.c index 43423543f34c..7d8c732818f2 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/port.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/port.c @@ -1098,7 +1098,7 @@ static const u32 mlx5e_ext_link_speed[MLX5E_EXT_LINK_MODES_NUMBER] = { [MLX5E_CAUI_4_100GBASE_CR4_KR4] = 100000, [MLX5E_100GAUI_2_100GBASE_CR2_KR2] = 100000, [MLX5E_200GAUI_4_200GBASE_CR4_KR4] = 200000, - [MLX5E_400GAUI_8] = 400000, + [MLX5E_400GAUI_8_400GBASE_CR8] = 400000, [MLX5E_100GAUI_1_100GBASE_CR_KR] = 100000, [MLX5E_200GAUI_2_200GBASE_CR2_KR2] = 200000, [MLX5E_400GAUI_4_400GBASE_CR4_KR4] = 400000, diff --git a/include/linux/mlx5/port.h b/include/linux/mlx5/port.h index 794001ebd003..26092c78a985 100644 --- a/include/linux/mlx5/port.h +++ b/include/linux/mlx5/port.h @@ -115,7 +115,7 @@ enum mlx5e_ext_link_mode { MLX5E_100GAUI_1_100GBASE_CR_KR = 11, MLX5E_200GAUI_4_200GBASE_CR4_KR4 = 12, MLX5E_200GAUI_2_200GBASE_CR2_KR2 = 13, - MLX5E_400GAUI_8 = 15, + MLX5E_400GAUI_8_400GBASE_CR8 = 15, MLX5E_400GAUI_4_400GBASE_CR4_KR4 = 16, MLX5E_800GAUI_8_800GBASE_CR8_KR8 = 19, MLX5E_EXT_LINK_MODES_NUMBER, From patchwork Wed Sep 20 10:07:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13392459 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E1B415AC3 for ; Wed, 20 Sep 2023 10:08:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EE3B8C433C7; Wed, 20 Sep 2023 10:08:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695204491; bh=EQUlJG44rV9id9Ip0kx1re+czxiANtcpuKWCnMLeOqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=j/CisvHYBZ98ttIfqJuA2H76sDpjlyu1M+lJf2dta+bFc7nG2+e0vY+DTZJcXgLjY Vn7YWpPlJYKxaaXtVw8XkIn2voCys0kbzZCFkEY7z/L2J7t2gNLIkGHmqDKvG5JmOP BSTDBOF9AQjYN18VrJz/J+wlaTYtbpkfsvaGURIvE6Qltd61f0NWiIcTnNiiiyxQqh TVdbrD0+sCJR3xpxE0liaZxAJQKv0lEfO77GjXQF8IWmjvnU/DDIQhufIahaDEQKC9 48j2nQGchRl9jZ/xv2iIqX/eO3CgfW6Jv2tPXWBqALssn3/xgoZHIRfMSpy3M5ESLs 3vyNKt6xnnSZA== From: Leon Romanovsky To: Jason Gunthorpe Cc: Patrisious Haddad , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-rdma@vger.kernel.org, Mark Zhang , netdev@vger.kernel.org, Or Har-Toov , Paolo Abeni , Saeed Mahameed Subject: [PATCH rdma-next 5/6] IB/mlx5: Adjust mlx5 rate mapping to support 800Gb Date: Wed, 20 Sep 2023 13:07:44 +0300 Message-ID: <301c803d8486b0df8aefad3fb3cc10dc58671985.1695204156.git.leon@kernel.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Patrisious Haddad Adjust mlx5 function which maps the speed rate from IB spec values to internal driver values to be able to handle speeds up to 800Gb. Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky --- drivers/infiniband/hw/mlx5/qp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index 9261df5328a4..c047c5d66737 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c @@ -3438,7 +3438,7 @@ static int ib_rate_to_mlx5(struct mlx5_ib_dev *dev, u8 rate) if (rate == IB_RATE_PORT_CURRENT) return 0; - if (rate < IB_RATE_2_5_GBPS || rate > IB_RATE_600_GBPS) + if (rate < IB_RATE_2_5_GBPS || rate > IB_RATE_800_GBPS) return -EINVAL; stat_rate_support = MLX5_CAP_GEN(dev->mdev, stat_rate_support); From patchwork Wed Sep 20 10:07:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leon Romanovsky X-Patchwork-Id: 13392460 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C4DED154B7 for ; Wed, 20 Sep 2023 10:08:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BA704C433C7; Wed, 20 Sep 2023 10:08:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695204495; bh=nk9sUgWDYC5lpjFZ2LPWQ3HlWeTCNQ9xYNRq9k9Bbnw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wm5c44I6MfX1bBfajxOD6q3Tef68IFN8FwnurRhWTeFcnucuF81VdADL1RIKUOICe tWfh28QwfKjuEEtEjWIgq9xSJ0MkRKt/uMoPmvgg3VSPRlDhP53orBw1b2nF6eaIwj BttVVwaznlnovPNaXQn531yFoxyWVxtwgx9t8E92ar+uqKR0Ed7ABUoKyLtB1iAooA znSHCWApt+cA4lZEVKPjPD70OrRq47f0lw0lafa4AOuYAu8zHVrhT+J5zUQHBtGN5z KXkCKl1Zwfw38PArAaoEYFgXCZBQ/Y5AMlfesTakEr7494pri2hjJxY5dRedDis+ne zPI17gs+GlFsA== From: Leon Romanovsky To: Jason Gunthorpe Cc: Patrisious Haddad , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-rdma@vger.kernel.org, Mark Zhang , netdev@vger.kernel.org, Or Har-Toov , Paolo Abeni , Saeed Mahameed Subject: [PATCH rdma-next 6/6] RDMA/ipoib: Add support for XDR speed in ethtool Date: Wed, 20 Sep 2023 13:07:45 +0300 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 From: Patrisious Haddad The IBTA specification 1.7 has new speed - XDR, supporting signaling rate of 200Gb. Ethtool support of IPoIB driver translates IB speed to signaling rate. Added translation of XDR IB type to rate of 200Gb Ethernet speed. Signed-off-by: Patrisious Haddad Reviewed-by: Mark Zhang Signed-off-by: Leon Romanovsky --- drivers/infiniband/ulp/ipoib/ipoib_ethtool.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c index 8af99b18d361..7da94fb8d7fa 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ethtool.c @@ -174,6 +174,8 @@ static inline int ib_speed_enum_to_int(int speed) return SPEED_50000; case IB_SPEED_NDR: return SPEED_100000; + case IB_SPEED_XDR: + return SPEED_200000; } return SPEED_UNKNOWN;