Skip to content

Commit 3c382dd

Browse files
charlesstollshijin-aws
authored andcommitted
[v2.5.x]prov/efa: Skip dmabuf supported check for explicit mr call
Currently, efa caches whether or not dmabuf fd memory registration works or not for both the explicit and implicit memory registration paths. This patch changes it so that the explicit path does not set any flags, in favor of just attempting the memory registration every time the caller asks. Signed-off-by: Charles Stoll <stollcha@amazon.com> (cherry picked from commit 6ca213f)
1 parent 291548a commit 3c382dd

1 file changed

Lines changed: 5 additions & 11 deletions

File tree

prov/efa/src/efa_mr.c

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -631,12 +631,6 @@ static struct ibv_mr *efa_mr_reg_ibv_mr(struct efa_mr *efa_mr,
631631
EFA_WARN(FI_LOG_MR, "FI_MR_DMABUF set but mr_attr->dmabuf == NULL\n");
632632
return NULL;
633633
}
634-
if (DMABUF_IS_NOT_SUPPORTED(p_info)) {
635-
EFA_WARN(FI_LOG_MR,
636-
"Requested FI_MR_DMABUF, but dmabuf not supported for %s\n",
637-
fi_tostr(&efa_mr->peer.iface, FI_TYPE_HMEM_IFACE));
638-
return NULL;
639-
}
640634

641635
EFA_INFO(FI_LOG_MR,
642636
"FI_MR_DMABUF: fd=%d offset=%lu len=%zu\n",
@@ -651,11 +645,11 @@ static struct ibv_mr *efa_mr_reg_ibv_mr(struct efa_mr *efa_mr,
651645
mr_attr->dmabuf->fd,
652646
access);
653647

654-
if (!dmabuf_mr) {
655-
efa_mark_dmabuf_fail(p_info, efa_mr->peer.iface);
656-
} else {
657-
p_info->dmabuf_supported_by_device = EFA_DMABUF_SUPPORTED;
658-
}
648+
if (!dmabuf_mr)
649+
EFA_WARN(FI_LOG_MR,
650+
"Could not register dmabuf fd=%d offset=%lu len=%zu\n",
651+
mr_attr->dmabuf->fd, mr_attr->dmabuf->offset,
652+
mr_attr->dmabuf->len);
659653

660654
return dmabuf_mr;
661655
}

0 commit comments

Comments
 (0)