summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/mlx5/wr.c
diff options
context:
space:
mode:
authorMichael Guralnik <michaelgur@nvidia.com>2025-01-06 20:27:10 +0200
committerLeon Romanovsky <leon@kernel.org>2025-01-13 06:40:19 -0500
commit235f238402194a78ac5fb882a46717eac817e5d1 (patch)
treeb09ec35aef95029c91f9492748299da053e25b48 /drivers/infiniband/hw/mlx5/wr.c
parent76b26917e4ff9545b321730cd3b64fdd2e043769 (diff)
RDMA/mlx5: Fix indirect mkey ODP page count
Restrict the check for the number of pages handled during an ODP page fault to direct mkeys. Perform the check right after handling the page fault and don't propagate the number of handled pages to callers. Indirect mkeys and their associated direct mkeys can have different start addresses. As a result, the calculation of the number of pages to handle for an indirect mkey may not match the actual page fault handling done on the direct mkey. For example: A 4K sized page fault on a KSM mkey that has a start address that is not aligned to a page will result a calculation that assumes the number of pages required to handle are 2. While the underlying MTT might be aligned will require fetching only a single page. Thus, do the calculation and compare number of pages handled only per direct mkey. Fixes: db570d7deafb ("IB/mlx5: Add ODP support to MW") Signed-off-by: Michael Guralnik <michaelgur@nvidia.com> Reviewed-by: Artemy Kovalyov <artemyko@nvidia.com> Link: https://patch.msgid.link/86c483d9e75ce8fe14e9ff85b62df72b779f8ab1.1736187990.git.leon@kernel.org Signed-off-by: Leon Romanovsky <leon@kernel.org>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/wr.c')
0 files changed, 0 insertions, 0 deletions