1
1

Return OMPI_ERR_RESOURCE_BUSY from openib_btl_send() if fragment is not on wire.

This commit was SVN r16906.
Этот коммит содержится в:
Gleb Natapov 2007-12-09 14:14:11 +00:00
родитель e0dc53e516
Коммит 2f9c5b46cf
3 изменённых файлов: 15 добавлений и 19 удалений

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

@ -1109,7 +1109,7 @@ int mca_btl_openib_put( mca_btl_base_module_t* btl,
OPAL_THREAD_LOCK(&ep->endpoint_lock);
rc = check_endpoint_state(ep, descriptor, &ep->pending_put_frags);
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
if(OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc)
if(OMPI_ERR_RESOURCE_BUSY == rc)
return OMPI_SUCCESS;
if(OMPI_SUCCESS != rc)
return rc;
@ -1178,7 +1178,7 @@ int mca_btl_openib_get(mca_btl_base_module_t* btl,
OPAL_THREAD_LOCK(&ep->endpoint_lock);
rc = check_endpoint_state(ep, descriptor, &ep->pending_get_frags);
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
if(OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc)
if(OMPI_ERR_RESOURCE_BUSY == rc)
return OMPI_SUCCESS;
if(OMPI_SUCCESS != rc)
return rc;

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

@ -190,7 +190,7 @@ int mca_btl_openib_endpoint_post_send(mca_btl_openib_endpoint_t *endpoint,
qp = des->order;
if(acruire_wqe(endpoint, frag) != OMPI_SUCCESS)
return OMPI_ERR_OUT_OF_RESOURCE;
return OMPI_ERR_RESOURCE_BUSY;
eager_limit = mca_btl_openib_component.eager_limit +
sizeof(mca_btl_openib_header_coalesced_t) +
@ -204,7 +204,7 @@ int mca_btl_openib_endpoint_post_send(mca_btl_openib_endpoint_t *endpoint,
if(!do_rdma && acquire_send_credit(endpoint, frag) != OMPI_SUCCESS) {
qp_put_wqe(endpoint, qp);
return OMPI_ERR_OUT_OF_RESOURCE;
return OMPI_ERR_RESOURCE_BUSY;
}
GET_CREDITS(endpoint->eager_rdma_local.credits, hdr->credits);
@ -589,13 +589,8 @@ int mca_btl_openib_endpoint_send(mca_btl_base_endpoint_t* ep,
rc = check_endpoint_state(ep, &to_base_frag(frag)->base,
&ep->pending_lazy_frags);
if(OPAL_LIKELY(rc == OMPI_SUCCESS)) {
if(OPAL_LIKELY(rc == OMPI_SUCCESS))
rc = mca_btl_openib_endpoint_post_send(ep, frag);
if(OMPI_ERR_OUT_OF_RESOURCE == rc)
rc = OMPI_SUCCESS;
} else if(OMPI_ERR_TEMP_OUT_OF_RESOURCE == rc) {
rc = OMPI_SUCCESS;
}
OPAL_THREAD_UNLOCK(&ep->endpoint_lock);
return rc;
@ -774,12 +769,13 @@ static int mca_btl_openib_endpoint_send_eager_rdma(
rdma_hdr->rdma_start.ival
));
}
if (mca_btl_openib_endpoint_send(endpoint, frag) != OMPI_SUCCESS) {
MCA_BTL_IB_FRAG_RETURN(frag);
BTL_ERROR(("Error sending RDMA buffer", strerror(errno)));
return -1;
}
return 0;
rc = mca_btl_openib_endpoint_send(endpoint, frag);
if (OMPI_SUCCESS == rc ||OMPI_ERR_RESOURCE_BUSY == rc)
return OMPI_SUCCESS;
MCA_BTL_IB_FRAG_RETURN(frag);
BTL_ERROR(("Error sending RDMA buffer", strerror(errno)));
return rc;
}
/* Setup eager RDMA buffers and notify the remote endpoint*/
@ -854,7 +850,7 @@ void mca_btl_openib_endpoint_connect_eager_rdma(
opal_atomic_cmpset_ptr(&endpoint->eager_rdma_local.base.pval, (void*)1,
buf);
if(mca_btl_openib_endpoint_send_eager_rdma(endpoint) == 0) {
if(mca_btl_openib_endpoint_send_eager_rdma(endpoint) == OMPI_SUCCESS) {
/* This can never fail because max number of entries allocated
* at init time */
OBJ_RETAIN(endpoint);

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

@ -352,13 +352,13 @@ try_send:
static inline int check_endpoint_state(mca_btl_openib_endpoint_t *ep,
mca_btl_base_descriptor_t *des, opal_list_t *pending_list)
{
int rc = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
int rc = ORTE_ERR_RESOURCE_BUSY;
switch(ep->endpoint_state) {
case MCA_BTL_IB_CLOSED:
rc = ompi_btl_openib_connect.bcf_start_connect(ep);
if(rc == OMPI_SUCCESS)
rc = OMPI_ERR_TEMP_OUT_OF_RESOURCE;
rc = ORTE_ERR_RESOURCE_BUSY;
/*
* As long as we expect a message from the peer (in order
* to setup the connection) let the event engine pool the