Skip to content

Commit

Permalink
UD/VERBS: fixed max_hdr_size value initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Oblomov committed Jan 28, 2019
1 parent 26580ec commit 06120d0
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/uct/ib/ud/verbs/ud_verbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ uct_ud_verbs_ep_am_zcopy(uct_ep_h tl_ep, uint8_t id, const void *header,
UCT_CHECK_IOV_SIZE(iovcnt, uct_ib_iface_get_max_iov(&iface->super.super) - 1,
"uct_ud_verbs_ep_am_zcopy");

UCT_CHECK_LENGTH(sizeof(uct_ud_neth_t) + header_length, 0,
iface->super.super.config.seg_size, "am_zcopy header");
UCT_CHECK_LENGTH(sizeof(uct_ud_neth_t) + sizeof(uct_ud_zcopy_desc_t) + header_length,
0, iface->super.super.config.seg_size, "am_zcopy header");

UCT_UD_CHECK_ZCOPY_LENGTH(&iface->super, header_length,
uct_iov_total_length(iov, iovcnt));
Expand Down Expand Up @@ -404,7 +404,9 @@ uct_ud_verbs_iface_query(uct_iface_h tl_iface, uct_iface_attr_t *iface_attr)
}

iface_attr->overhead = 105e-9; /* Software overhead */
iface_attr->cap.am.max_hdr = iface->super.config.seg_size - sizeof(uct_ud_neth_t);
iface_attr->cap.am.max_hdr = uct_ib_iface_hdr_size(iface->super.config.seg_size,
sizeof(uct_ud_neth_t) +
sizeof(uct_ud_zcopy_desc_t));

return UCS_OK;
}
Expand Down

0 comments on commit 06120d0

Please sign in to comment.