-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feat rxd av #2
Feat rxd av #2
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -115,6 +115,7 @@ static ssize_t rxd_generic_atomic(struct rxd_ep *rxd_ep, | |
struct fi_rma_iov rma_iov[RXD_IOV_LIMIT]; | ||
fi_addr_t rxd_addr; | ||
ssize_t ret = -FI_EAGAIN; | ||
struct rxd_peer *peer_entry; | ||
|
||
assert(count <= RXD_IOV_LIMIT); | ||
assert(rma_count <= RXD_IOV_LIMIT); | ||
|
@@ -134,8 +135,11 @@ static ssize_t rxd_generic_atomic(struct rxd_ep *rxd_ep, | |
if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) | ||
goto out; | ||
|
||
rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[addr]; | ||
ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); | ||
peer_entry = rxd_get_peer_by_fiaddr(rxd_ep, addr, &rxd_addr); | ||
if(!peer_entry) | ||
goto out; | ||
|
||
ret = rxd_send_rts_if_needed(rxd_ep, peer_entry); | ||
if (ret) | ||
goto out; | ||
|
||
|
@@ -145,7 +149,7 @@ static ssize_t rxd_generic_atomic(struct rxd_ep *rxd_ep, | |
if (!tx_entry) | ||
goto out; | ||
|
||
if (rxd_ep->peers[rxd_addr].peer_addr != FI_ADDR_UNSPEC) | ||
if (peer_entry->peer_addr != FI_ADDR_UNSPEC) | ||
(void) rxd_start_xfer(rxd_ep, tx_entry); | ||
|
||
out: | ||
|
@@ -221,6 +225,7 @@ static ssize_t rxd_atomic_inject(struct fid_ep *ep_fid, const void *buf, | |
struct fi_rma_iov rma_iov; | ||
fi_addr_t rxd_addr; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There are two function arguments fi_addr_t dest_addr and uint64_t addr, the dest_addr argument is not being used. the man pages give addr as destination for remote memory while dest_addr as dest address for connectionless operations. what is the difference between the two. are they being used correctly in this function. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The dest_addr refers to the peer. It's the same as the fi_addr. |
||
ssize_t ret = -FI_EAGAIN; | ||
struct rxd_peer *peer_entry; | ||
|
||
iov.iov_base = (void *) buf; | ||
iov.iov_len = count * ofi_datatype_size(datatype); | ||
|
@@ -235,8 +240,11 @@ static ssize_t rxd_atomic_inject(struct fid_ep *ep_fid, const void *buf, | |
if (ofi_cirque_isfull(rxd_ep->util_ep.tx_cq->cirq)) | ||
goto out; | ||
|
||
rxd_addr = rxd_ep_av(rxd_ep)->fi_addr_table[dest_addr]; | ||
ret = rxd_send_rts_if_needed(rxd_ep, rxd_addr); | ||
peer_entry = rxd_get_peer_by_fiaddr(rxd_ep, addr, &rxd_addr); | ||
if(!peer_entry) | ||
goto out; | ||
|
||
ret = rxd_send_rts_if_needed(rxd_ep, peer_entry); | ||
if (ret) | ||
goto out; | ||
|
||
|
@@ -245,8 +253,7 @@ static ssize_t rxd_atomic_inject(struct fid_ep *ep_fid, const void *buf, | |
0, NULL, 0, datatype, op); | ||
if (!tx_entry) | ||
goto out; | ||
|
||
if (rxd_ep->peers[rxd_addr].peer_addr == FI_ADDR_UNSPEC) | ||
if (peer_entry->peer_addr == FI_ADDR_UNSPEC) | ||
goto out; | ||
|
||
(void) rxd_start_xfer(rxd_ep, tx_entry); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second thought, would it be possible to merge this with the rxd_fiaddr_has_lookup call? Ie
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
currently rxd_fiaddr_hash_lookup returns rxd_addr. In some cases we call other functions like rxd_send_rts_if_needed or rxd_rx_entry_init(rxd_msg.c) or rxd_tx_entry_init_rma( rxd_rma.c) which does not use the peer_entry but just the rxd_addr as input. so we will still need to call the rxd_fiaddr_hash_lookup separately.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rxd_fiaddr_hash_lookup should only need to be called in calls where the app should have already inserted the address into the AV and therefore initialized the peer so we should be able to merge these calls. If the lookup fails and we can't return a peer, we will never get to rxd_send_rts_if_needed or rxd_tx_entry_init_rma.
Same thing with the rx path - if the address is not ADDR_UNSPEC, then it should have been inserted into the AV so it should be able to return the peer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so this comment is for all those places where ofi_bufpool_get_ibuf is being called after a rxd_fiaddr_hash_lookup right. not for every call for ofi_bufpool_get_ibuf when we are not doing a fi_addr-> rxd_addr lookup.