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)
committerLeon Romanovsky <leonro@nvidia.com>
Sun, 1 Jan 2023 07:40:35 +0000 (09:40 +0200)
commit8de8482fe5732fbef4f5af82bc0c0362c804cd1f
treed29f7a7ad5207a0bc18e497f326c9b54e8e86534
parent38b50aa44495d5eb4218f0b82fc2da76505cec53
RDMA/mlx5: Fix validation of max_rd_atomic caps for DC

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>
drivers/infiniband/hw/mlx5/qp.c