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);