Skip to content

Commit 9f171de

Browse files
committed
btl/openib: queue pending fragments once only when running out of credit
Fixes #640
1 parent 2c2945e commit 9f171de

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

opal/mca/btl/openib/btl_openib_component.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3376,12 +3376,15 @@ progress_pending_frags_wqe(mca_btl_base_endpoint_t *ep, const int qpn)
33763376
frag = opal_list_remove_first(&ep->qps[qpn].no_wqe_pending_frags[i]);
33773377
if(NULL == frag)
33783378
break;
3379+
assert(0 == frag->opal_list_item_refcount);
33793380
tmp_ep = to_com_frag(frag)->endpoint;
33803381
ret = mca_btl_openib_endpoint_post_send(tmp_ep, to_send_frag(frag));
33813382
if (OPAL_SUCCESS != ret) {
33823383
/* NTH: this handles retrying if we are out of credits but other errors are not
33833384
* handled (maybe abort?). */
3384-
opal_list_prepend (&ep->qps[qpn].no_wqe_pending_frags[i], (opal_list_item_t *) frag);
3385+
if (OPAL_ERR_RESOURCE_BUSY != ret) {
3386+
opal_list_prepend (&ep->qps[qpn].no_wqe_pending_frags[i], (opal_list_item_t *) frag);
3387+
}
33853388
break;
33863389
}
33873390
}

0 commit comments

Comments
 (0)