2012-04-25 00:19:06 +04:00
|
|
|
/* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil -*- */
|
2005-05-24 02:06:50 +04:00
|
|
|
/*
|
2005-11-05 22:57:48 +03:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
|
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The University of Tennessee and The University
|
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
2015-06-24 06:59:57 +03:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
2005-05-24 02:06:50 +04:00
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2009-04-21 18:41:51 +04:00
|
|
|
* Copyright (c) 2009 IBM Corporation. All rights reserved.
|
2015-04-20 18:27:00 +03:00
|
|
|
* Copyright (c) 2012-2015 Los Alamos National Security, LLC. All rights
|
2012-04-25 00:19:15 +04:00
|
|
|
* reserved.
|
2005-05-24 02:06:50 +04:00
|
|
|
* $COPYRIGHT$
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-05-24 02:06:50 +04:00
|
|
|
* Additional copyrights may follow
|
2015-06-24 06:59:57 +03:00
|
|
|
*
|
2005-05-24 02:06:50 +04:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
/**
|
|
|
|
* @file
|
|
|
|
*/
|
2005-05-24 02:22:20 +04:00
|
|
|
#ifndef MCA_PML_OB1_HEADER_H
|
|
|
|
#define MCA_PML_OB1_HEADER_H
|
2005-05-24 02:06:50 +04:00
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
#ifdef HAVE_NETINET_IN_H
|
|
|
|
#include <netinet/in.h>
|
|
|
|
#endif
|
|
|
|
|
2006-02-26 03:45:54 +03:00
|
|
|
#include "opal/types.h"
|
2008-04-18 00:43:56 +04:00
|
|
|
#include "opal/util/arch.h"
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
#include "opal/mca/btl/btl.h"
|
2009-03-18 00:34:30 +03:00
|
|
|
#include "ompi/proc/proc.h"
|
2006-02-26 03:45:54 +03:00
|
|
|
|
2008-01-30 03:09:45 +03:00
|
|
|
#define MCA_PML_OB1_HDR_TYPE_MATCH (MCA_BTL_TAG_PML + 1)
|
|
|
|
#define MCA_PML_OB1_HDR_TYPE_RNDV (MCA_BTL_TAG_PML + 2)
|
|
|
|
#define MCA_PML_OB1_HDR_TYPE_RGET (MCA_BTL_TAG_PML + 3)
|
|
|
|
#define MCA_PML_OB1_HDR_TYPE_ACK (MCA_BTL_TAG_PML + 4)
|
|
|
|
#define MCA_PML_OB1_HDR_TYPE_NACK (MCA_BTL_TAG_PML + 5)
|
|
|
|
#define MCA_PML_OB1_HDR_TYPE_FRAG (MCA_BTL_TAG_PML + 6)
|
|
|
|
#define MCA_PML_OB1_HDR_TYPE_GET (MCA_BTL_TAG_PML + 7)
|
|
|
|
#define MCA_PML_OB1_HDR_TYPE_PUT (MCA_BTL_TAG_PML + 8)
|
|
|
|
#define MCA_PML_OB1_HDR_TYPE_FIN (MCA_BTL_TAG_PML + 9)
|
2005-05-24 02:06:50 +04:00
|
|
|
|
2005-05-24 02:22:20 +04:00
|
|
|
#define MCA_PML_OB1_HDR_FLAGS_ACK 1 /* is an ack required */
|
|
|
|
#define MCA_PML_OB1_HDR_FLAGS_NBO 2 /* is the hdr in network byte order */
|
2005-06-22 00:58:24 +04:00
|
|
|
#define MCA_PML_OB1_HDR_FLAGS_PIN 4 /* is user buffer pinned */
|
2005-11-11 18:33:25 +03:00
|
|
|
#define MCA_PML_OB1_HDR_FLAGS_CONTIG 8 /* is user buffer contiguous */
|
2008-03-27 11:56:43 +03:00
|
|
|
#define MCA_PML_OB1_HDR_FLAGS_NORDMA 16 /* rest will be send by copy-in-out */
|
2014-12-05 02:18:16 +03:00
|
|
|
#define MCA_PML_OB1_HDR_FLAGS_SIGNAL 32 /* message can be optionally signalling */
|
2005-05-24 02:06:50 +04:00
|
|
|
|
|
|
|
/**
|
2015-06-24 06:59:57 +03:00
|
|
|
* Common hdr attributes - must be first element in each hdr type
|
2005-05-24 02:06:50 +04:00
|
|
|
*/
|
|
|
|
struct mca_pml_ob1_common_hdr_t {
|
|
|
|
uint8_t hdr_type; /**< type of envelope */
|
|
|
|
uint8_t hdr_flags; /**< flags indicating how fragment should be processed */
|
|
|
|
};
|
|
|
|
typedef struct mca_pml_ob1_common_hdr_t mca_pml_ob1_common_hdr_t;
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
static inline void mca_pml_ob1_common_hdr_prepare (mca_pml_ob1_common_hdr_t *hdr, uint8_t hdr_type,
|
|
|
|
uint8_t hdr_flags)
|
|
|
|
{
|
|
|
|
hdr->hdr_type = hdr_type;
|
|
|
|
hdr->hdr_flags = hdr_flags;
|
|
|
|
}
|
|
|
|
|
2015-06-24 06:59:57 +03:00
|
|
|
#define MCA_PML_OB1_COMMON_HDR_NTOH(h)
|
|
|
|
#define MCA_PML_OB1_COMMON_HDR_HTON(h)
|
2005-05-24 02:06:50 +04:00
|
|
|
|
|
|
|
/**
|
2015-06-24 06:59:57 +03:00
|
|
|
* Header definition for the first fragment, contains the
|
2005-05-24 02:06:50 +04:00
|
|
|
* attributes required to match the corresponding posted receive.
|
|
|
|
*/
|
|
|
|
struct mca_pml_ob1_match_hdr_t {
|
|
|
|
mca_pml_ob1_common_hdr_t hdr_common; /**< common attributes */
|
2005-08-17 22:23:38 +04:00
|
|
|
uint16_t hdr_ctx; /**< communicator index */
|
|
|
|
int32_t hdr_src; /**< source rank */
|
|
|
|
int32_t hdr_tag; /**< user tag */
|
|
|
|
uint16_t hdr_seq; /**< message sequence number */
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
2006-12-04 23:11:42 +03:00
|
|
|
uint8_t hdr_padding[2]; /**< explicitly pad to 16 bytes. Compilers seem to already prefer to do this, but make it explicit just in case */
|
|
|
|
#endif
|
2005-05-24 02:06:50 +04:00
|
|
|
};
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
2008-05-30 07:58:39 +04:00
|
|
|
#define OMPI_PML_OB1_MATCH_HDR_LEN 16
|
|
|
|
#else
|
|
|
|
#define OMPI_PML_OB1_MATCH_HDR_LEN 14
|
2015-06-24 06:59:57 +03:00
|
|
|
#endif
|
2008-05-30 07:58:39 +04:00
|
|
|
|
2005-05-24 02:06:50 +04:00
|
|
|
typedef struct mca_pml_ob1_match_hdr_t mca_pml_ob1_match_hdr_t;
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
static inline void mca_pml_ob1_match_hdr_prepare (mca_pml_ob1_match_hdr_t *hdr, uint8_t hdr_type, uint8_t hdr_flags,
|
|
|
|
uint16_t hdr_ctx, int32_t hdr_src, int32_t hdr_tag, uint16_t hdr_seq)
|
|
|
|
{
|
|
|
|
mca_pml_ob1_common_hdr_prepare (&hdr->hdr_common, hdr_type, hdr_flags);
|
|
|
|
hdr->hdr_ctx = hdr_ctx;
|
|
|
|
hdr->hdr_src = hdr_src;
|
|
|
|
hdr->hdr_tag = hdr_tag;
|
|
|
|
hdr->hdr_seq = hdr_seq;
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG
|
2015-01-06 18:45:08 +03:00
|
|
|
hdr->hdr_padding[0] = 0;
|
|
|
|
hdr->hdr_padding[1] = 0;
|
|
|
|
#endif
|
|
|
|
}
|
2009-02-27 08:24:06 +03:00
|
|
|
|
2005-05-24 02:22:20 +04:00
|
|
|
#define MCA_PML_OB1_MATCH_HDR_NTOH(h) \
|
2009-02-27 08:24:06 +03:00
|
|
|
do { \
|
2005-05-24 02:22:20 +04:00
|
|
|
MCA_PML_OB1_COMMON_HDR_NTOH((h).hdr_common); \
|
2005-08-17 22:23:38 +04:00
|
|
|
(h).hdr_ctx = ntohs((h).hdr_ctx); \
|
2005-05-24 02:06:50 +04:00
|
|
|
(h).hdr_src = ntohl((h).hdr_src); \
|
|
|
|
(h).hdr_tag = ntohl((h).hdr_tag); \
|
2005-08-17 22:23:38 +04:00
|
|
|
(h).hdr_seq = ntohs((h).hdr_seq); \
|
2009-02-27 08:24:06 +03:00
|
|
|
} while (0)
|
2005-05-24 02:06:50 +04:00
|
|
|
|
2005-05-24 02:22:20 +04:00
|
|
|
#define MCA_PML_OB1_MATCH_HDR_HTON(h) \
|
2009-02-27 08:24:06 +03:00
|
|
|
do { \
|
2005-05-24 02:22:20 +04:00
|
|
|
MCA_PML_OB1_COMMON_HDR_HTON((h).hdr_common); \
|
2005-08-17 22:23:38 +04:00
|
|
|
(h).hdr_ctx = htons((h).hdr_ctx); \
|
2005-05-24 02:06:50 +04:00
|
|
|
(h).hdr_src = htonl((h).hdr_src); \
|
|
|
|
(h).hdr_tag = htonl((h).hdr_tag); \
|
2005-08-17 22:23:38 +04:00
|
|
|
(h).hdr_seq = htons((h).hdr_seq); \
|
2015-06-24 06:59:57 +03:00
|
|
|
} while (0)
|
2009-02-27 08:24:06 +03:00
|
|
|
|
2005-05-24 02:06:50 +04:00
|
|
|
/**
|
|
|
|
* Header definition for the first fragment when an acknowledgment
|
|
|
|
* is required. This could be the first fragment of a large message
|
|
|
|
* or a short message that requires an ack (synchronous).
|
|
|
|
*/
|
|
|
|
struct mca_pml_ob1_rendezvous_hdr_t {
|
|
|
|
mca_pml_ob1_match_hdr_t hdr_match;
|
2005-08-17 22:23:38 +04:00
|
|
|
uint64_t hdr_msg_length; /**< message length */
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
opal_ptr_t hdr_src_req; /**< pointer to source request - returned in ack */
|
2005-05-24 02:06:50 +04:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_ob1_rendezvous_hdr_t mca_pml_ob1_rendezvous_hdr_t;
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
static inline void mca_pml_ob1_rendezvous_hdr_prepare (mca_pml_ob1_rendezvous_hdr_t *hdr, uint8_t hdr_type, uint8_t hdr_flags,
|
|
|
|
uint16_t hdr_ctx, int32_t hdr_src, int32_t hdr_tag, uint16_t hdr_seq,
|
|
|
|
uint64_t hdr_msg_length, void *hdr_src_req)
|
|
|
|
{
|
|
|
|
mca_pml_ob1_match_hdr_prepare (&hdr->hdr_match, hdr_type, hdr_flags, hdr_ctx, hdr_src, hdr_tag, hdr_seq);
|
|
|
|
hdr->hdr_msg_length = hdr_msg_length;
|
|
|
|
hdr->hdr_src_req.pval = hdr_src_req;
|
|
|
|
}
|
2009-02-27 08:24:06 +03:00
|
|
|
|
2006-12-04 23:11:42 +03:00
|
|
|
/* Note that hdr_src_req is not put in network byte order because it
|
|
|
|
is never processed by the receiver, other than being copied into
|
|
|
|
the ack header */
|
2005-05-24 02:22:20 +04:00
|
|
|
#define MCA_PML_OB1_RNDV_HDR_NTOH(h) \
|
2005-05-24 02:06:50 +04:00
|
|
|
do { \
|
2009-02-27 08:24:06 +03:00
|
|
|
MCA_PML_OB1_MATCH_HDR_NTOH((h).hdr_match); \
|
|
|
|
(h).hdr_msg_length = ntoh64((h).hdr_msg_length); \
|
2005-05-24 02:06:50 +04:00
|
|
|
} while (0)
|
|
|
|
|
2005-05-24 02:22:20 +04:00
|
|
|
#define MCA_PML_OB1_RNDV_HDR_HTON(h) \
|
2005-05-24 02:06:50 +04:00
|
|
|
do { \
|
2009-02-27 08:24:06 +03:00
|
|
|
MCA_PML_OB1_MATCH_HDR_HTON((h).hdr_match); \
|
|
|
|
(h).hdr_msg_length = hton64((h).hdr_msg_length); \
|
2015-06-24 06:59:57 +03:00
|
|
|
} while (0)
|
2005-05-24 02:06:50 +04:00
|
|
|
|
2005-08-17 22:23:38 +04:00
|
|
|
/**
|
|
|
|
* Header definition for a combined rdma rendezvous/get
|
|
|
|
*/
|
|
|
|
struct mca_pml_ob1_rget_hdr_t {
|
|
|
|
mca_pml_ob1_rendezvous_hdr_t hdr_rndv;
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
2006-12-04 23:11:42 +03:00
|
|
|
uint8_t hdr_padding[4];
|
|
|
|
#endif
|
2015-01-06 18:45:08 +03:00
|
|
|
opal_ptr_t hdr_frag; /**< source fragment (for fin) */
|
|
|
|
uint64_t hdr_src_ptr; /**< source pointer */
|
|
|
|
/* btl registration handle data follows */
|
2005-08-17 22:23:38 +04:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_ob1_rget_hdr_t mca_pml_ob1_rget_hdr_t;
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
static inline void mca_pml_ob1_rget_hdr_prepare (mca_pml_ob1_rget_hdr_t *hdr, uint8_t hdr_flags,
|
|
|
|
uint16_t hdr_ctx, int32_t hdr_src, int32_t hdr_tag, uint16_t hdr_seq,
|
|
|
|
uint64_t hdr_msg_length, void *hdr_src_req, void *hdr_frag,
|
|
|
|
void *hdr_src_ptr, void *local_handle, size_t local_handle_size)
|
|
|
|
{
|
|
|
|
mca_pml_ob1_rendezvous_hdr_prepare (&hdr->hdr_rndv, MCA_PML_OB1_HDR_TYPE_RGET, hdr_flags,
|
|
|
|
hdr_ctx, hdr_src, hdr_tag, hdr_seq, hdr_msg_length, hdr_src_req);
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG
|
2015-01-06 18:45:08 +03:00
|
|
|
hdr->hdr_padding[0] = 0;
|
|
|
|
hdr->hdr_padding[1] = 0;
|
|
|
|
hdr->hdr_padding[2] = 0;
|
|
|
|
hdr->hdr_padding[3] = 0;
|
|
|
|
#endif
|
|
|
|
hdr->hdr_frag.pval = hdr_frag;
|
|
|
|
hdr->hdr_src_ptr = (uint64_t)(intptr_t) hdr_src_ptr;
|
|
|
|
|
|
|
|
/* copy registration handle */
|
|
|
|
memcpy (hdr + 1, local_handle, local_handle_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define MCA_PML_OB1_RGET_HDR_NTOH(h) \
|
|
|
|
do { \
|
|
|
|
MCA_PML_OB1_RNDV_HDR_NTOH((h).hdr_rndv); \
|
|
|
|
(h).hdr_src_ptr = ntoh64((h).hdr_src_ptr); \
|
2007-08-29 01:23:44 +04:00
|
|
|
} while (0)
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
#define MCA_PML_OB1_RGET_HDR_HTON(h) \
|
|
|
|
do { \
|
|
|
|
MCA_PML_OB1_RNDV_HDR_HTON((h).hdr_rndv); \
|
|
|
|
(h).hdr_src_ptr = hton64((h).hdr_src_ptr); \
|
2015-06-24 06:59:57 +03:00
|
|
|
} while (0)
|
2007-08-29 01:23:44 +04:00
|
|
|
|
2005-05-24 02:06:50 +04:00
|
|
|
/**
|
|
|
|
* Header for subsequent fragments.
|
|
|
|
*/
|
|
|
|
struct mca_pml_ob1_frag_hdr_t {
|
2005-08-17 22:23:38 +04:00
|
|
|
mca_pml_ob1_common_hdr_t hdr_common; /**< common attributes */
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
2006-12-04 23:11:42 +03:00
|
|
|
uint8_t hdr_padding[6];
|
|
|
|
#endif
|
2005-05-24 02:06:50 +04:00
|
|
|
uint64_t hdr_frag_offset; /**< offset into message */
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
opal_ptr_t hdr_src_req; /**< pointer to source request */
|
|
|
|
opal_ptr_t hdr_dst_req; /**< pointer to matched receive */
|
2005-05-24 02:06:50 +04:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_ob1_frag_hdr_t mca_pml_ob1_frag_hdr_t;
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
static inline void mca_pml_ob1_frag_hdr_prepare (mca_pml_ob1_frag_hdr_t *hdr, uint8_t hdr_flags,
|
|
|
|
uint64_t hdr_frag_offset, void *hdr_src_req,
|
|
|
|
uint64_t hdr_dst_req)
|
|
|
|
{
|
|
|
|
mca_pml_ob1_common_hdr_prepare (&hdr->hdr_common, MCA_PML_OB1_HDR_TYPE_FRAG, hdr_flags);
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG
|
2015-01-06 18:45:08 +03:00
|
|
|
hdr->hdr_padding[0] = 0;
|
|
|
|
hdr->hdr_padding[1] = 0;
|
|
|
|
hdr->hdr_padding[2] = 0;
|
|
|
|
hdr->hdr_padding[3] = 0;
|
|
|
|
hdr->hdr_padding[4] = 0;
|
|
|
|
hdr->hdr_padding[5] = 0;
|
|
|
|
#endif
|
|
|
|
hdr->hdr_frag_offset = hdr_frag_offset;
|
|
|
|
hdr->hdr_src_req.pval = hdr_src_req;
|
|
|
|
hdr->hdr_dst_req.lval = hdr_dst_req;
|
|
|
|
}
|
2009-02-27 08:24:06 +03:00
|
|
|
|
2005-05-24 02:22:20 +04:00
|
|
|
#define MCA_PML_OB1_FRAG_HDR_NTOH(h) \
|
2005-05-24 02:06:50 +04:00
|
|
|
do { \
|
2009-02-27 08:24:06 +03:00
|
|
|
MCA_PML_OB1_COMMON_HDR_NTOH((h).hdr_common); \
|
|
|
|
(h).hdr_frag_offset = ntoh64((h).hdr_frag_offset); \
|
2005-05-24 02:06:50 +04:00
|
|
|
} while (0)
|
|
|
|
|
2005-05-24 02:22:20 +04:00
|
|
|
#define MCA_PML_OB1_FRAG_HDR_HTON(h) \
|
2005-05-24 02:06:50 +04:00
|
|
|
do { \
|
2009-02-27 08:24:06 +03:00
|
|
|
MCA_PML_OB1_COMMON_HDR_HTON((h).hdr_common); \
|
|
|
|
(h).hdr_frag_offset = hton64((h).hdr_frag_offset); \
|
2005-05-24 02:06:50 +04:00
|
|
|
} while (0)
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Header used to acknowledgment outstanding fragment(s).
|
|
|
|
*/
|
2005-06-01 18:34:22 +04:00
|
|
|
|
2005-05-24 02:06:50 +04:00
|
|
|
struct mca_pml_ob1_ack_hdr_t {
|
2005-06-01 18:34:22 +04:00
|
|
|
mca_pml_ob1_common_hdr_t hdr_common; /**< common attributes */
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
2006-12-04 23:11:42 +03:00
|
|
|
uint8_t hdr_padding[6];
|
|
|
|
#endif
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
opal_ptr_t hdr_src_req; /**< source request */
|
|
|
|
opal_ptr_t hdr_dst_req; /**< matched receive request */
|
2007-06-03 12:30:07 +04:00
|
|
|
uint64_t hdr_send_offset; /**< starting point of copy in/out */
|
2015-01-06 18:45:08 +03:00
|
|
|
uint64_t hdr_send_size; /**< number of bytes requested (0: all remaining) */
|
2005-05-24 02:06:50 +04:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_ob1_ack_hdr_t mca_pml_ob1_ack_hdr_t;
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
static inline void mca_pml_ob1_ack_hdr_prepare (mca_pml_ob1_ack_hdr_t *hdr, uint8_t hdr_flags,
|
|
|
|
uint64_t hdr_src_req, void *hdr_dst_req,
|
|
|
|
uint64_t hdr_send_offset, uint64_t hdr_send_size)
|
|
|
|
{
|
|
|
|
mca_pml_ob1_common_hdr_prepare (&hdr->hdr_common, MCA_PML_OB1_HDR_TYPE_ACK, hdr_flags);
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG
|
2015-01-06 18:45:08 +03:00
|
|
|
hdr->hdr_padding[0] = 0;
|
|
|
|
hdr->hdr_padding[1] = 0;
|
|
|
|
hdr->hdr_padding[2] = 0;
|
|
|
|
hdr->hdr_padding[3] = 0;
|
|
|
|
hdr->hdr_padding[4] = 0;
|
|
|
|
hdr->hdr_padding[5] = 0;
|
|
|
|
#endif
|
|
|
|
hdr->hdr_src_req.lval = hdr_src_req;
|
|
|
|
hdr->hdr_dst_req.pval = hdr_dst_req;
|
|
|
|
hdr->hdr_send_offset = hdr_send_offset;
|
|
|
|
hdr->hdr_send_size = hdr_send_size;
|
|
|
|
}
|
2009-02-27 08:24:06 +03:00
|
|
|
|
2006-12-04 23:11:42 +03:00
|
|
|
/* Note that the request headers are not put in NBO because the
|
|
|
|
src_req is already in receiver's byte order and the dst_req is not
|
|
|
|
used by the receiver for anything other than backpointers in return
|
|
|
|
headers */
|
2015-01-06 18:45:08 +03:00
|
|
|
#define MCA_PML_OB1_ACK_HDR_NTOH(h) \
|
|
|
|
do { \
|
|
|
|
MCA_PML_OB1_COMMON_HDR_NTOH((h).hdr_common); \
|
2009-02-27 08:24:06 +03:00
|
|
|
(h).hdr_send_offset = ntoh64((h).hdr_send_offset); \
|
2015-01-06 18:45:08 +03:00
|
|
|
(h).hdr_send_size = ntoh64((h).hdr_send_size); \
|
2005-05-24 02:06:50 +04:00
|
|
|
} while (0)
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
#define MCA_PML_OB1_ACK_HDR_HTON(h) \
|
|
|
|
do { \
|
|
|
|
MCA_PML_OB1_COMMON_HDR_HTON((h).hdr_common); \
|
2009-02-27 08:24:06 +03:00
|
|
|
(h).hdr_send_offset = hton64((h).hdr_send_offset); \
|
2015-01-06 18:45:08 +03:00
|
|
|
(h).hdr_send_size = hton64((h).hdr_send_size); \
|
2015-06-24 06:59:57 +03:00
|
|
|
} while (0)
|
2005-05-24 02:06:50 +04:00
|
|
|
|
2005-06-09 00:37:19 +04:00
|
|
|
/**
|
|
|
|
* Header used to initiate an RDMA operation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct mca_pml_ob1_rdma_hdr_t {
|
|
|
|
mca_pml_ob1_common_hdr_t hdr_common; /**< common attributes */
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
2006-12-04 23:11:42 +03:00
|
|
|
uint8_t hdr_padding[2]; /** two to pad out the hdr to a 4 byte alignment. hdr_req will then be 8 byte aligned after 4 for hdr_seg_cnt */
|
|
|
|
#endif
|
2015-01-06 18:45:08 +03:00
|
|
|
/* TODO: add real support for multiple destination segments */
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
opal_ptr_t hdr_req; /**< destination request */
|
2015-01-06 18:45:08 +03:00
|
|
|
opal_ptr_t hdr_frag; /**< receiver fragment */
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
opal_ptr_t hdr_recv_req; /**< receive request (NTH: needed for put fallback on send) */
|
2015-01-06 18:45:08 +03:00
|
|
|
uint64_t hdr_rdma_offset; /**< current offset into user buffer */
|
|
|
|
uint64_t hdr_dst_ptr; /**< destination address */
|
|
|
|
uint64_t hdr_dst_size; /**< destination size */
|
|
|
|
/* registration data follows */
|
2005-06-09 00:37:19 +04:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_ob1_rdma_hdr_t mca_pml_ob1_rdma_hdr_t;
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
static inline void mca_pml_ob1_rdma_hdr_prepare (mca_pml_ob1_rdma_hdr_t *hdr, uint8_t hdr_flags,
|
|
|
|
uint64_t hdr_req, void *hdr_frag, void *hdr_recv_req,
|
|
|
|
uint64_t hdr_rdma_offset, void *hdr_dst_ptr,
|
|
|
|
uint64_t hdr_dst_size, void *local_handle,
|
|
|
|
size_t local_handle_size)
|
|
|
|
{
|
|
|
|
mca_pml_ob1_common_hdr_prepare (&hdr->hdr_common, MCA_PML_OB1_HDR_TYPE_PUT, hdr_flags);
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG
|
2015-01-06 18:45:08 +03:00
|
|
|
hdr->hdr_padding[0] = 0;
|
|
|
|
hdr->hdr_padding[1] = 0;
|
|
|
|
#endif
|
|
|
|
hdr->hdr_req.lval = hdr_req;
|
|
|
|
hdr->hdr_frag.pval = hdr_frag;
|
|
|
|
hdr->hdr_recv_req.pval = hdr_recv_req;
|
|
|
|
hdr->hdr_rdma_offset = hdr_rdma_offset;
|
|
|
|
hdr->hdr_dst_ptr = (uint64_t)(intptr_t) hdr_dst_ptr;
|
|
|
|
hdr->hdr_dst_size = hdr_dst_size;
|
|
|
|
|
|
|
|
/* copy segments */
|
|
|
|
memcpy (hdr + 1, local_handle, local_handle_size);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define MCA_PML_OB1_RDMA_HDR_NTOH(h) \
|
|
|
|
do { \
|
|
|
|
MCA_PML_OB1_COMMON_HDR_NTOH((h).hdr_common); \
|
2009-02-27 08:24:06 +03:00
|
|
|
(h).hdr_rdma_offset = ntoh64((h).hdr_rdma_offset); \
|
2015-01-06 18:45:08 +03:00
|
|
|
(h).hdr_dst_ptr = ntoh64((h).hdr_dst_ptr); \
|
|
|
|
(h).hdr_dst_size = ntoh64((h).hdr_dst_size); \
|
2007-08-29 01:23:44 +04:00
|
|
|
} while (0)
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
#define MCA_PML_OB1_RDMA_HDR_HTON(h) \
|
|
|
|
do { \
|
|
|
|
MCA_PML_OB1_COMMON_HDR_HTON((h).hdr_common); \
|
2009-02-27 08:24:06 +03:00
|
|
|
(h).hdr_rdma_offset = hton64((h).hdr_rdma_offset); \
|
2015-01-06 18:45:08 +03:00
|
|
|
(h).hdr_dst_ptr = hton64((h).hdr_dst_ptr); \
|
|
|
|
(h).hdr_dst_size = hton64((h).hdr_dst_size); \
|
2015-06-24 06:59:57 +03:00
|
|
|
} while (0)
|
2007-08-29 01:23:44 +04:00
|
|
|
|
2005-06-10 00:16:33 +04:00
|
|
|
/**
|
|
|
|
* Header used to complete an RDMA operation.
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct mca_pml_ob1_fin_hdr_t {
|
|
|
|
mca_pml_ob1_common_hdr_t hdr_common; /**< common attributes */
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
2009-04-21 18:41:51 +04:00
|
|
|
uint8_t hdr_padding[2];
|
2006-12-04 23:11:42 +03:00
|
|
|
#endif
|
2015-01-06 18:45:08 +03:00
|
|
|
int64_t hdr_size; /**< number of bytes completed (positive), error code (negative) */
|
|
|
|
opal_ptr_t hdr_frag; /**< completed RDMA fragment */
|
2005-06-10 00:16:33 +04:00
|
|
|
};
|
|
|
|
typedef struct mca_pml_ob1_fin_hdr_t mca_pml_ob1_fin_hdr_t;
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
static inline void mca_pml_ob1_fin_hdr_prepare (mca_pml_ob1_fin_hdr_t *hdr, uint8_t hdr_flags,
|
|
|
|
uint64_t hdr_frag, int64_t hdr_size)
|
|
|
|
{
|
|
|
|
mca_pml_ob1_common_hdr_prepare (&hdr->hdr_common, MCA_PML_OB1_HDR_TYPE_FIN, hdr_flags);
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT && OPAL_ENABLE_DEBUG
|
2015-01-06 18:45:08 +03:00
|
|
|
hdr->hdr_padding[0] = 0;
|
|
|
|
hdr->hdr_padding[1] = 0;
|
|
|
|
#endif
|
|
|
|
hdr->hdr_frag.lval = hdr_frag;
|
|
|
|
hdr->hdr_size = hdr_size;
|
|
|
|
}
|
2009-02-27 08:24:06 +03:00
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
#define MCA_PML_OB1_FIN_HDR_NTOH(h) \
|
|
|
|
do { \
|
2009-02-27 08:24:06 +03:00
|
|
|
MCA_PML_OB1_COMMON_HDR_NTOH((h).hdr_common); \
|
2015-01-06 18:45:08 +03:00
|
|
|
(h).hdr_size = ntoh64((h).hdr_size); \
|
2006-02-26 03:45:54 +03:00
|
|
|
} while (0)
|
|
|
|
|
2015-01-06 18:45:08 +03:00
|
|
|
#define MCA_PML_OB1_FIN_HDR_HTON(h) \
|
|
|
|
do { \
|
2009-02-27 08:24:06 +03:00
|
|
|
MCA_PML_OB1_COMMON_HDR_HTON((h).hdr_common); \
|
2015-01-06 18:45:08 +03:00
|
|
|
(h).hdr_size = hton64((h).hdr_size); \
|
|
|
|
} while (0)
|
2006-02-26 03:45:54 +03:00
|
|
|
|
2005-05-24 02:06:50 +04:00
|
|
|
/**
|
|
|
|
* Union of defined hdr types.
|
|
|
|
*/
|
|
|
|
union mca_pml_ob1_hdr_t {
|
|
|
|
mca_pml_ob1_common_hdr_t hdr_common;
|
|
|
|
mca_pml_ob1_match_hdr_t hdr_match;
|
|
|
|
mca_pml_ob1_rendezvous_hdr_t hdr_rndv;
|
2005-08-17 22:23:38 +04:00
|
|
|
mca_pml_ob1_rget_hdr_t hdr_rget;
|
2005-05-24 02:06:50 +04:00
|
|
|
mca_pml_ob1_frag_hdr_t hdr_frag;
|
|
|
|
mca_pml_ob1_ack_hdr_t hdr_ack;
|
2005-06-09 00:37:19 +04:00
|
|
|
mca_pml_ob1_rdma_hdr_t hdr_rdma;
|
2005-06-10 00:16:33 +04:00
|
|
|
mca_pml_ob1_fin_hdr_t hdr_fin;
|
2005-05-24 02:06:50 +04:00
|
|
|
};
|
|
|
|
typedef union mca_pml_ob1_hdr_t mca_pml_ob1_hdr_t;
|
|
|
|
|
2009-05-07 00:11:28 +04:00
|
|
|
#if !defined(WORDS_BIGENDIAN) && OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
2007-12-16 11:45:44 +03:00
|
|
|
static inline __opal_attribute_always_inline__ void
|
|
|
|
ob1_hdr_ntoh(mca_pml_ob1_hdr_t *hdr, const uint8_t hdr_type)
|
|
|
|
{
|
|
|
|
if(!(hdr->hdr_common.hdr_flags & MCA_PML_OB1_HDR_FLAGS_NBO))
|
|
|
|
return;
|
|
|
|
|
|
|
|
switch(hdr_type) {
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_MATCH:
|
|
|
|
MCA_PML_OB1_MATCH_HDR_NTOH(hdr->hdr_match);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_RNDV:
|
|
|
|
MCA_PML_OB1_RNDV_HDR_NTOH(hdr->hdr_rndv);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_RGET:
|
|
|
|
MCA_PML_OB1_RGET_HDR_NTOH(hdr->hdr_rget);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_ACK:
|
|
|
|
MCA_PML_OB1_ACK_HDR_NTOH(hdr->hdr_ack);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_FRAG:
|
|
|
|
MCA_PML_OB1_FRAG_HDR_NTOH(hdr->hdr_frag);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_PUT:
|
|
|
|
MCA_PML_OB1_RDMA_HDR_NTOH(hdr->hdr_rdma);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_FIN:
|
|
|
|
MCA_PML_OB1_FIN_HDR_NTOH(hdr->hdr_fin);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
assert(0);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#define ob1_hdr_ntoh(h, t) do{}while(0)
|
|
|
|
#endif
|
2005-05-24 02:06:50 +04:00
|
|
|
|
2009-05-07 00:11:28 +04:00
|
|
|
#if OPAL_ENABLE_HETEROGENEOUS_SUPPORT
|
2007-12-16 11:45:44 +03:00
|
|
|
#define ob1_hdr_hton(h, t, p) \
|
|
|
|
ob1_hdr_hton_intr((mca_pml_ob1_hdr_t*)h, t, p)
|
|
|
|
static inline __opal_attribute_always_inline__ void
|
|
|
|
ob1_hdr_hton_intr(mca_pml_ob1_hdr_t *hdr, const uint8_t hdr_type,
|
|
|
|
const ompi_proc_t *proc)
|
|
|
|
{
|
|
|
|
#ifdef WORDS_BIGENDIAN
|
|
|
|
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
|
|
|
|
#else
|
|
|
|
|
George did the work and deserves all the credit for it. Ralph did the merge, and deserves whatever blame results from errors in it :-)
WHAT: Open our low-level communication infrastructure by moving all necessary components (btl/rcache/allocator/mpool) down in OPAL
All the components required for inter-process communications are currently deeply integrated in the OMPI layer. Several groups/institutions have express interest in having a more generic communication infrastructure, without all the OMPI layer dependencies. This communication layer should be made available at a different software level, available to all layers in the Open MPI software stack. As an example, our ORTE layer could replace the current OOB and instead use the BTL directly, gaining access to more reactive network interfaces than TCP. Similarly, external software libraries could take advantage of our highly optimized AM (active message) communication layer for their own purpose. UTK with support from Sandia, developped a version of Open MPI where the entire communication infrastucture has been moved down to OPAL (btl/rcache/allocator/mpool). Most of the moved components have been updated to match the new schema, with few exceptions (mainly BTLs where I have no way of compiling/testing them). Thus, the completion of this RFC is tied to being able to completing this move for all BTLs. For this we need help from the rest of the Open MPI community, especially those supporting some of the BTLs. A non-exhaustive list of BTLs that qualify here is: mx, portals4, scif, udapl, ugni, usnic.
This commit was SVN r32317.
2014-07-26 04:47:28 +04:00
|
|
|
if(!(proc->super.proc_arch & OPAL_ARCH_ISBIGENDIAN))
|
2007-12-16 11:45:44 +03:00
|
|
|
return;
|
|
|
|
|
|
|
|
hdr->hdr_common.hdr_flags |= MCA_PML_OB1_HDR_FLAGS_NBO;
|
|
|
|
switch(hdr_type) {
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_MATCH:
|
|
|
|
MCA_PML_OB1_MATCH_HDR_HTON(hdr->hdr_match);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_RNDV:
|
|
|
|
MCA_PML_OB1_RNDV_HDR_HTON(hdr->hdr_rndv);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_RGET:
|
|
|
|
MCA_PML_OB1_RGET_HDR_HTON(hdr->hdr_rget);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_ACK:
|
|
|
|
MCA_PML_OB1_ACK_HDR_HTON(hdr->hdr_ack);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_FRAG:
|
|
|
|
MCA_PML_OB1_FRAG_HDR_HTON(hdr->hdr_frag);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_PUT:
|
|
|
|
MCA_PML_OB1_RDMA_HDR_HTON(hdr->hdr_rdma);
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_FIN:
|
|
|
|
MCA_PML_OB1_FIN_HDR_HTON(hdr->hdr_fin);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
assert(0);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
#else
|
|
|
|
#define ob1_hdr_hton(h, t, p) do{}while(0)
|
|
|
|
#endif
|
2013-07-01 16:40:08 +04:00
|
|
|
|
|
|
|
static inline __opal_attribute_always_inline__ void
|
|
|
|
ob1_hdr_copy(mca_pml_ob1_hdr_t *src, mca_pml_ob1_hdr_t *dst)
|
|
|
|
{
|
|
|
|
switch(src->hdr_common.hdr_type) {
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_MATCH:
|
|
|
|
memcpy( &(dst->hdr_match), &(src->hdr_match), sizeof(mca_pml_ob1_match_hdr_t) );
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_RNDV:
|
|
|
|
memcpy( &(dst->hdr_rndv), &(src->hdr_rndv), sizeof(mca_pml_ob1_rendezvous_hdr_t) );
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_RGET:
|
|
|
|
memcpy( &(dst->hdr_rget), &(src->hdr_rget), sizeof(mca_pml_ob1_rget_hdr_t) );
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_ACK:
|
|
|
|
memcpy( &(dst->hdr_ack), &(src->hdr_ack), sizeof(mca_pml_ob1_ack_hdr_t) );
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_FRAG:
|
|
|
|
memcpy( &(dst->hdr_frag), &(src->hdr_frag), sizeof(mca_pml_ob1_frag_hdr_t) );
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_PUT:
|
|
|
|
memcpy( &(dst->hdr_rdma), &(src->hdr_rdma), sizeof(mca_pml_ob1_rdma_hdr_t) );
|
|
|
|
break;
|
|
|
|
case MCA_PML_OB1_HDR_TYPE_FIN:
|
|
|
|
memcpy( &(dst->hdr_fin), &(src->hdr_fin), sizeof(mca_pml_ob1_fin_hdr_t) );
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
memcpy( &(dst->hdr_common), &(src->hdr_common), sizeof(mca_pml_ob1_common_hdr_t) );
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* MCA_PML_OB1_HEADER_H */
|
|
|
|
|