Skip to content

Commit

Permalink
prov/efa: Don't do handshake for local read
Browse files Browse the repository at this point in the history
Currently, we always trigger a handshake to check the interoperatability
on two sides for rdma read capabilities, before determining the protocol
to use. However, if the read is from the self peer, we don't need such
handshake and just need to check the rdma capability for local ep.

Signed-off-by: Shi Jin <[email protected]>
  • Loading branch information
shijin-aws committed Dec 14, 2023
1 parent b396355 commit fe32912
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion prov/efa/src/rdm/efa_rdm_rma.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,10 @@ ssize_t efa_rdm_rma_readmsg(struct fid_ep *ep, const struct fi_msg_rma *msg, uin

/*
* A handshake is required to choose the correct protocol (whether to use device read).
* For local read (read from self ep), such handshake is not needed because we only
* need to check the local ep's capabilities.
*/
if (!(peer->flags & EFA_RDM_PEER_HANDSHAKE_RECEIVED)) {
if (!(peer->is_self) && !(peer->flags & EFA_RDM_PEER_HANDSHAKE_RECEIVED)) {
err = efa_rdm_ep_trigger_handshake(efa_rdm_ep, txe->addr);
err = err ? err : -FI_EAGAIN;
goto out;
Expand Down

0 comments on commit fe32912

Please sign in to comment.