From 625c2808880e5cd1b12d28df1761ec8c35b59182 Mon Sep 17 00:00:00 2001 From: Gilles Gouaillardet Date: Mon, 6 Jul 2015 09:45:01 +0900 Subject: [PATCH] btl/openib: queue pending fragments once only when running out of credit Fixes open-mpi/ompi#640 (cherry picked from commit open-mpi/ompi@9f171de4125643345c605637356234499182ee6d) --- opal/mca/btl/openib/btl_openib_component.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opal/mca/btl/openib/btl_openib_component.c b/opal/mca/btl/openib/btl_openib_component.c index 56beb0b9c4..507073e47e 100644 --- a/opal/mca/btl/openib/btl_openib_component.c +++ b/opal/mca/btl/openib/btl_openib_component.c @@ -3376,12 +3376,15 @@ progress_pending_frags_wqe(mca_btl_base_endpoint_t *ep, const int qpn) frag = opal_list_remove_first(&ep->qps[qpn].no_wqe_pending_frags[i]); if(NULL == frag) break; + assert(0 == frag->opal_list_item_refcount); tmp_ep = to_com_frag(frag)->endpoint; ret = mca_btl_openib_endpoint_post_send(tmp_ep, to_send_frag(frag)); if (OPAL_SUCCESS != ret) { /* NTH: this handles retrying if we are out of credits but other errors are not * handled (maybe abort?). */ - opal_list_prepend (&ep->qps[qpn].no_wqe_pending_frags[i], (opal_list_item_t *) frag); + if (OPAL_ERR_RESOURCE_BUSY != ret) { + opal_list_prepend (&ep->qps[qpn].no_wqe_pending_frags[i], (opal_list_item_t *) frag); + } break; } }