1
1

new bookkeeping code should return value indicating whether packet is good or not.

Authored-by: Reese Faucette <rfaucett@cisco.com>

Should be included in usnic v1.7.3 roll-up CMR (refs trac:3760)

This commit was SVN r29136.

The following Trac tickets were found above:
  Ticket 3760 --> https://svn.open-mpi.org/trac/ompi/ticket/3760
Этот коммит содержится в:
Dave Goodell 2013-09-06 03:19:32 +00:00
родитель 122890c2fd
Коммит 0ef8336502
3 изменённых файлов: 26 добавлений и 8 удалений

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

@ -988,7 +988,7 @@ static int usnic_component_progress_2(void)
channel = &module->mod_channels[c];
if (channel->chan_deferred_recv != NULL) {
ompi_btl_usnic_recv_frag_bookkeeping(module,
(void) ompi_btl_usnic_recv_frag_bookkeeping(module,
channel->chan_deferred_recv, channel);
channel->chan_deferred_recv = NULL;
}

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

@ -57,6 +57,7 @@ void ompi_btl_usnic_recv_call(ompi_btl_usnic_module_t *module,
ompi_btl_usnic_endpoint_t *endpoint;
ompi_btl_usnic_btl_chunk_header_t *chunk_hdr;
uint32_t window_index;
int rc;
#if MSGDEBUG1
char src_mac[32];
char dest_mac[32];
@ -104,7 +105,10 @@ void ompi_btl_usnic_recv_call(ompi_btl_usnic_module_t *module,
if (OMPI_BTL_USNIC_PAYLOAD_TYPE_FRAG == bseg->us_btl_header->payload_type) {
/* do the receive bookkeeping */
ompi_btl_usnic_recv_frag_bookkeeping(module, seg, channel);
rc = ompi_btl_usnic_recv_frag_bookkeeping(module, seg, channel);
if (rc != 0) {
return;
}
#if MSGDEBUG1
opal_output(0, "<-- Received FRAG ep %p, seq %" UDSEQ ", len=%d\n",
@ -167,7 +171,8 @@ void ompi_btl_usnic_recv_call(ompi_btl_usnic_module_t *module,
ompi_btl_usnic_rx_frag_info_t *fip;
/* Is incoming sequence # ok? */
if (!ompi_btl_usnic_check_rx_seq(endpoint, seg, &window_index)) {
if (OPAL_UNLIKELY(ompi_btl_usnic_check_rx_seq(endpoint, seg,
&window_index) != 0)) {
goto repost;
}

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

@ -222,13 +222,13 @@ ompi_btl_usnic_check_rx_seq(
}
*window_index = i;
return true;
return 0;
dup_needs_ack:
if (!endpoint->endpoint_ack_needed) {
ompi_btl_usnic_add_to_endpoints_needing_ack(endpoint);
}
return false;
return -1;
}
/*
@ -299,7 +299,7 @@ drop:
/*
*/
static inline void
static inline int
ompi_btl_usnic_recv_frag_bookkeeping(
ompi_btl_usnic_module_t* module,
ompi_btl_usnic_recv_segment_t *seg,
@ -307,6 +307,7 @@ ompi_btl_usnic_recv_frag_bookkeeping(
{
ompi_btl_usnic_endpoint_t* endpoint;
uint32_t window_index;
int rc;
endpoint = seg->rs_endpoint;
@ -318,7 +319,8 @@ ompi_btl_usnic_recv_frag_bookkeeping(
++module->num_total_recvs;
/* Do late processing of incoming sequence # */
if (!ompi_btl_usnic_check_rx_seq(endpoint, seg, &window_index)) {
rc = ompi_btl_usnic_check_rx_seq(endpoint, seg, &window_index);
if (OPAL_UNLIKELY(rc != 0)) {
goto repost;
}
@ -327,11 +329,18 @@ ompi_btl_usnic_recv_frag_bookkeeping(
ompi_btl_usnic_update_window(endpoint, window_index);
repost:
/* if endpoint exiting, and all ACKs received, release the endpoint */
if (endpoint->endpoint_exiting && ENDPOINT_DRAINED(endpoint)) {
OBJ_RELEASE(endpoint);
}
++module->num_recv_reposts;
/* Add recv to linked list for reposting */
seg->rs_recv_desc.next = channel->repost_recv_head;
channel->repost_recv_head = &seg->rs_recv_desc;
return rc;
}
/*
@ -346,6 +355,7 @@ ompi_btl_usnic_recv(ompi_btl_usnic_module_t *module,
ompi_btl_usnic_segment_t *bseg;
mca_btl_active_message_callback_t* reg;
ompi_btl_usnic_endpoint_t *endpoint;
int rc;
#if MSGDEBUG1
char src_mac[32];
char dest_mac[32];
@ -363,7 +373,10 @@ ompi_btl_usnic_recv(ompi_btl_usnic_module_t *module,
seg->rs_base.us_btl_header->put_addr == NULL) {
/* do the receive bookkeeping */
ompi_btl_usnic_recv_frag_bookkeeping(module, seg, channel);
rc = ompi_btl_usnic_recv_frag_bookkeeping(module, seg, channel);
if (rc != 0) {
return;
}
/* Pass this segment up to the PML.
* Be sure to get the payload length from the BTL header because