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: 13392452 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E5328CE79B9 for ; Wed, 20 Sep 2023 10:08:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234061AbjITKIU (ORCPT ); Wed, 20 Sep 2023 06:08:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43700 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234216AbjITKIS (ORCPT ); Wed, 20 Sep 2023 06:08:18 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E680AF5 for ; Wed, 20 Sep 2023 03:08:11 -0700 (PDT) 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: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org 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);