Skip to content

RDMA/irdma: Fix FRWR and PBLE handling for PAGE_SIZE > 4K

Jacob Moroni linux-rdma 1 version Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2RDMA/irdma: Fix FRWR logic for PAGE_SIZE > 4Kdrivers/infiniband/hw/irdma/ctrl.c drivers/infiniband/hw/irdma/defs.h drivers/infiniband/hw/irdma/verbs.c+38 -31 reply
2/2RDMA/irdma: Fix paged PBLE and virtual AEQ for PAGE_SIZE > 4Kdrivers/infiniband/hw/irdma/hw.c drivers/infiniband/hw/irdma/utils.c+15 -111 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchLeah LiTatyana Nikolova
1/2T-b A-b
2/2T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH rdma-next 0/2] RDMA/irdma: Fix FRWR and PBLE handling for PAGE_SIZE > 4K

The irdma HW only supports 4K and 2M pages (plus 1G on newer HW), but parts of the driver assumed PAGE_SIZE == 4K. On kernels with a larger PAGE_SIZE (like arm64 with 64K pages), this resulted in a few issues:

- FRWRs from ULPs that pass PAGE_SIZE to ib_map_mr_sg() end up getting mistranslated by the HW (discovered by observing SMMU faults).
- Paged PBLE chunks and the virtual AEQ PBL point to the wrong offsets compared to what the driver assumed.

The first issue is fixed by building the FRWR page list from 4K pages when the requested page size isn't supported (and scaling the PBL allocation accordingly) and the second issue is fixed by accounting for the potential difference between PAGE_SIZE and the HW's expected 4K page size (so a single page may end up populating multiple HW page descriptors). Patch 2 depends on IRDMA_HW_PAGES_PER_PAGE, which is added by patch 1.

Tested by running the same NFS/RDMA test that previously resulted in SMMU errors on an arm64 system with a 64K kernel.

Jacob Moroni (2):
RDMA/irdma: Fix FRWR logic for PAGE_SIZE > 4K RDMA/irdma: Fix paged PBLE and virtual AEQ for PAGE_SIZE > 4K

 drivers/infiniband/hw/irdma/ctrl.c  |  4 +++-
 drivers/infiniband/hw/irdma/defs.h  |  1 +
 drivers/infiniband/hw/irdma/hw.c    |  4 ++--
 drivers/infiniband/hw/irdma/utils.c | 22 ++++++++++--------
 drivers/infiniband/hw/irdma/verbs.c | 36 +++++++++++++++++++++++++++--
 5 files changed, 53 insertions(+), 14 deletions(-)

base-commit: c3e8e9451e6f1b69f685b75e0fbf14f3d0fb2539

Signature · 1 line
2.56.0.218.g1ec904b173-goog