Skip to content

Commit 75b7b86

Browse files
Artemy-Mellanoxjgunthorpe
authored andcommitted
IB/mlx5: Fix page fault handling for MW
Memory windows are implemented with an indirect MKey, when a page fault event comes for a MW Mkey we need to find the MR at the end of the list of the indirect MKeys by iterating on all items from the first to the last. The offset calculated during this process has to be zeroed after the first iteration or the next iteration will start from a wrong address, resulting incorrect ODP faulting behavior. Fixes: db570d7 ("IB/mlx5: Add ODP support to MW") Signed-off-by: Artemy Kovalyov <artemyko@mellanox.com> Signed-off-by: Moni Shoua <monis@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
1 parent 605728e commit 75b7b86

File tree

1 file changed

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

1 file changed

+1
-0
lines changed

drivers/infiniband/hw/mlx5/odp.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ static int pagefault_single_data_segment(struct mlx5_ib_dev *dev,
743743
head = frame;
744744

745745
bcnt -= frame->bcnt;
746+
offset = 0;
746747
}
747748
break;
748749

0 commit comments

Comments
 (0)