RDMA/mlx5: Prevent UMR usage with RO only when we have RO caps
authorMichael Guralnik <michaelgur@mellanox.com>
Thu, 27 Feb 2020 11:38:34 +0000 (13:38 +0200)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 2 Mar 2020 15:10:38 +0000 (11:10 -0400)
commit5e29d1443c46b6ca70a4c940a67e8c09f05dcb7e
tree8e8343851d3e7f0fafb0b6df1d1153f0c21ac9c7
parent75d03665081e00881e76eaa3a7635c9202a82600
RDMA/mlx5: Prevent UMR usage with RO only when we have RO caps

Relaxed ordering is not supported in UMR so we are disabling UMR usage
when user passes relaxed ordering access flag.

Enable using UMR when user requested relaxed ordering but there are no
relaxed ordering capabilities.

This will prevent user from unnecessarily registering a new mkey.

Fixes: d6de0bb1850f ("RDMA/mlx5: Set relaxed ordering when requested")
Link: https://lore.kernel.org/r/20200227113834.94233-1-leon@kernel.org
Signed-off-by: Michael Guralnik <michaelgur@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/mlx5/mlx5_ib.h