Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.21.x]prov/efa: always use p2p for system memory #10398

Merged
merged 1 commit into from
Sep 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions prov/efa/src/rdm/efa_rdm_ep.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,13 +310,11 @@ bool efa_rdm_ep_should_write_rnr_completion(struct efa_rdm_ep *ep)
static inline
int efa_rdm_ep_use_p2p(struct efa_rdm_ep *efa_rdm_ep, struct efa_mr *efa_mr)
{
if (!efa_mr)
return 0;

/*
* always send from host buffers if we have a descriptor
* P2P is always available for host memory (Unregistered buffer will be
* regarded as host memory as EFA provider requires FI_MR_HMEM)
*/
if (efa_mr->peer.iface == FI_HMEM_SYSTEM)
if (!efa_mr || efa_mr->peer.iface == FI_HMEM_SYSTEM)
return 1;

if (efa_rdm_ep_domain(efa_rdm_ep)->hmem_info[efa_mr->peer.iface].p2p_supported_by_device)
Expand Down
Loading