2005-12-19 19:37:05 +03:00
|
|
|
/*
|
2006-01-25 05:21:34 +03:00
|
|
|
* Copyright (c) 2004-2006 The Trustees of Indiana University and Indiana
|
2005-12-19 19:37:05 +03:00
|
|
|
* University Research and Technology
|
|
|
|
* Corporation. All rights reserved.
|
2006-08-24 20:38:08 +04:00
|
|
|
* Copyright (c) 2004-2006 The University of Tennessee and The University
|
2005-12-19 19:37:05 +03:00
|
|
|
* of Tennessee Research Foundation. All rights
|
|
|
|
* reserved.
|
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Regents of the University of California.
|
|
|
|
* All rights reserved.
|
2006-05-25 19:47:59 +04:00
|
|
|
* Copyright (c) 2006 Sandia National Laboratories. All rights
|
|
|
|
* reserved.
|
2005-12-19 19:37:05 +03:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef MCA_BTL_UDAPL_FRAG_H
|
|
|
|
#define MCA_BTL_UDAPL_FRAG_H
|
|
|
|
|
|
|
|
|
|
|
|
#define MCA_BTL_UDAPL_FRAG_ALIGN (8)
|
|
|
|
#include "ompi_config.h"
|
|
|
|
|
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2006-01-12 07:05:02 +03:00
|
|
|
typedef enum {
|
2006-03-30 01:55:41 +04:00
|
|
|
MCA_BTL_UDAPL_SEND,
|
|
|
|
MCA_BTL_UDAPL_RECV,
|
2006-01-12 07:05:02 +03:00
|
|
|
MCA_BTL_UDAPL_PUT,
|
2006-07-08 01:48:16 +04:00
|
|
|
MCA_BTL_UDAPL_GET,
|
|
|
|
MCA_BTL_UDAPL_CONN_RECV,
|
|
|
|
MCA_BTL_UDAPL_CONN_SEND
|
2006-01-12 07:05:02 +03:00
|
|
|
} mca_btl_udapl_frag_type_t;
|
|
|
|
|
2005-12-19 19:37:05 +03:00
|
|
|
|
|
|
|
/**
|
2006-03-30 01:55:41 +04:00
|
|
|
* uDAPL fragment derived type.
|
2005-12-19 19:37:05 +03:00
|
|
|
*/
|
|
|
|
struct mca_btl_udapl_frag_t {
|
2006-06-13 02:42:01 +04:00
|
|
|
mca_btl_base_descriptor_t base;
|
2006-01-25 05:21:34 +03:00
|
|
|
mca_btl_base_segment_t segment;
|
|
|
|
|
2006-01-12 07:05:02 +03:00
|
|
|
struct mca_btl_udapl_module_t* btl;
|
2005-12-19 19:37:05 +03:00
|
|
|
struct mca_btl_base_endpoint_t *endpoint;
|
2006-01-12 07:05:02 +03:00
|
|
|
struct mca_mpool_base_registration_t* registration;
|
2006-03-23 19:21:08 +03:00
|
|
|
DAT_LMR_TRIPLET triplet;
|
2006-01-25 05:21:34 +03:00
|
|
|
|
2005-12-19 19:37:05 +03:00
|
|
|
mca_btl_base_header_t *hdr;
|
|
|
|
size_t size;
|
2006-01-12 07:05:02 +03:00
|
|
|
mca_btl_udapl_frag_type_t type;
|
2005-12-19 19:37:05 +03:00
|
|
|
};
|
|
|
|
typedef struct mca_btl_udapl_frag_t mca_btl_udapl_frag_t;
|
|
|
|
OBJ_CLASS_DECLARATION(mca_btl_udapl_frag_t);
|
|
|
|
|
|
|
|
typedef struct mca_btl_udapl_frag_t mca_btl_udapl_frag_eager_t;
|
|
|
|
OBJ_CLASS_DECLARATION(mca_btl_udapl_frag_eager_t);
|
|
|
|
|
|
|
|
typedef struct mca_btl_udapl_frag_t mca_btl_udapl_frag_max_t;
|
|
|
|
OBJ_CLASS_DECLARATION(mca_btl_udapl_frag_max_t);
|
|
|
|
|
|
|
|
typedef struct mca_btl_udapl_frag_t mca_btl_udapl_frag_user_t;
|
|
|
|
OBJ_CLASS_DECLARATION(mca_btl_udapl_frag_user_t);
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Macros to allocate/return descriptors from module specific
|
|
|
|
* free list(s).
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define MCA_BTL_UDAPL_FRAG_ALLOC_EAGER(btl, frag, rc) \
|
|
|
|
{ \
|
|
|
|
\
|
2006-06-20 21:13:44 +04:00
|
|
|
ompi_free_list_item_t *item; \
|
2005-12-19 19:37:05 +03:00
|
|
|
OMPI_FREE_LIST_WAIT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_eager, item, rc); \
|
|
|
|
frag = (mca_btl_udapl_frag_t*) item; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define MCA_BTL_UDAPL_FRAG_RETURN_EAGER(btl, frag) \
|
|
|
|
{ \
|
|
|
|
OMPI_FREE_LIST_RETURN(&((mca_btl_udapl_module_t*)btl)->udapl_frag_eager, \
|
2006-06-20 21:13:44 +04:00
|
|
|
(ompi_free_list_item_t*)(frag)); \
|
2005-12-19 19:37:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
#define MCA_BTL_UDAPL_FRAG_ALLOC_MAX(btl, frag, rc) \
|
|
|
|
{ \
|
|
|
|
\
|
2006-06-20 21:13:44 +04:00
|
|
|
ompi_free_list_item_t *item; \
|
2005-12-19 19:37:05 +03:00
|
|
|
OMPI_FREE_LIST_WAIT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_max, item, rc); \
|
|
|
|
frag = (mca_btl_udapl_frag_t*) item; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define MCA_BTL_UDAPL_FRAG_RETURN_MAX(btl, frag) \
|
|
|
|
{ \
|
|
|
|
OMPI_FREE_LIST_RETURN(&((mca_btl_udapl_module_t*)btl)->udapl_frag_max, \
|
2006-06-20 21:13:44 +04:00
|
|
|
(ompi_free_list_item_t*)(frag)); \
|
2005-12-19 19:37:05 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#define MCA_BTL_UDAPL_FRAG_ALLOC_USER(btl, frag, rc) \
|
|
|
|
{ \
|
2006-06-20 21:13:44 +04:00
|
|
|
ompi_free_list_item_t *item; \
|
2005-12-19 19:37:05 +03:00
|
|
|
OMPI_FREE_LIST_WAIT(&((mca_btl_udapl_module_t*)btl)->udapl_frag_user, item, rc); \
|
|
|
|
frag = (mca_btl_udapl_frag_t*) item; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define MCA_BTL_UDAPL_FRAG_RETURN_USER(btl, frag) \
|
|
|
|
{ \
|
|
|
|
OMPI_FREE_LIST_RETURN(&((mca_btl_udapl_module_t*)btl)->udapl_frag_user, \
|
2006-06-20 21:13:44 +04:00
|
|
|
(ompi_free_list_item_t*)(frag)); \
|
2005-12-19 19:37:05 +03:00
|
|
|
}
|
|
|
|
|
2006-03-30 01:55:41 +04:00
|
|
|
|
2005-12-19 19:37:05 +03:00
|
|
|
#if defined(c_plusplus) || defined(__cplusplus)
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|