Skip to content

Commit

Permalink
UCP:rndv multirail support infrastructure + protocol (2)
Browse files Browse the repository at this point in the history
- code beautify
  • Loading branch information
Sergey Oblomov committed Oct 9, 2017
1 parent 3dd33cc commit bac9ce8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
3 changes: 1 addition & 2 deletions src/ucp/core/ucp_request.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,7 @@ void ucp_iov_buffer_memh_dereg(uct_md_h uct_md, uct_mem_h *memh,
UCS_PROFILE_FUNC(ucs_status_t, ucp_request_memory_reg,
(context, rsc_index, buffer, length, datatype, state),
ucp_context_t *context, ucp_rsc_index_t rsc_index, void *buffer,
size_t length, ucp_datatype_t datatype,
ucp_dt_state_t *state)
size_t length, ucp_datatype_t datatype, ucp_dt_state_t *state)
{
ucp_rsc_index_t mdi = context->tl_rscs[rsc_index].md_index;
uct_md_h uct_md = context->tl_mds[mdi].md;
Expand Down
3 changes: 1 addition & 2 deletions src/ucp/core/ucp_request.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ ucs_status_t ucp_request_send_buffer_reg(ucp_request_t *req, ucp_lane_index_t la
void ucp_request_send_buffer_dereg(ucp_request_t *req, ucp_lane_index_t lane);

ucs_status_t ucp_request_memory_reg(ucp_context_t *context, ucp_rsc_index_t rsc_index,
void *buffer, size_t length,
ucp_datatype_t datatype,
void *buffer, size_t length, ucp_datatype_t datatype,
ucp_dt_state_t *state);

void ucp_request_memory_dereg(ucp_context_t *context, ucp_rsc_index_t rsc_index,
Expand Down
8 changes: 4 additions & 4 deletions src/ucp/tag/rndv.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ static size_t ucp_tag_rndv_pack_mrail_rkeys(ucp_request_t *sreq, void *rkey_buf,
ucp_ep_t *ep = sreq->send.ep;
ucp_dt_state_t *state = &sreq->send.state;
size_t packet = 0;
int i;
int cnt = 0;
int i;
ucp_lane_index_t lane;

ucs_assert(UCP_DT_IS_CONTIG(sreq->send.datatype));
Expand Down Expand Up @@ -355,8 +355,8 @@ UCS_PROFILE_FUNC(ucs_status_t, ucp_proto_progress_rndv_get_zcopy, (self),
(void*)rndv_req->send.buffer + offset, length);

if ((rndv_req->send.rndv_get.use_mrail) &&
((ucp_request_is_empty_rail(&rndv_req->send.state, rndv_req->send.rndv_get.rail_idx)) ||
(rndv_req->send.rndv_get.rail_idx >= UCP_MAX_RAILS))) {
((ucp_request_is_empty_rail(&rndv_req->send.state, rndv_req->send.rndv_get.rail_idx)) ||
(rndv_req->send.rndv_get.rail_idx >= UCP_MAX_RAILS))) {
rndv_req->send.rndv_get.rail_idx = 0;
}

Expand Down Expand Up @@ -727,7 +727,7 @@ static void ucp_rndv_prepare_zcopy_send_buffer(ucp_request_t *sreq, ucp_ep_h ep)
sreq->send.state.dt.contig.memh = UCT_MEM_HANDLE_NULL;
ucp_request_clear_rails(&sreq->send.state);
} else if ((ucp_ep_is_rndv_lane_present(ep, 0)) &&
(ucp_ep_get_am_lane(ep) != ucp_ep_get_rndv_get_lane(ep, 0))) {
(ucp_ep_get_am_lane(ep) != ucp_ep_get_rndv_get_lane(ep, 0))) {
/* dereg the original send request since we are going to send on the AM lane next */
ucp_rndv_rma_request_send_buffer_dereg(sreq);
sreq->send.state.dt.contig.memh = UCT_MEM_HANDLE_NULL;
Expand Down

0 comments on commit bac9ce8

Please sign in to comment.