Skip to content

Commit 25a4517

Browse files
monis410dledford
authored andcommitted
IB/mlx5: Fix MR re-registration flow to use UMR properly
The UMR WQE in the MR re-registration flow requires that modify_atomic and modify_entity_size capabilities are enabled. Therefore, check that the these capabilities are present before going to umr flow and go through slow path if not. Fixes: c8d75a9 ("IB/mlx5: Respect new UMR capabilities") Signed-off-by: Moni Shoua <[email protected]> Reviewed-by: Guy Levi <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Doug Ledford <[email protected]>
1 parent 0081575 commit 25a4517

File tree

1 file changed

+2
-1
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+2
-1
lines changed

drivers/infiniband/hw/mlx5/mr.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1446,7 +1446,8 @@ int mlx5_ib_rereg_user_mr(struct ib_mr *ib_mr, int flags, u64 start,
14461446
goto err;
14471447
}
14481448

1449-
if (flags & IB_MR_REREG_TRANS && !use_umr_mtt_update(mr, addr, len)) {
1449+
if (!mlx5_ib_can_use_umr(dev, true) ||
1450+
(flags & IB_MR_REREG_TRANS && !use_umr_mtt_update(mr, addr, len))) {
14501451
/*
14511452
* UMR can't be used - MKey needs to be replaced.
14521453
*/

0 commit comments

Comments
 (0)