]> git.hungrycats.org Git - linux/commit
RDMA/mlx5: Fix validation of max_rd_atomic caps for DC
authorMaor Gottlieb <maorg@nvidia.com>
Wed, 28 Dec 2022 12:56:10 +0000 (14:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2023 11:00:38 +0000 (12:00 +0100)
commitf21c010cef9b5bd0b9a1fa3d40016a218c8427c0
treeca801dc3dcfb8f11c106b45747aab1956c4c6352
parent9a97da4674b890b4c28f5f12beba8c33a9cd2f49
RDMA/mlx5: Fix validation of max_rd_atomic caps for DC

[ Upstream commit 8de8482fe5732fbef4f5af82bc0c0362c804cd1f ]

Currently, when modifying DC, we validate max_rd_atomic user attribute
against the RC cap, validate against DC. RC and DC QP types have different
device limitations.

This can cause userspace created DC QPs to malfunction.

Fixes: c32a4f296e1d ("IB/mlx5: Add support for DC Initiator QP")
Link: https://lore.kernel.org/r/0c5aee72cea188c3bb770f4207cce7abc9b6fc74.1672231736.git.leonro@nvidia.com
Signed-off-by: Maor Gottlieb <maorg@nvidia.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/mlx5/qp.c