UCX  1.21
Unified Communication X
ucp_def.h
1 /*
2 * Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2001-2014. ALL RIGHTS RESERVED.
3 * Copyright (C) UT-Battelle, LLC. 2014-2015. ALL RIGHTS RESERVED.
4 * Copyright (C) IBM 2015. ALL RIGHTS RESERVED.
5 * Copyright (C) Los Alamos National Security, LLC. 2018. ALL RIGHTS RESERVED.
6 * Copyright (C) Arm, Ltd. 2021. ALL RIGHTS RESERVED.
7 *
8 * See file LICENSE for terms.
9 */
10 
11 #ifndef UCP_DEF_H_
12 #define UCP_DEF_H_
13 
14 #include <ucs/memory/memory_type.h>
15 #include <ucs/type/status.h>
16 #include <ucs/config/types.h>
17 #include <stddef.h>
18 #include <stdint.h>
19 
20 
31 
32 
38 
39 
60 typedef struct ucp_context *ucp_context_h;
61 
62 
77 typedef struct ucp_config ucp_config_t;
78 
79 
92 typedef struct ucp_ep *ucp_ep_h;
93 
94 
102 typedef struct ucp_conn_request *ucp_conn_request_h;
103 
104 
112 typedef struct ucp_address ucp_address_t;
113 
114 
121 typedef enum {
128 
136 
145 
146 
157 typedef struct ucp_rkey *ucp_rkey_h;
158 
159 
172 typedef struct ucp_mem *ucp_mem_h;
173 
174 
182 typedef struct ucp_listener *ucp_listener_h;
183 
184 
190 typedef struct ucp_mem_attr {
196  uint64_t field_mask;
197 
201  void *address;
202 
206  size_t length;
207 
213 
214 
226 };
227 
228 
251  typedef struct ucp_worker *ucp_worker_h;
252 
253 
262 typedef uint64_t ucp_tag_t;
263 
264 
273 typedef struct ucp_recv_desc *ucp_tag_message_h;
274 
275 
283 typedef uint64_t ucp_datatype_t;
284 
285 
294 typedef void (*ucp_request_init_callback_t)(void *request);
295 
296 
306 typedef void (*ucp_request_cleanup_callback_t)(void *request);
307 
308 
324 typedef void (*ucp_send_callback_t)(void *request, ucs_status_t status);
325 
326 
345 typedef void (*ucp_send_nbx_callback_t)(void *request, ucs_status_t status,
346  void *user_data);
347 
348 
362 typedef void (*ucp_err_handler_cb_t)(void *arg, ucp_ep_h ep, ucs_status_t status);
363 
364 
371 typedef struct ucp_err_handler {
374  void *arg;
379 
380 
395 typedef void (*ucp_listener_accept_callback_t)(ucp_ep_h ep, void *arg);
396 
397 
411 typedef void
413 
414 
433  void *arg;
436 
437 
453 typedef void (*ucp_stream_recv_callback_t)(void *request, ucs_status_t status,
454  size_t length);
455 
456 
475 typedef void (*ucp_stream_recv_nbx_callback_t)(void *request, ucs_status_t status,
476  size_t length, void *user_data);
477 
478 
498 typedef void (*ucp_tag_recv_callback_t)(void *request, ucs_status_t status,
499  ucp_tag_recv_info_t *info);
500 
501 
523 typedef void (*ucp_tag_recv_nbx_callback_t)(void *request, ucs_status_t status,
524  const ucp_tag_recv_info_t *tag_info,
525  void *user_data);
526 
527 
545 typedef void (*ucp_am_recv_data_nbx_callback_t)(void *request,
546  ucs_status_t status,
547  size_t length, void *user_data);
548 
549 
564  UCP_WAKEUP_RMA = UCS_BIT(0),
565  UCP_WAKEUP_AMO = UCS_BIT(1),
566  UCP_WAKEUP_TAG_SEND = UCS_BIT(2),
567  UCP_WAKEUP_TAG_RECV = UCS_BIT(3),
568  UCP_WAKEUP_TX = UCS_BIT(10),
575  UCP_WAKEUP_RX = UCS_BIT(11),
580  UCP_WAKEUP_EDGE = UCS_BIT(16)
585 
586 
618 typedef ucs_status_t (*ucp_am_callback_t)(void *arg, void *data, size_t length,
619  ucp_ep_h reply_ep, unsigned flags);
620 
621 
675 typedef ucs_status_t (*ucp_am_recv_callback_t)(void *arg, const void *header,
676  size_t header_length,
677  void *data, size_t length,
678  const ucp_am_recv_param_t *param);
679 
680 
688 typedef struct ucp_ep_params {
695  uint64_t field_mask;
696 
704 
710 
715 
720  void *user_data;
721 
729  unsigned flags;
730 
739 
749 
758  const char *name;
759 
768 
770 
771 
777 #define UCP_ENTITY_NAME_MAX 32
778 
825 typedef struct {
831  const char *transport_name;
832 
838  const char *device_name;
839 
841 
842 
851 typedef struct {
858 
865  unsigned num_entries;
866 
873  size_t entry_size;
874 
876 
877 
878 typedef struct ucp_device_local_mem_list *ucp_device_local_mem_list_h;
879 typedef struct ucp_device_remote_mem_list *ucp_device_remote_mem_list_h;
880 
881 #endif
ucs_memory_type_t mem_type
Definition: ucp_def.h:211
Tuning parameters for the UCP endpoint.
Definition: ucp_def.h:688
Definition: ucp_def.h:135
UCP receive information descriptor.
Definition: ucp.h:1719
struct ucp_mem * ucp_mem_h
UCP Memory handle.
Definition: ucp_def.h:172
UCP endpoint error handling context.
Definition: ucp_def.h:371
void(* ucp_tag_recv_callback_t)(void *request, ucs_status_t status, ucp_tag_recv_info_t *info)
Completion callback for non-blocking tag receives.
Definition: ucp_def.h:498
uint64_t ucp_datatype_t
UCP Datatype Identifier.
Definition: ucp_def.h:283
void(* ucp_stream_recv_callback_t)(void *request, ucs_status_t status, size_t length)
Completion callback for non-blocking stream oriented receives.
Definition: ucp_def.h:453
ucp_wakeup_event_types
UCP worker wakeup events mask.
Definition: ucp_def.h:563
struct ucp_mem_attr ucp_mem_attr_t
Attributes of the UCP Memory handle, filled by ucp_mem_query function.
const char * name
Definition: ucp_def.h:758
uint64_t field_mask
Definition: ucp_def.h:196
Structure containing an array of transport layers and device names used by an endpoint.
Definition: ucp_def.h:851
void(* ucp_listener_conn_callback_t)(ucp_conn_request_h conn_request, void *arg)
A callback for handling of incoming connection request conn_request from a client.
Definition: ucp_def.h:412
struct ucp_context * ucp_context_h
UCP Application Context.
Definition: ucp_def.h:60
void(* ucp_tag_recv_nbx_callback_t)(void *request, ucs_status_t status, const ucp_tag_recv_info_t *tag_info, void *user_data)
Completion callback for non-blocking tag receives ucp_tag_recv_nbx call.
Definition: ucp_def.h:523
ucs_sock_addr_t sockaddr
Definition: ucp_def.h:738
struct ucp_conn_request * ucp_conn_request_h
UCP connection request.
Definition: ucp_def.h:102
unsigned flags
Definition: ucp_def.h:729
Definition: ucp_def.h:568
ucp_err_handler_cb_t cb
Definition: ucp_def.h:372
void(* ucp_err_handler_cb_t)(void *arg, ucp_ep_h ep, ucs_status_t status)
Callback to process peer failure.
Definition: ucp_def.h:362
Definition: ucp_def.h:223
struct ucp_listener * ucp_listener_h
UCP listen handle.
Definition: ucp_def.h:182
void(* ucp_request_cleanup_callback_t)(void *request)
Request cleanup callback.
Definition: ucp_def.h:306
struct ucp_listener_conn_handler ucp_listener_conn_handler_t
UCP callback to handle the connection request in a client-server connection establishment flow...
Definition: ucp_def.h:225
void * arg
Definition: ucp_def.h:433
Definition: ucp_def.h:224
ucp_listener_conn_callback_t cb
Definition: ucp_def.h:432
Attributes of the UCP Memory handle, filled by ucp_mem_query function.
Definition: ucp_def.h:190
unsigned num_entries
Definition: ucp_def.h:865
void * arg
Definition: ucp_def.h:374
uint64_t field_mask
Definition: ucp_def.h:695
ucp_mem_attr_field
UCP Memory handle attributes field mask.
Definition: ucp_def.h:222
ucs_sock_addr_t local_sockaddr
Definition: ucp_def.h:767
void(* ucp_send_nbx_callback_t)(void *request, ucs_status_t status, void *user_data)
Completion callback for non-blocking sends.
Definition: ucp_def.h:345
Definition: ucp_def.h:564
void(* ucp_request_init_callback_t)(void *request)
Request initialization callback.
Definition: ucp_def.h:294
struct ucp_ep_params ucp_ep_params_t
Tuning parameters for the UCP endpoint.
Definition: ucp_def.h:575
ucs_status_t
Status codes.
Definition: status.h:45
struct ucp_address ucp_address_t
UCP worker address.
Definition: ucp_def.h:112
void(* ucp_stream_recv_nbx_callback_t)(void *request, ucs_status_t status, size_t length, void *user_data)
Completion callback for non-blocking stream receives ucp_stream_recv_nbx call.
Definition: ucp_def.h:475
void(* ucp_send_callback_t)(void *request, ucs_status_t status)
Completion callback for non-blocking sends.
Definition: ucp_def.h:324
size_t entry_size
Definition: ucp_def.h:873
ucs_status_t(* ucp_am_recv_callback_t)(void *arg, const void *header, size_t header_length, void *data, size_t length, const ucp_am_recv_param_t *param)
Callback to process incoming Active Message sent by ucp_am_send_nbx routine.
Definition: ucp_def.h:675
ucp_conn_request_h conn_request
Definition: ucp_def.h:748
struct ucp_config ucp_config_t
UCP configuration descriptor.
Definition: ucp_def.h:77
Operation parameters provided in ucp_am_recv_callback_t callback.
Definition: ucp.h:1931
struct ucp_recv_desc * ucp_tag_message_h
UCP Message descriptor.
Definition: ucp_def.h:273
Definition: ucp_def.h:580
void(* ucp_listener_accept_callback_t)(ucp_ep_h ep, void *arg)
A callback for accepting client/server connections on a listener ucp_listener_h.
Definition: ucp_def.h:395
enum ucs_memory_type ucs_memory_type_t
Memory types.
const char * device_name
Definition: ucp_def.h:838
size_t length
Definition: ucp_def.h:206
void * address
Definition: ucp_def.h:201
uint64_t ucp_tag_t
UCP Tag Identifier.
Definition: ucp_def.h:262
const ucp_address_t * address
Definition: ucp_def.h:703
struct ucp_err_handler ucp_err_handler_t
UCP endpoint error handling context.
ucp_err_handling_mode_t err_mode
Definition: ucp_def.h:709
Definition: ucp_def.h:565
enum ucp_wakeup_event_types ucp_wakeup_event_t
UCP worker wakeup events mask.
Definition: ucp_def.h:143
The ucp_transports_t and ucp_transport_entry_t structures are used when ucp_ep_query is called to ret...
Definition: ucp_def.h:825
ucp_err_handler_t err_handler
Definition: ucp_def.h:714
struct ucp_worker * ucp_worker_h
UCP Worker.
Definition: ucp_def.h:251
void * user_data
Definition: ucp_def.h:720
Definition: ucp_def.h:567
ucp_err_handling_mode_t
Error handling mode for the UCP endpoint.
Definition: ucp_def.h:121
Definition: types.h:151
struct ucp_ep * ucp_ep_h
UCP Endpoint.
Definition: ucp_def.h:92
UCP callback to handle the connection request in a client-server connection establishment flow...
Definition: ucp_def.h:431
struct ucp_rkey * ucp_rkey_h
UCP Remote memory handle.
Definition: ucp_def.h:157
ucs_status_t(* ucp_am_callback_t)(void *arg, void *data, size_t length, ucp_ep_h reply_ep, unsigned flags)
Callback to process incoming Active Message.
Definition: ucp_def.h:618
ucp_transport_entry_t * entries
Definition: ucp_def.h:857
void(* ucp_am_recv_data_nbx_callback_t)(void *request, ucs_status_t status, size_t length, void *user_data)
Completion callback for non-blocking Active Message receives.
Definition: ucp_def.h:545
Definition: ucp_def.h:566
Definition: ucp_def.h:127
const char * transport_name
Definition: ucp_def.h:831