1
1
openmpi/ompi/mca/btl/usnic/btl_usnic_ack.h
Jeff Squyres 194b285447 First commit of the Cisco usNIC BTL.
This BTL accesses the Cisco usNIC Linux device via the Linux verbs
API via Unreliable Datagram queue pairs.  A few noteworthy points:

 * This BTL does most of its own fragmentation; it tells the PML that
   it has a very high max_send_size (much higher than the network
   MTU).
 * Since UD fragments are, by definition, unreliable, the usnic BTL
   handles all of its own reliability via a sliding window approach
   using the opal_hotel construct and many tricks stolen from the
   corpus of knowledge surrounding efficient TCP.
 * There is a fun PML latency-metric based optimization for NUMA
   awareness of short messages.
 * Note that this is ''not'' a generic UD verbs BTL; it is specific to
   the Cisco usNIC device.

This commit was SVN r28879.
2013-07-19 22:13:58 +00:00

68 строки
1.7 KiB
C

/*
* Copyright (c) 2013 Cisco Systems, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*/
#ifndef BTL_USNIC_ACK_H
#define BTL_USNIC_ACK_H
#include "ompi_config.h"
#include "opal/class/opal_hotel.h"
#include "btl_usnic.h"
#include "btl_usnic_frag.h"
#include "btl_usnic_endpoint.h"
/*
* Reap an ACK send that is complete
*/
void ompi_btl_usnic_ack_complete(ompi_btl_usnic_module_t *module,
ompi_btl_usnic_ack_segment_t *ack);
/*
* Send an ACK
*/
void ompi_btl_usnic_ack_send(ompi_btl_usnic_module_t *module,
ompi_btl_usnic_endpoint_t *endpoint);
/*
* Callback for when a send times out without receiving a
* corresponding ACK
*/
void ompi_btl_usnic_ack_timeout(opal_hotel_t *hotel, int room_num,
void *occupant);
/*
* Handle an incoming ACK
*/
void ompi_btl_usnic_handle_ack(ompi_btl_usnic_endpoint_t *endpoint,
ompi_btl_usnic_seq_t ack_seq);
static inline void
ompi_btl_usnic_piggyback_ack(
ompi_btl_usnic_endpoint_t *endpoint,
ompi_btl_usnic_send_segment_t *sseg)
{
/* If ACK is needed, piggy-back it here and send it on */
if (endpoint->endpoint_ack_needed) {
ompi_btl_usnic_remove_from_endpoints_needing_ack(endpoint);
sseg->ss_base.us_btl_header->ack_seq =
endpoint->endpoint_next_contig_seq_to_recv - 1;
#if MSGDEBUG1
opal_output(0, "Piggy-backing ACK for sequence %d\n",
sseg->ss_base.us_btl_header->ack_seq);
#endif
} else {
sseg->ss_base.us_btl_header->ack_seq = 0;
}
}
#endif /* BTL_USNIC_ACK_H */