Skip to content

Commit

Permalink
UCP/RNDV: fix ATP/ATS completion on failure
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeny-leksikov committed Oct 1, 2020
1 parent b722f0a commit 720b62b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/ucp/core/ucp_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ ucp_request_send_start(ucp_request_t *req, ssize_t max_short,

void ucp_request_handle_send_error(ucp_request_t *req, ucs_status_t status)
{
if (req->send.state.uct_comp.func) {
if (req->send.uct.func == ucp_proto_progress_am_single) {
req->send.proto.comp_cb(req);
} else if (req->send.state.uct_comp.func) {
/* fast-forward the sending state to complete the operation when last
* network completion callback is called
*/
Expand Down
8 changes: 5 additions & 3 deletions src/ucp/proto/proto_am.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,12 @@ ucs_status_t ucp_proto_progress_am_single(uct_pending_req_t *self)
ucs_status_t status = ucp_do_am_single(self, req->send.proto.am_id,
ucp_proto_pack,
ucp_proto_max_packed_size());
if (status == UCS_OK) {
req->send.proto.comp_cb(req);
ucs_assert(status != UCS_INPROGRESS);
if (status == UCS_ERR_NO_RESOURCE) {
return UCS_ERR_NO_RESOURCE;
}
return status;
req->send.proto.comp_cb(req);
return UCS_OK;
}

void ucp_proto_am_zcopy_req_complete(ucp_request_t *req, ucs_status_t status)
Expand Down

0 comments on commit 720b62b

Please sign in to comment.