mirror of
https://github.com/torvalds/linux.git
synced 2025-11-06 19:50:24 +02:00
Fixing the ODP registration flow to set the iova correctly. The calculation in ib_umem_num_dma_blocks() function assumes the iova of the umem is set correctly. When iova is not set, the calculation in ib_umem_num_dma_blocks() is equivalent to length/page_size, which is true only when memory is aligned. For unaligned memory, iova must be set for the ALIGN() in the ib_umem_num_dma_blocks() to take effect and return a correct value. mlx5_ib uses ib_umem_num_dma_blocks() to decide the mkey size to use for the MR. Without this fix, when registering unaligned ODP MR, a wrong size mkey might be chosen and this might cause the UMR to fail. UMR would fail over insufficient size to update the mkey translation: infiniband mlx5_0: dump_cqe:273:(pid 0): dump error cqe 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00000030: 00 00 00 00 0f 00 78 06 25 00 00 58 00 da ac d2 infiniband mlx5_0: mlx5_ib_post_send_wait:806:(pid 20311): reg umr failed (6) infiniband mlx5_0: pagefault_real_mr:661:(pid 20311): Failed to update mkey page tables Fixes: |
||
|---|---|---|
| .. | ||
| addr.c | ||
| agent.c | ||
| agent.h | ||
| cache.c | ||
| cgroup.c | ||
| cm.c | ||
| cm_msgs.h | ||
| cm_trace.c | ||
| cm_trace.h | ||
| cma.c | ||
| cma_configfs.c | ||
| cma_priv.h | ||
| cma_trace.c | ||
| cma_trace.h | ||
| core_priv.h | ||
| counters.c | ||
| cq.c | ||
| device.c | ||
| ib_core_uverbs.c | ||
| iwcm.c | ||
| iwcm.h | ||
| iwpm_msg.c | ||
| iwpm_util.c | ||
| iwpm_util.h | ||
| lag.c | ||
| mad.c | ||
| mad_priv.h | ||
| mad_rmpp.c | ||
| mad_rmpp.h | ||
| Makefile | ||
| mr_pool.c | ||
| multicast.c | ||
| netlink.c | ||
| nldev.c | ||
| opa_smi.h | ||
| packer.c | ||
| rdma_core.c | ||
| rdma_core.h | ||
| restrack.c | ||
| restrack.h | ||
| roce_gid_mgmt.c | ||
| rw.c | ||
| sa.h | ||
| sa_query.c | ||
| security.c | ||
| smi.c | ||
| smi.h | ||
| sysfs.c | ||
| trace.c | ||
| ucma.c | ||
| ud_header.c | ||
| umem.c | ||
| umem_dmabuf.c | ||
| umem_odp.c | ||
| user_mad.c | ||
| uverbs.h | ||
| uverbs_cmd.c | ||
| uverbs_ioctl.c | ||
| uverbs_main.c | ||
| uverbs_marshall.c | ||
| uverbs_std_types.c | ||
| uverbs_std_types_async_fd.c | ||
| uverbs_std_types_counters.c | ||
| uverbs_std_types_cq.c | ||
| uverbs_std_types_device.c | ||
| uverbs_std_types_dm.c | ||
| uverbs_std_types_flow_action.c | ||
| uverbs_std_types_mr.c | ||
| uverbs_std_types_qp.c | ||
| uverbs_std_types_srq.c | ||
| uverbs_std_types_wq.c | ||
| uverbs_uapi.c | ||
| verbs.c | ||