]> git.ipfire.org Git - thirdparty/linux.git/commit
RDMA/mlx5: Align mkc page size capability check to PRM
authorMichael Guralnik <michaelgur@nvidia.com>
Wed, 9 Jul 2025 06:42:10 +0000 (09:42 +0300)
committerLeon Romanovsky <leon@kernel.org>
Sun, 13 Jul 2025 07:14:14 +0000 (03:14 -0400)
commitfcfb03597b7d7737aac6bdfda1f7b5d152cfed73
treec88c1b57eaf687b3e97e80809f62469d3383ff6a
parent9879bddf5ab47ad3d889d31ca7550605a4207dba
RDMA/mlx5: Align mkc page size capability check to PRM

Align the capabilities checked when using the log_page_size 6th bit in the
mkey context to the PRM definition. The upper and lower bounds are set by
max/min caps, and modification of the 6th bit by UMR is allowed only when
a specific UMR cap is set.
Current implementation falsely assumes all page sizes up-to 2^63 are
supported when the UMR cap is set. In case the upper bound cap is lower
than 63, this might result a FW syndrome on mkey creation, e.g:
mlx5_core 0000:c1:00.0: mlx5_cmd_out_err:832:(pid 0): CREATE_MKEY(0×200) op_mod(0×0) failed, status bad parameter(0×3), syndrome (0×38a711), err(-22)

Previous cap enforcement is still correct for all current HW, FW and
driver combinations. However, this patch aligns the code to be PRM
compliant in the general case.

Signed-off-by: Michael Guralnik <michaelgur@nvidia.com>
Link: https://patch.msgid.link/eab4eeb4785105a4bb5eb362dc0b3662cd840412.1751979184.git.leon@kernel.org
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mlx5/mlx5_ib.h
drivers/infiniband/hw/mlx5/mr.c