Skip to content

Commit

Permalink
prov/efa: Respect FI_MR_LOCAL in transport path
Browse files Browse the repository at this point in the history
Currently, efa provider tries to register user buffer in transport
in multiple places without checking whether application sets
FI_MR_LOCAL, which is not complied with Libfabric standard. Add
warning when application sets FI_MR_LOCAL but does not provide
a valid desc parameter into applicable data transfer operations.

Signed-off-by: Jessie Yang <[email protected]>
  • Loading branch information
jiaxiyan committed Aug 28, 2024
1 parent fe1bf36 commit 8cdb10f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions prov/efa/src/rdm/efa_rdm_ope.c
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,13 @@ void efa_rdm_ope_try_fill_desc(struct efa_rdm_ope *ope, int mr_iov_start, uint64
if (ope->desc[i])
continue;

if (ope->ep->base_ep.domain->mr_local) {
EFA_WARN(FI_LOG_EP_CTRL,
"FI_MR_LOCAL is set, but no valid desc is provided."
"buf: %p len: %ld access: %lx\n",
ope->iov[i].iov_base, ope->iov[i].iov_len, access);
}

err = fi_mr_regv(
&efa_rdm_ep_domain(ope->ep)->util_domain.domain_fid,
ope->iov + i, 1, access, 0, 0, 0, &ope->mr[i],
Expand Down

0 comments on commit 8cdb10f

Please sign in to comment.