Skip to content

Commit

Permalink
Merge pull request #131 from yosefe/topic/am-zcopy-fix-comp-error-int3
Browse files Browse the repository at this point in the history
UCP/PROTO: Fix error handling for AM_ZCOPY
  • Loading branch information
yosefe authored Apr 14, 2021
2 parents d59a39e + d88d394 commit 012cca7
Showing 1 changed file with 6 additions and 12 deletions.
18 changes: 6 additions & 12 deletions src/ucp/proto/proto_am.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,17 +99,11 @@ void ucp_proto_am_zcopy_completion(uct_completion_t *self,
{
ucp_request_t *req = ucs_container_of(self, ucp_request_t,
send.state.uct_comp);
if (req->send.state.dt.offset == req->send.length) {
ucp_proto_am_zcopy_req_complete(req, status);
} else if (status != UCS_OK) {
ucs_assert(req->send.state.uct_comp.count == 0);
ucs_assert(status != UCS_INPROGRESS);

/* NOTE: the request is in pending queue if data was not completely sent,
* just dereg the buffer here and complete request on purge
* pending later.
*/
ucp_request_send_buffer_dereg(req);
req->send.state.uct_comp.func = NULL;

if (req->send.state.dt.offset != req->send.length) {
/* Cannot complete since not all fragments were posted yet */
return;
}

ucp_proto_am_zcopy_req_complete(req, status);
}

0 comments on commit 012cca7

Please sign in to comment.