Skip to content

Commit

Permalink
fix prev #2
Browse files Browse the repository at this point in the history
  • Loading branch information
artpol84 committed Dec 22, 2017
1 parent cde837b commit 0d02cd4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/uct/ib/base/ib_umr.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,11 @@ ucs_status_t uct_ib_umr_reg_nc(uct_md_h uct_md, const uct_iov_t *iov,
int i;
size_t length;

length = 0;
for(i=0;i<iovcnt;i++) {
length += iov[i].length;
}

uct_ib_md_t *md = ucs_derived_of(uct_md, uct_ib_md_t);
if (ucs_unlikely(md->umr.qp == NULL)) {
return UCS_ERR_UNSUPPORTED;
Expand All @@ -484,6 +489,8 @@ ucs_status_t uct_ib_umr_reg_nc(uct_md_h uct_md, const uct_iov_t *iov,
return status;
}

umr->mr->addr = iov[0].buffer;
umr->mr->length = length;
memh->mr = umr->mr;
memh->umr = umr;
memh->lkey = umr->mr->lkey;
Expand All @@ -494,10 +501,6 @@ ucs_status_t uct_ib_umr_reg_nc(uct_md_h uct_md, const uct_iov_t *iov,
}

umr = memh->umr;
length = 0;
for(i=0;i<iovcnt;i++) {
length += iov[i].length;
}
umr->mr->addr = iov[0].buffer;
umr->mr->length = length;
*wr_p = &memh->umr->wr;
Expand Down

0 comments on commit 0d02cd4

Please sign in to comment.