@@ -450,13 +450,12 @@ typedef struct mca_btl_base_segment_t mca_btl_base_segment_t;
450450#define MCA_BTL_BASE_SEGMENT_NTOH (s )
451451#endif
452452/**
453- * A descriptor that holds the parameters to a send/put/get
453+ * @brief Descriptor to hold outgoing send messages
454+ *
455+ * This descriptor holds the parameters to perform a send
454456 * operation along w/ a callback routine that is called on
455457 * completion of the request.
456- * Note: receive callbacks will store the incomming data segments in
457- * des_segments
458458 */
459-
460459struct mca_btl_base_descriptor_t {
461460 opal_free_list_item_t super ;
462461 mca_btl_base_segment_t * des_segments ; /**< local segments */
@@ -519,6 +518,28 @@ OPAL_DECLSPEC OBJ_CLASS_DECLARATION(mca_btl_base_descriptor_t);
519518 */
520519#define MCA_BTL_REG_HANDLE_MAX_SIZE 256
521520
521+ /**
522+ * @brief Descriptor for incoming messages
523+ *
524+ * This descriptor holds the information on incoming messages. The
525+ * data this descriptor describes is only valid during a callback.
526+ */
527+ struct mca_btl_base_receive_descriptor_t {
528+ /** Incoming endpoint. May be NULL if the endpoint is not readily
529+ * available for this BTL. */
530+ struct mca_btl_base_endpoint_t * endpoint ;
531+ /** Local segment data. Copy this data if it is needed after the
532+ * receive callback returns. **/
533+ const mca_btl_base_segment_t * des_segments ;
534+ /** Number of segment is des_segments */
535+ size_t des_segment_count ;
536+ mca_btl_base_tag_t tag ;
537+ /** Callback data supplied at callback registration time. */
538+ void * cbdata ;
539+ };
540+ typedef struct mca_btl_base_receive_descriptor_t mca_btl_base_receive_descriptor_t ;
541+
542+
522543/*
523544 * BTL base header, stores the tag at a minimum
524545 */
@@ -581,25 +602,20 @@ typedef int (*mca_btl_base_component_progress_fn_t)(void);
581602/**
582603 * Callback function that is called asynchronously on receipt
583604 * of data by the transport layer.
584- * Note that the the mca_btl_base_descriptor_t is only valid within the
605+ * Note that the the mca_btl_base_receive_descriptor_t is only valid within the
585606 * completion function, this implies that all data payload in the
586607 * mca_btl_base_descriptor_t must be copied out within this callback or
587608 * forfeited back to the BTL.
588609 * Note also that descriptor segments (des_segments) must be base
589610 * segments for all callbacks.
590611 *
591612 * @param[IN] btl BTL module
592- * @param[IN] tag The active message receive callback tag value
593613 * @param[IN] descriptor The BTL descriptor (contains the receive payload)
594- * @param[IN] cbdata Opaque callback data
595614 */
596615
597616typedef void (* mca_btl_base_module_recv_cb_fn_t )(
598- struct mca_btl_base_module_t * btl ,
599- mca_btl_base_tag_t tag ,
600- mca_btl_base_descriptor_t * descriptor ,
601- void * cbdata
602- );
617+ struct mca_btl_base_module_t * btl ,
618+ const mca_btl_base_receive_descriptor_t * descriptor );
603619
604620typedef struct mca_btl_active_message_callback_t {
605621 mca_btl_base_module_recv_cb_fn_t cbfunc ;
@@ -1262,22 +1278,29 @@ struct mca_btl_base_module_t {
12621278};
12631279typedef struct mca_btl_base_module_t mca_btl_base_module_t ;
12641280
1281+ #define MCA_BTL_BASE_MAJOR_VERSION 3
1282+ #define MCA_BTL_BASE_MINOR_VERSION 2
1283+ #define MCA_BTL_BASE_PATCH_VERSION 0
1284+
12651285/*
1266- * Macro for use in modules that are of type btl v3.1 .0
1286+ * Macro for use in modules that are of type btl v3.2 .0
12671287 */
1268- #define MCA_BTL_BASE_VERSION_3_1_0 \
1269- OPAL_MCA_BASE_VERSION_2_1_0("btl", 3, 1, 0)
1288+ #define MCA_BTL_BASE_VERSION_3_2_0 \
1289+ OPAL_MCA_BASE_VERSION_2_1_0("btl", \
1290+ MCA_BTL_BASE_MAJOR_VERSION, \
1291+ MCA_BTL_BASE_MINOR_VERSION, \
1292+ MCA_BTL_BASE_PATCH_VERSION)
12701293
12711294#define MCA_BTL_DEFAULT_VERSION (name ) \
1272- MCA_BTL_BASE_VERSION_3_1_0 , \
1295+ MCA_BTL_BASE_VERSION_3_2_0 , \
12731296 .mca_component_name = name, \
12741297 MCA_BASE_MAKE_VERSION(component, OPAL_MAJOR_VERSION, OPAL_MINOR_VERSION, \
12751298 OPAL_RELEASE_VERSION)
12761299
12771300/**
12781301 * Convinience macro for detecting the BTL interface version.
12791302 */
1280- #define BTL_VERSION 310
1303+ #define BTL_VERSION 320
12811304
12821305END_C_DECLS
12831306
0 commit comments