UCX  1.18
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 
147 typedef struct uct_iov {
148  void *buffer;
149  size_t length;
151  size_t stride;
153  unsigned count;
154 } uct_iov_t;
155 
156 
171 };
172 
173 
186 
191 };
192 
193 
206  uint64_t field_mask;
207 
214  char dev_name[UCT_DEVICE_NAME_MAX];
216 
217 
224 typedef struct uct_cm_ep_resolve_args {
230  uint64_t field_mask;
231 
238  char dev_name[UCT_DEVICE_NAME_MAX];
239 
250 
251 
262 
265 
268 
271 };
272 
273 
281 typedef struct uct_cm_remote_data {
287  uint64_t field_mask;
288 
293 
298 
303  const void *conn_priv_data;
304 
310 
311 
326 
332 
338 
344 };
345 
346 
360  uint64_t field_mask;
361 
365  char dev_name[UCT_DEVICE_NAME_MAX];
366 
373 
378 
384 
385 
397 
400 };
401 
402 
415  uint64_t field_mask;
416 
421 
433 
434 
449 };
450 
451 
464  uint64_t field_mask;
465 
478 
479 
506 typedef ucs_status_t (*uct_am_callback_t)(void *arg, void *data, size_t length,
507  unsigned flags);
508 
509 
524 typedef void (*uct_am_tracer_t)(void *arg, uct_am_trace_type_t type, uint8_t id,
525  const void *data, size_t length, char *buffer,
526  size_t max);
527 
528 
537 
538 
554 
555 
574 typedef ucs_status_t (*uct_error_handler_t)(void *arg, uct_ep_h ep,
575  ucs_status_t status);
576 
577 
587  void *arg);
588 
598 typedef size_t (*uct_pack_callback_t)(void *dest, void *arg);
599 
600 
611 typedef void (*uct_unpack_callback_t)(void *arg, const void *data, size_t length);
612 
613 
641 typedef void
643  uct_conn_request_h conn_request,
644  const void *conn_priv_data,
645  size_t length);
646 
647 
666 typedef void
669  *conn_req_args);
670 
671 
697  (uct_ep_h ep, void *arg,
698  const uct_cm_ep_server_conn_notify_args_t *connect_args);
699 
700 
721 typedef void (*uct_cm_ep_client_connect_callback_t)(uct_ep_h ep, void *arg,
723  *connect_args);
724 
725 
743 typedef void (*uct_ep_disconnect_cb_t)(uct_ep_h ep, void *arg);
744 
745 
770 typedef ssize_t
773  *pack_args, void *priv_data);
774 
775 
794 typedef ucs_status_t
795 (*uct_cm_ep_resolve_callback_t)(void *user_data,
796  const uct_cm_ep_resolve_args_t *resolve_args);
797 
798 
845 typedef ucs_status_t (*uct_tag_unexp_eager_cb_t)(void *arg, void *data,
846  size_t length, unsigned flags,
847  uct_tag_t stag, uint64_t imm,
848  void **context);
849 
850 
882 typedef ucs_status_t (*uct_tag_unexp_rndv_cb_t)(void *arg, unsigned flags,
883  uint64_t stag, const void *header,
884  unsigned header_length,
885  uint64_t remote_addr, size_t length,
886  const void *rkey_buf);
887 
888 
897 typedef void (*uct_async_event_cb_t)(void *arg, unsigned flags);
898 
899 
900 #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
Definition: uct_def.h:261
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:897
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:642
Structure for scatter-gather I/O.
Definition: uct_def.h:147
size_t conn_priv_data_length
Definition: uct_def.h:308
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:743
Arguments to the client-server private data pack callback.
Definition: uct_def.h:200
ucs_status_t status
Definition: uct_def.h:476
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:1215
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:586
Arguments to the listener&#39;s connection request callback.
Definition: uct_def.h:354
Arguments to the client&#39;s connect callback.
Definition: uct_def.h:409
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
char dev_name[UCT_DEVICE_NAME_MAX]
Definition: uct_def.h:238
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:795
Definition: uct_def.h:185
void * buffer
Definition: uct_def.h:148
ucs_sock_addr_t client_address
Definition: uct_def.h:382
uct_cm_listener_conn_request_args_field
Listener&#39;s connection request callback arguments field mask.
Definition: uct_def.h:320
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:667
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:697
UCT listener attributes, capabilities and limitations.
Definition: uct.h:1521
struct uct_worker * uct_worker_h
Definition: uct_def.h:95
Interface attributes: capabilities and limitations.
Definition: uct.h:1079
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:574
uint64_t field_mask
Definition: uct_def.h:287
Definition: uct_def.h:71
uint64_t field_mask
Definition: uct_def.h:415
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:536
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:248
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:420
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:882
Definition: uct_def.h:41
size_t(* uct_pack_callback_t)(void *dest, void *arg)
Callback for producing data.
Definition: uct_def.h:598
const void * conn_priv_data
Definition: uct_def.h:303
uct_cm_ep_resolve_args_field
Client-Server resolve callback arguments field mask.
Definition: uct_def.h:181
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:149
ucs_status_t
Status codes.
Definition: status.h:45
uint64_t field_mask
Definition: uct_def.h:464
Parameters for creating a listener object uct_listener_h by uct_listener_create.
Definition: uct.h:1541
uct_cm_ep_priv_data_pack_args_field
Client-Server private data pack callback arguments field mask.
Definition: uct_def.h:165
uct_cm_remote_data_field
Remote data attributes field mask.
Definition: uct_def.h:259
ucs_status_t status
Definition: uct_def.h:431
Connection manager attributes, capabilities and limitations.
Definition: uct.h:1501
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:611
uint64_t field_mask
Definition: uct_def.h:360
Definition: uct_def.h:190
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:377
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:230
Parameters for connecting a UCT endpoint by uct_ep_connect.
Definition: uct.h:1477
unsigned count
Definition: uct_def.h:153
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:771
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:444
char dev_name[UCT_DEVICE_NAME_MAX]
Definition: uct_def.h:214
Arguments to the server&#39;s notify callback.
Definition: uct_def.h:458
Parameters for creating a UCT endpoint by uct_ep_create.
Definition: uct.h:1326
uct_mem_h memh
Definition: uct_def.h:150
Definition: uct_def.h:69
char dev_name[UCT_DEVICE_NAME_MAX]
Definition: uct_def.h:365
uct_conn_request_h conn_request
Definition: uct_def.h:372
Memory domain attributes.
Definition: uct.h:1577
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:394
size_t dev_addr_length
Definition: uct_def.h:297
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:524
ucs_status_t(* uct_pending_callback_t)(uct_pending_req_t *self)
Callback to process pending requests.
Definition: uct_def.h:553
Pending request.
Definition: uct.h:1787
size_t stride
Definition: uct_def.h:151
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:721
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:224
Definition: types.h:151
const uct_device_addr_t * dev_addr
Definition: uct_def.h:292
struct uct_ep * uct_ep_h
Definition: uct_def.h:83
Definition: uct_def.h:38
Posted tag context.
Definition: uct.h:1800
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:845
enum uct_am_trace_type uct_am_trace_type_t
Definition: uct_def.h:97
Completion handle.
Definition: uct.h:1771
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:506
uintptr_t uct_rkey_t
Definition: uct_def.h:85
Data received from the remote peer.
Definition: uct_def.h:281
struct uct_cm uct_cm_t
Definition: uct_def.h:104
uint64_t field_mask
Definition: uct_def.h:206