1
1

Set send_flags correctly in btl_openib_put. Otherwise we may reuse flags from

previous use of the buffer and they may be incorrect.

This commit was SVN r17058.
Этот коммит содержится в:
Gleb Natapov 2008-01-07 10:19:07 +00:00
родитель ebad33ad86
Коммит c3bbf69356
3 изменённых файлов: 8 добавлений и 5 удалений

Просмотреть файл

@ -1156,6 +1156,7 @@ int mca_btl_openib_put( mca_btl_base_module_t* btl,
/* Setting opcode on a frag constructor isn't enough since prepare_src
* may return send_frag instead of put_frag */
frag->sr_desc.opcode = IBV_WR_RDMA_WRITE;
frag->sr_desc.send_flags = ib_send_flags(descriptor->des_src->seg_len, ep);
if(ibv_post_send(ep->qps[qp].qp->lcl_qp, &frag->sr_desc, &bad_wr))
return OMPI_ERROR;

Просмотреть файл

@ -60,11 +60,7 @@ static int post_send(mca_btl_openib_endpoint_t *ep,
sg->length = seg->seg_len + sizeof(mca_btl_openib_header_t) +
(rdma ? sizeof(mca_btl_openib_footer_t) : 0) + frag->coalesced_length;
if(sg->length <= openib_btl->ib_inline_max) {
sr_desc->send_flags = IBV_SEND_SIGNALED | IBV_SEND_INLINE;
} else {
sr_desc->send_flags = IBV_SEND_SIGNALED;
}
sr_desc->send_flags = ib_send_flags(sg->length, ep);
if(ep->nbo)
BTL_OPENIB_HEADER_HTON(*frag->hdr);

Просмотреть файл

@ -381,6 +381,12 @@ static inline int check_endpoint_state(mca_btl_openib_endpoint_t *ep,
return rc;
}
static inline __opal_attribute_always_inline__ int
ib_send_flags(uint32_t size, mca_btl_openib_endpoint_t *ep)
{
return IBV_SEND_SIGNALED |
((size <= ep->endpoint_btl->ib_inline_max) ? IBV_SEND_INLINE : 0);
}
END_C_DECLS
#endif