From e40483465e1d53b3155e8510b0dfe303f0cf52da Mon Sep 17 00:00:00 2001 From: Rolf vandeVaart Date: Thu, 4 Nov 2010 13:04:47 +0000 Subject: [PATCH] Remove unneeded function. Fix list handling. This commit was SVN r23992. --- ompi/mca/pml/bfo/pml_bfo_failover.c | 26 +++++++------------------- ompi/mca/pml/bfo/pml_bfo_failover.h | 1 - ompi/mca/pml/bfo/pml_bfo_sendreq.c | 7 ++++--- 3 files changed, 11 insertions(+), 23 deletions(-) diff --git a/ompi/mca/pml/bfo/pml_bfo_failover.c b/ompi/mca/pml/bfo/pml_bfo_failover.c index 083e3237af..76ec741449 100644 --- a/ompi/mca/pml/bfo/pml_bfo_failover.c +++ b/ompi/mca/pml/bfo/pml_bfo_failover.c @@ -640,7 +640,8 @@ void mca_pml_bfo_recv_frag_callback_rndvrestartnack(mca_btl_base_module_t* btl, sendreq->req_send.req_base.req_peer, sendreq->req_restartseq, (void *)sendreq, sendreq->req_recv.pval, sendreq->req_send.req_base.req_peer); - mca_pml_bfo_send_request_rndvrestartnack(sendreq); + /* Mark the sender complete. This data exchange is over. */ + send_request_pml_complete(sendreq); return; } @@ -732,19 +733,6 @@ void mca_pml_bfo_send_request_rndvrestartnotify(mca_pml_bfo_send_request_t* send } -/** - * This function is called when a RNDVRESTARTNACK message is received - * by the sender. - */ -void mca_pml_bfo_send_request_rndvrestartnack(mca_pml_bfo_send_request_t* sendreq) -{ - /* A RNDVRESTARTNACK was sent by the receiver. This means that the - * receiver is rejecting the RNDVRESTARTNOTIFY message indicating the - * receiver's request is complete. Therefore, mark the sender complete - * also. This data exchange is over. */ - send_request_pml_complete(sendreq); -} - /** * This function restarts a RNDV send request. When this is called, * all the fields in the send request are reset and the send is @@ -796,15 +784,15 @@ void mca_pml_bfo_send_request_restart(mca_pml_bfo_send_request_t* sendreq, mca_pml_base_bsend_request_fini((ompi_request_t*)sendreq); } - /* Clear out any unsent send ranges. Recreated the get_send_range - * and the get_next_send_range functions. */ + /* Clear out any unsent send ranges. Recreate the functionality + * from the get_send_range() and get_next_send_range() functions. */ OPAL_THREAD_LOCK(&sendreq->req_send_range_lock); - first_item = opal_list_get_first(&sendreq->req_send_ranges); - last_item = opal_list_get_end(&sendreq->req_send_ranges); + first_item = opal_list_get_begin(&sendreq->req_send_ranges); + last_item = opal_list_get_last(&sendreq->req_send_ranges); while (first_item != last_item) { opal_list_remove_item(&sendreq->req_send_ranges, last_item); OMPI_FREE_LIST_RETURN(&mca_pml_bfo.send_ranges, (ompi_free_list_item_t *)last_item); - last_item = opal_list_get_end(&sendreq->req_send_ranges); + last_item = opal_list_get_last(&sendreq->req_send_ranges); } OPAL_THREAD_UNLOCK(&sendreq->req_send_range_lock); diff --git a/ompi/mca/pml/bfo/pml_bfo_failover.h b/ompi/mca/pml/bfo/pml_bfo_failover.h index 22b7f39949..342c5fa528 100644 --- a/ompi/mca/pml/bfo/pml_bfo_failover.h +++ b/ompi/mca/pml/bfo/pml_bfo_failover.h @@ -32,7 +32,6 @@ void mca_pml_bfo_send_request_restart(mca_pml_bfo_send_request_t* sendreq, void mca_pml_bfo_send_request_rndvrestartnotify(mca_pml_bfo_send_request_t* sendreq, bool repost, mca_btl_base_tag_t tag, int status, mca_btl_base_module_t* btl); -void mca_pml_bfo_send_request_rndvrestartnack(mca_pml_bfo_send_request_t* sendreq); void mca_pml_bfo_rndvrestartnotify_completion(mca_btl_base_module_t* btl, diff --git a/ompi/mca/pml/bfo/pml_bfo_sendreq.c b/ompi/mca/pml/bfo/pml_bfo_sendreq.c index 7bdbcc2bfc..45eeaa00bd 100644 --- a/ompi/mca/pml/bfo/pml_bfo_sendreq.c +++ b/ompi/mca/pml/bfo/pml_bfo_sendreq.c @@ -849,9 +849,10 @@ int mca_pml_bfo_send_request_start_rdma( mca_pml_bfo_send_request_t* sendreq, mca_pml_bfo_rndv_completion_request( bml_btl, sendreq, 0 ); } #ifdef PML_BFO - if ((des->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK) && - (MCA_PML_BFO_HDR_TYPE_RNDV == hdr->hdr_common.hdr_type)) { - sendreq->req_events++; + if (MCA_PML_BFO_HDR_TYPE_RNDV == hdr->hdr_common.hdr_type) { + if (des->des_flags & MCA_BTL_DES_SEND_ALWAYS_CALLBACK) { + sendreq->req_events++; + } } #endif return OMPI_SUCCESS;