UCX  1.20
Unified Communication X
uct_def.h
1 
7 #ifndef UCT_DEF_H_
8 #define UCT_DEF_H_
9 
10 #include <ucs/config/types.h>
11 #include <ucs/type/status.h>
12 
13 #include <stddef.h>
14 #include <stdint.h>
15 #include <sys/types.h>
16 
17 
18 #define UCT_COMPONENT_NAME_MAX 16
19 #define UCT_MD_GLOBAL_ID_MAX 256
20 #define UCT_TL_NAME_MAX 10
21 #define UCT_MD_NAME_MAX 16
22 #define UCT_DEVICE_NAME_MAX 32
23 #define UCT_PENDING_REQ_PRIV_LEN 40
24 #define UCT_TAG_PRIV_LEN 32
25 #define UCT_AM_ID_BITS 5
26 #define UCT_AM_ID_MAX UCS_BIT(UCT_AM_ID_BITS)
27 #define UCT_MEM_HANDLE_NULL NULL
28 #define UCT_INVALID_RKEY ((uintptr_t)(-1))
29 #define UCT_INLINE_API static UCS_F_ALWAYS_INLINE
30 #define UCT_DMABUF_FD_INVALID -1
31 
32 
43 };
44 
45 
69  UCT_CB_PARAM_FLAG_DESC = UCS_BIT(0),
72 };
73 
78 typedef struct uct_component *uct_component_h;
79 typedef struct uct_iface *uct_iface_h;
80 typedef struct uct_iface_config uct_iface_config_t;
81 typedef struct uct_md_config uct_md_config_t;
82 typedef struct uct_cm_config uct_cm_config_t;
83 typedef struct uct_ep *uct_ep_h;
84 typedef void * uct_mem_h;
85 typedef uintptr_t uct_rkey_t;
86 typedef struct uct_md *uct_md_h;
87 typedef struct uct_md_ops uct_md_ops_t;
88 typedef void *uct_rkey_ctx_h;
91 typedef struct uct_ep_attr uct_ep_attr_t;
92 typedef struct uct_md_attr uct_md_attr_t;
95 typedef struct uct_worker *uct_worker_h;
96 typedef struct uct_md uct_md_t;
98 typedef struct uct_device_addr uct_device_addr_t;
99 typedef struct uct_iface_addr uct_iface_addr_t;
100 typedef struct uct_ep_addr uct_ep_addr_t;
103 typedef struct uct_cm_attr uct_cm_attr_t;
104 typedef struct uct_cm uct_cm_t;
107 typedef struct uct_listener *uct_listener_h;
110 typedef uint64_t uct_tag_t; /* tag type - 64 bit */
111 typedef int uct_worker_cb_id_t;
112 typedef void* uct_conn_request_h;
113 typedef struct uct_device_ep *uct_device_ep_h;
114 typedef struct uct_device_mem_element uct_device_mem_element_t;
115 
149 typedef struct uct_iov {
150  void *buffer;
151  size_t length;
153  size_t stride;
155  unsigned count;
156 } uct_iov_t;
157 
158 
173 };
174 
175 
188 
193 };
194 
195 
208  uint64_t field_mask;
209 
216  char dev_name[UCT_DEVICE_NAME_MAX];
218 
219 
226 typedef struct uct_cm_ep_resolve_args {
232  uint64_t field_mask;
233 
240  char dev_name[UCT_DEVICE_NAME_MAX];
241 
252 
253 
264 
267 
270 
273 };
274 
275 
283 typedef struct uct_cm_remote_data {
289  uint64_t field_mask;
290 
295 
300 
305  const void *conn_priv_data;
306 
312 
313 
328 
334 
340 
346 };
347 
348 
362  uint64_t field_mask;
363 
367  char dev_name[UCT_DEVICE_NAME_MAX];
368 
375 
380 
386 
387 
399 
402 };
403 
404 
417  uint64_t field_mask;
418 
423 
435 
436 
451 };
452 
453 
466  uint64_t field_mask;
467 
480 
481 
508 typedef ucs_status_t (*uct_am_callback_t)(void *arg, void *data, size_t length,
509  unsigned flags);
510 
511 
526 typedef void (*uct_am_tracer_t)(void *arg, uct_am_trace_type_t type, uint8_t id,
527  const void *data, size_t length, char *buffer,
528  size_t max);
529 
530 
539 
540 
556 
557 
576 typedef ucs_status_t (*uct_error_handler_t)(void *arg, uct_ep_h ep,
577  ucs_status_t status);
578 
579 
589  void *arg);
590 
600 typedef size_t (*uct_pack_callback_t)(void *dest, void *arg);
601 
602 
613 typedef void (*uct_unpack_callback_t)(void *arg, const void *data, size_t length);
614 
615 
643 typedef void
645  uct_conn_request_h conn_request,
646  const void *conn_priv_data,
647  size_t length);
648 
649 
668 typedef void
671  *conn_req_args);
672 
673 
699  (uct_ep_h ep, void *arg,
700  const uct_cm_ep_server_conn_notify_args_t *connect_args);
701 
702 
723 typedef void (*uct_cm_ep_client_connect_callback_t)(uct_ep_h ep, void *arg,
725  *connect_args);
726 
727 
745 typedef void (*uct_ep_disconnect_cb_t)(uct_ep_h ep, void *arg);
746 
747 
772 typedef ssize_t
775  *pack_args, void *priv_data);
776 
777 
796 typedef ucs_status_t
797 (*uct_cm_ep_resolve_callback_t)(void *user_data,
798  const uct_cm_ep_resolve_args_t *resolve_args);
799 
800 
847 typedef ucs_status_t (*uct_tag_unexp_eager_cb_t)(void *arg, void *data,
848  size_t length, unsigned flags,
849  uct_tag_t stag, uint64_t imm,
850  void **context);
851 
852 
884 typedef ucs_status_t (*uct_tag_unexp_rndv_cb_t)(void *arg, unsigned flags,
885  uint64_t stag, const void *header,
886  unsigned header_length,
887  uint64_t remote_addr, size_t length,
888  const void *rkey_buf);
889 
890 
899 typedef void (*uct_async_event_cb_t)(void *arg, unsigned flags);
900 
901 
902 #endif
Definition: uct_def.h:70
struct uct_cm_ep_client_connect_args uct_cm_ep_client_connect_args_t
Arguments to the client&#39;s connect callback.
struct uct_md uct_md_t
Definition: uct_def.h:96
struct uct_device_mem_element uct_device_mem_element_t
Definition: uct_def.h:114
Definition: uct_def.h:263
uct_am_trace_type
Trace types for active message tracer.
Definition: uct_def.h:37
void(* uct_async_event_cb_t)(void *arg, unsigned flags)
Callback to process asynchronous events.
Definition: uct_def.h:899
struct uct_cm_remote_data uct_cm_remote_data_t
Data received from the remote peer.
void * uct_mem_h
Definition: uct_def.h:84
void(* uct_sockaddr_conn_request_callback_t)(uct_iface_h iface, void *arg, uct_conn_request_h conn_request, const void *conn_priv_data, size_t length)
Callback to process an incoming connection request on the server side.
Definition: uct_def.h:644
Structure for scatter-gather I/O.
Definition: uct_def.h:149
size_t conn_priv_data_length
Definition: uct_def.h:310
void(* uct_ep_disconnect_cb_t)(uct_ep_h ep, void *arg)
Callback to handle the disconnection of the remote peer.
Definition: uct_def.h:745
Arguments to the client-server private data pack callback.
Definition: uct_def.h:202
struct uct_device_ep * uct_device_ep_h
Definition: uct_def.h:113
ucs_status_t status
Definition: uct_def.h:478
struct uct_md_ops uct_md_ops_t
Definition: uct_def.h:87
struct uct_iov uct_iov_t
Structure for scatter-gather I/O.
Parameters used for interface creation.
Definition: uct.h:1216
struct uct_md_config uct_md_config_t
Definition: uct_def.h:81
void(* uct_pending_purge_callback_t)(uct_pending_req_t *self, void *arg)
Callback to purge pending requests.
Definition: uct_def.h:588
Arguments to the listener&#39;s connection request callback.
Definition: uct_def.h:356
Arguments to the client&#39;s connect callback.
Definition: uct_def.h:411
uct_cm_t * uct_cm_h
Definition: uct_def.h:105
uct_cb_param_flags
Flags for active message and tag-matching offload callbacks (callback&#39;s parameters).
Definition: uct_def.h:68
ucs_status_t(* uct_cm_ep_resolve_callback_t)(void *user_data, const uct_cm_ep_resolve_args_t *resolve_args)
Callback to notify that the client side endpoint is bound to a local device.
Definition: uct_def.h:797
Definition: uct_def.h:187
void * buffer
Definition: uct_def.h:150
ucs_sock_addr_t client_address
Definition: uct_def.h:384
uct_cm_listener_conn_request_args_field
Listener&#39;s connection request callback arguments field mask.
Definition: uct_def.h:322
void(* uct_cm_listener_conn_request_callback_t)(uct_listener_h listener, void *arg, const uct_cm_listener_conn_request_args_t *conn_req_args)
Callback to process an incoming connection request on the server side listener in a connection manage...
Definition: uct_def.h:669
void(* uct_cm_ep_server_conn_notify_callback_t)(uct_ep_h ep, void *arg, const uct_cm_ep_server_conn_notify_args_t *connect_args)
Callback to process an incoming connection establishment acknowledgment on the server side listener...
Definition: uct_def.h:699
UCT listener attributes, capabilities and limitations.
Definition: uct.h:1522
struct uct_worker * uct_worker_h
Definition: uct_def.h:95
Interface attributes: capabilities and limitations.
Definition: uct.h:1080
int uct_worker_cb_id_t
Definition: uct_def.h:111
ucs_status_t(* uct_error_handler_t)(void *arg, uct_ep_h ep, ucs_status_t status)
Callback to process peer failure.
Definition: uct_def.h:576
uint64_t field_mask
Definition: uct_def.h:289
Definition: uct_def.h:71
uint64_t field_mask
Definition: uct_def.h:417
struct uct_iface_addr uct_iface_addr_t
Definition: uct_def.h:99
void(* uct_completion_callback_t)(uct_completion_t *self)
Callback to process send completion.
Definition: uct_def.h:538
struct uct_cm_ep_server_conn_notify_args uct_cm_ep_server_conn_notify_args_t
Arguments to the server&#39;s notify callback.
struct uct_cm_config uct_cm_config_t
Definition: uct_def.h:82
struct uct_ep_addr uct_ep_addr_t
Definition: uct_def.h:100
ucs_status_t status
Definition: uct_def.h:250
struct uct_md * uct_md_h
Memory domain handler.
Definition: uct_def.h:86
const uct_cm_remote_data_t * remote_data
Definition: uct_def.h:422
ucs_status_t(* uct_tag_unexp_rndv_cb_t)(void *arg, unsigned flags, uint64_t stag, const void *header, unsigned header_length, uint64_t remote_addr, size_t length, const void *rkey_buf)
Callback to process unexpected rendezvous tagged message.
Definition: uct_def.h:884
Definition: uct_def.h:41
size_t(* uct_pack_callback_t)(void *dest, void *arg)
Callback for producing data.
Definition: uct_def.h:600
const void * conn_priv_data
Definition: uct_def.h:305
uct_cm_ep_resolve_args_field
Client-Server resolve callback arguments field mask.
Definition: uct_def.h:183
struct uct_cm_ep_resolve_args uct_cm_ep_resolve_args_t
Arguments to the client-server resolved callback.
size_t length
Definition: uct_def.h:151
ucs_status_t
Status codes.
Definition: status.h:45
uint64_t field_mask
Definition: uct_def.h:466
Parameters for creating a listener object uct_listener_h by uct_listener_create.
Definition: uct.h:1542
uct_cm_ep_priv_data_pack_args_field
Client-Server private data pack callback arguments field mask.
Definition: uct_def.h:167
uct_cm_remote_data_field
Remote data attributes field mask.
Definition: uct_def.h:261
ucs_status_t status
Definition: uct_def.h:433
Connection manager attributes, capabilities and limitations.
Definition: uct.h:1502
struct uct_listener * uct_listener_h
Definition: uct_def.h:107
void(* uct_unpack_callback_t)(void *arg, const void *data, size_t length)
Callback for consuming data.
Definition: uct_def.h:613
uint64_t field_mask
Definition: uct_def.h:362
Definition: uct_def.h:192
struct uct_ep_attr uct_ep_attr_t
Definition: uct_def.h:91
struct uct_component * uct_component_h
Definition: uct_def.h:78
const uct_cm_remote_data_t * remote_data
Definition: uct_def.h:379
uint64_t uct_tag_t
Definition: uct_def.h:110
struct uct_iface_config uct_iface_config_t
Definition: uct_def.h:80
uint64_t field_mask
Definition: uct_def.h:232
Parameters for connecting a UCT endpoint by uct_ep_connect.
Definition: uct.h:1478
unsigned count
Definition: uct_def.h:155
ssize_t(* uct_cm_ep_priv_data_pack_callback_t)(void *arg, const uct_cm_ep_priv_data_pack_args_t *pack_args, void *priv_data)
Callback to fill the user&#39;s private data in a client-server flow.
Definition: uct_def.h:773
struct uct_cm_ep_priv_data_pack_args uct_cm_ep_priv_data_pack_args_t
Arguments to the client-server private data pack callback.
uct_cm_ep_server_conn_notify_args_field
Field mask flags for server-side connection established notification callback.
Definition: uct_def.h:446
Arguments to the server&#39;s notify callback.
Definition: uct_def.h:460
Parameters for creating a UCT endpoint by uct_ep_create.
Definition: uct.h:1327
uct_mem_h memh
Definition: uct_def.h:152
Definition: uct_def.h:69
uct_conn_request_h conn_request
Definition: uct_def.h:374
Memory domain attributes.
Definition: uct.h:1578
void * uct_conn_request_h
Definition: uct_def.h:112
uct_cm_ep_client_connect_args_field
Field mask flags for client-side connection established callback.
Definition: uct_def.h:396
size_t dev_addr_length
Definition: uct_def.h:299
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)
Callback to trace active messages.
Definition: uct_def.h:526
ucs_status_t(* uct_pending_callback_t)(uct_pending_req_t *self)
Callback to process pending requests.
Definition: uct_def.h:555
Pending request.
Definition: uct.h:1789
size_t stride
Definition: uct_def.h:153
void(* uct_cm_ep_client_connect_callback_t)(uct_ep_h ep, void *arg, const uct_cm_ep_client_connect_args_t *connect_args)
Callback to process an incoming connection response on the client side from the server or handle a lo...
Definition: uct_def.h:723
struct uct_cm_listener_conn_request_args uct_cm_listener_conn_request_args_t
Arguments to the listener&#39;s connection request callback.
struct uct_iface * uct_iface_h
Definition: uct_def.h:79
Arguments to the client-server resolved callback.
Definition: uct_def.h:226
Definition: types.h:151
const uct_device_addr_t * dev_addr
Definition: uct_def.h:294
struct uct_ep * uct_ep_h
Definition: uct_def.h:83
Definition: uct_def.h:38
Posted tag context.
Definition: uct.h:1802
Definition: uct_def.h:39
Definition: uct_def.h:40
ucs_status_t(* uct_tag_unexp_eager_cb_t)(void *arg, void *data, size_t length, unsigned flags, uct_tag_t stag, uint64_t imm, void **context)
Callback to process unexpected eager tagged message.
Definition: uct_def.h:847
enum uct_am_trace_type uct_am_trace_type_t
Definition: uct_def.h:97
Completion handle.
Definition: uct.h:1773
void * uct_rkey_ctx_h
Definition: uct_def.h:88
Definition: uct_def.h:42
struct uct_device_addr uct_device_addr_t
Definition: uct_def.h:98
ucs_status_t(* uct_am_callback_t)(void *arg, void *data, size_t length, unsigned flags)
Callback to process incoming active message.
Definition: uct_def.h:508
uintptr_t uct_rkey_t
Definition: uct_def.h:85
Data received from the remote peer.
Definition: uct_def.h:283
struct uct_cm uct_cm_t
Definition: uct_def.h:104
uint64_t field_mask
Definition: uct_def.h:208