1
1

Send cm_seen by eager rdma channel. Encode qp index into credits filed. If

cm_seen is not send here non symmetric eager rdma connection may hang.

This commit was SVN r16896.
Этот коммит содержится в:
Gleb Natapov 2007-12-09 13:56:13 +00:00
родитель d188642715
Коммит de3761208a
2 изменённых файлов: 18 добавлений и 15 удалений

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

@ -1150,7 +1150,12 @@ static int btl_openib_handle_incoming(mca_btl_openib_module_t *openib_btl,
/* call registered callback */
openib_btl->ib_reg[hdr->tag].cbfunc(&openib_btl->super, hdr->tag, des,
openib_btl->ib_reg[hdr->tag].cbdata);
cqp = rqp;
if(MCA_BTL_OPENIB_RDMA_FRAG(frag)) {
cqp = (hdr->credits >> 11) & 0x0f;
hdr->credits &= 0x87ff;
} else {
cqp = rqp;
}
if(BTL_OPENIB_IS_RDMA_CREDITS(hdr->credits)) {
rcredits = BTL_OPENIB_CREDITS(hdr->credits);
hdr->credits = 0;
@ -1210,10 +1215,7 @@ static int btl_openib_handle_incoming(mca_btl_openib_module_t *openib_btl,
progress_pending_frags_pp(ep, cqp);
}
send_credits(ep, (cqp != MCA_BTL_NO_ORDER) ? cqp :
mca_btl_openib_component.credits_qp);
send_credits(ep, cqp);
return OMPI_SUCCESS;
}

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

@ -209,21 +209,22 @@ int mca_btl_openib_endpoint_post_send(mca_btl_openib_endpoint_t *endpoint,
if(hdr->credits)
hdr->credits |= BTL_OPENIB_RDMA_CREDITS_FLAG;
hdr->cm_seen = 0;
if(!do_rdma) {
if(BTL_OPENIB_QP_TYPE_PP(qp) && 0 == hdr->credits) {
GET_CREDITS(endpoint->qps[qp].u.pp_qp.rd_credits, hdr->credits);
}
} else {
hdr->credits |= (qp << 11);
}
GET_CREDITS(endpoint->qps[qp].u.pp_qp.cm_return, cm_return);
/* cm_seen is only 8 bytes, but cm_return is 32 bytes */
if(cm_return > 255) {
hdr->cm_seen = 255;
cm_return -= 255;
OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.cm_return, cm_return);
} else {
hdr->cm_seen = cm_return;
}
GET_CREDITS(endpoint->qps[qp].u.pp_qp.cm_return, cm_return);
/* cm_seen is only 8 bytes, but cm_return is 32 bytes */
if(cm_return > 255) {
hdr->cm_seen = 255;
cm_return -= 255;
OPAL_THREAD_ADD32(&endpoint->qps[qp].u.pp_qp.cm_return, cm_return);
} else {
hdr->cm_seen = cm_return;
}
ib_rc = post_send(endpoint, frag, do_rdma);