|
ucs_status_t | uct_iface_set_am_handler (uct_iface_h iface, uint8_t id, uct_am_callback_t cb, void *arg, uint32_t flags) |
| Set active message handler for the interface. More...
|
|
ucs_status_t | uct_iface_set_am_tracer (uct_iface_h iface, uct_am_tracer_t tracer, void *arg) |
| Set active message tracer for the interface. More...
|
|
void | uct_iface_release_desc (void *desc) |
| Release AM descriptor. More...
|
|
ucs_status_t | uct_ep_am_short (uct_ep_h ep, uint8_t id, uint64_t header, const void *payload, unsigned length) |
|
ssize_t | uct_ep_am_bcopy (uct_ep_h ep, uint8_t id, uct_pack_callback_t pack_cb, void *arg, unsigned flags) |
|
ucs_status_t | uct_ep_am_zcopy (uct_ep_h ep, uint8_t id, const void *header, unsigned header_length, const uct_iov_t *iov, size_t iovcnt, unsigned flags, uct_completion_t *comp) |
| Send active message while avoiding local memory copy. More...
|
|
Defines active message functions.
typedef ucs_status_t(* uct_am_callback_t) (void *arg, void *data, size_t length, unsigned flags) |
When the callback is called, flags indicates how data should be handled. If flags contain UCT_CB_PARAM_FLAG_DESC value, it means data is part of a descriptor which must be released later by uct_iface_release_desc by the user if the callback returns UCS_INPROGRESS.
- Parameters
-
[in] | arg | User-defined argument. |
[in] | data | Points to the received data. This may be a part of a descriptor which may be released later. |
[in] | length | Length of data. |
[in] | flags | Mask with uct_cb_param_flags |
- Note
- This callback could be set and released by uct_iface_set_am_handler function.
- Return values
-
UCS_OK | - descriptor was consumed, and can be released by the caller. |
UCS_INPROGRESS | - descriptor is owned by the callee, and would be released later. Supported only if flags contain UCT_CB_PARAM_FLAG_DESC value. Otherwise, this is an error. |
typedef void(* uct_am_tracer_t) (void *arg, uct_am_trace_type_t type, uint8_t id, const void *data, size_t length, char *buffer, size_t max) |
Writes a string which represents active message contents into 'buffer'.
- Parameters
-
[in] | arg | User-defined argument. |
[in] | type | Message type. |
[in] | id | Active message id. |
[in] | data | Points to the received data. |
[in] | length | Length of data. |
[out] | buffer | Filled with a debug information string. |
[in] | max | Maximal length of the string. |
Enumerator |
---|
UCT_SEND_FLAG_SIGNALED |
Trigger UCT_EVENT_RECV_SIG event on remote side. Make best effort attempt to avoid triggering UCT_EVENT_RECV event. Ignored if not supported by interface.
|
Enumerator |
---|
UCT_AM_TRACE_TYPE_SEND |
|
UCT_AM_TRACE_TYPE_RECV |
|
UCT_AM_TRACE_TYPE_SEND_DROP |
|
UCT_AM_TRACE_TYPE_RECV_DROP |
|
UCT_AM_TRACE_TYPE_LAST |
|
Only one handler can be set of each active message ID, and setting a handler replaces the previous value. If cb == NULL, the current handler is removed.
- Parameters
-
[in] | iface | Interface to set the active message handler for. |
[in] | id | Active message id. Must be 0..UCT_AM_ID_MAX-1. |
[in] | cb | Active message callback. NULL to clear. |
[in] | arg | Active message argument. |
[in] | flags | Required callback flags |
- Returns
- error code if the interface does not support active messages or requested callback flags
- Examples:
- uct_hello_world.c.
Sets a function which dumps active message debug information to a buffer, which is printed every time an active message is sent or received, when data tracing is on. Without the tracer, only transport-level information is printed.
- Parameters
-
[in] | iface | Interface to set the active message tracer for. |
[in] | tracer | Active message tracer. NULL to clear. |
[in] | arg | Tracer custom argument. |
void uct_iface_release_desc |
( |
void * |
desc | ) |
|
ucs_status_t uct_ep_am_short |
( |
uct_ep_h |
ep, |
|
|
uint8_t |
id, |
|
|
uint64_t |
header, |
|
|
const void * |
payload, |
|
|
unsigned |
length |
|
) |
| |
The input data in iov array of uct_iov_t structures sent to remote side ("gather output"). Buffers in iov are processed in array order. This means that the function complete iov[0] before proceeding to iov[1], and so on.
- Parameters
-
[in] | ep | Destination endpoint handle. |
[in] | id | Active message id. Must be in range 0..UCT_AM_ID_MAX-1. |
[in] | header | Active message header. |
[in] | header_length | Active message header length in bytes. |
[in] | iov | Points to an array of uct_iov_t structures. The iov pointer must be valid address of an array of uct_iov_t structures. A particular structure pointer must be valid address. NULL terminated pointer is not required. |
[in] | iovcnt | Size of the iov data uct_iov_t structures array. If iovcnt is zero, the data is considered empty. iovcnt is limited by uct_iface_attr::cap::am::max_iov |
[in] | flags | Active message flags, see uct_msg_flags. |
[in] | comp | Completion handle as defined by uct_completion_t. |
- Returns
- UCS_INPROGRESS Some communication operations are still in progress. If non-NULL comp is provided, it will be updated upon completion of these operations.
- Examples:
- uct_hello_world.c.