UCX  1.18
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 {
140 
141 
152 typedef struct ucp_rkey *ucp_rkey_h;
153 
154 
167 typedef struct ucp_mem *ucp_mem_h;
168 
169 
177 typedef struct ucp_listener *ucp_listener_h;
178 
179 
185 typedef struct ucp_mem_attr {
191  uint64_t field_mask;
192 
196  void *address;
197 
201  size_t length;
202 
208 
209 
221 };
222 
223 
246  typedef struct ucp_worker *ucp_worker_h;
247 
248 
257 typedef uint64_t ucp_tag_t;
258 
259 
268 typedef struct ucp_recv_desc *ucp_tag_message_h;
269 
270 
278 typedef uint64_t ucp_datatype_t;
279 
280 
289 typedef void (*ucp_request_init_callback_t)(void *request);
290 
291 
301 typedef void (*ucp_request_cleanup_callback_t)(void *request);
302 
303 
319 typedef void (*ucp_send_callback_t)(void *request, ucs_status_t status);
320 
321 
340 typedef void (*ucp_send_nbx_callback_t)(void *request, ucs_status_t status,
341  void *user_data);
342 
343 
357 typedef void (*ucp_err_handler_cb_t)(void *arg, ucp_ep_h ep, ucs_status_t status);
358 
359 
366 typedef struct ucp_err_handler {
369  void *arg;
374 
375 
390 typedef void (*ucp_listener_accept_callback_t)(ucp_ep_h ep, void *arg);
391 
392 
406 typedef void
408 
409 
428  void *arg;
431 
432 
448 typedef void (*ucp_stream_recv_callback_t)(void *request, ucs_status_t status,
449  size_t length);
450 
451 
470 typedef void (*ucp_stream_recv_nbx_callback_t)(void *request, ucs_status_t status,
471  size_t length, void *user_data);
472 
473 
493 typedef void (*ucp_tag_recv_callback_t)(void *request, ucs_status_t status,
494  ucp_tag_recv_info_t *info);
495 
496 
518 typedef void (*ucp_tag_recv_nbx_callback_t)(void *request, ucs_status_t status,
519  const ucp_tag_recv_info_t *tag_info,
520  void *user_data);
521 
522 
540 typedef void (*ucp_am_recv_data_nbx_callback_t)(void *request,
541  ucs_status_t status,
542  size_t length, void *user_data);
543 
544 
559  UCP_WAKEUP_RMA = UCS_BIT(0),
560  UCP_WAKEUP_AMO = UCS_BIT(1),
561  UCP_WAKEUP_TAG_SEND = UCS_BIT(2),
562  UCP_WAKEUP_TAG_RECV = UCS_BIT(3),
563  UCP_WAKEUP_TX = UCS_BIT(10),
570  UCP_WAKEUP_RX = UCS_BIT(11),
575  UCP_WAKEUP_EDGE = UCS_BIT(16)
580 
581 
613 typedef ucs_status_t (*ucp_am_callback_t)(void *arg, void *data, size_t length,
614  ucp_ep_h reply_ep, unsigned flags);
615 
616 
670 typedef ucs_status_t (*ucp_am_recv_callback_t)(void *arg, const void *header,
671  size_t header_length,
672  void *data, size_t length,
673  const ucp_am_recv_param_t *param);
674 
675 
683 typedef struct ucp_ep_params {
690  uint64_t field_mask;
691 
699 
705 
710 
715  void *user_data;
716 
724  unsigned flags;
725 
734 
744 
753  const char *name;
754 
763 
765 
766 
772 #define UCP_ENTITY_NAME_MAX 32
773 
820 typedef struct {
826  const char *transport_name;
827 
833  const char *device_name;
834 
836 
837 
846 typedef struct {
853 
860  unsigned num_entries;
861 
868  size_t entry_size;
869 
871 
872 #endif
ucs_memory_type_t mem_type
Definition: ucp_def.h:206
Tuning parameters for the UCP endpoint.
Definition: ucp_def.h:683
Definition: ucp_def.h:130
UCP receive information descriptor.
Definition: ucp.h:1699
struct ucp_mem * ucp_mem_h
UCP Memory handle.
Definition: ucp_def.h:167
UCP endpoint error handling context.
Definition: ucp_def.h:366
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:493
uint64_t ucp_datatype_t
UCP Datatype Identifier.
Definition: ucp_def.h:278
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:448
ucp_wakeup_event_types
UCP worker wakeup events mask.
Definition: ucp_def.h:558
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:753
uint64_t field_mask
Definition: ucp_def.h:191
Structure containing an array of transport layers and device names used by an endpoint.
Definition: ucp_def.h:846
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:407
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:518
ucs_sock_addr_t sockaddr
Definition: ucp_def.h:733
struct ucp_conn_request * ucp_conn_request_h
UCP connection request.
Definition: ucp_def.h:102
unsigned flags
Definition: ucp_def.h:724
Definition: ucp_def.h:563
ucp_err_handler_cb_t cb
Definition: ucp_def.h:367
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:357
Definition: ucp_def.h:218
struct ucp_listener * ucp_listener_h
UCP listen handle.
Definition: ucp_def.h:177
void(* ucp_request_cleanup_callback_t)(void *request)
Request cleanup callback.
Definition: ucp_def.h:301
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:220
void * arg
Definition: ucp_def.h:428
Definition: ucp_def.h:219
ucp_listener_conn_callback_t cb
Definition: ucp_def.h:427
Attributes of the UCP Memory handle, filled by ucp_mem_query function.
Definition: ucp_def.h:185
unsigned num_entries
Definition: ucp_def.h:860
void * arg
Definition: ucp_def.h:369
uint64_t field_mask
Definition: ucp_def.h:690
ucp_mem_attr_field
UCP Memory handle attributes field mask.
Definition: ucp_def.h:217
ucs_sock_addr_t local_sockaddr
Definition: ucp_def.h:762
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:340
Definition: ucp_def.h:559
void(* ucp_request_init_callback_t)(void *request)
Request initialization callback.
Definition: ucp_def.h:289
struct ucp_ep_params ucp_ep_params_t
Tuning parameters for the UCP endpoint.
Definition: ucp_def.h:570
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:470
void(* ucp_send_callback_t)(void *request, ucs_status_t status)
Completion callback for non-blocking sends.
Definition: ucp_def.h:319
size_t entry_size
Definition: ucp_def.h:868
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:670
ucp_conn_request_h conn_request
Definition: ucp_def.h:743
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:1911
struct ucp_recv_desc * ucp_tag_message_h
UCP Message descriptor.
Definition: ucp_def.h:268
Definition: ucp_def.h:575
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:390
enum ucs_memory_type ucs_memory_type_t
Memory types.
const char * device_name
Definition: ucp_def.h:833
size_t length
Definition: ucp_def.h:201
void * address
Definition: ucp_def.h:196
uint64_t ucp_tag_t
UCP Tag Identifier.
Definition: ucp_def.h:257
const ucp_address_t * address
Definition: ucp_def.h:698
struct ucp_err_handler ucp_err_handler_t
UCP endpoint error handling context.
ucp_err_handling_mode_t err_mode
Definition: ucp_def.h:704
Definition: ucp_def.h:560
enum ucp_wakeup_event_types ucp_wakeup_event_t
UCP worker wakeup events mask.
The ucp_transports_t and ucp_transport_entry_t structures are used when ucp_ep_query is called to ret...
Definition: ucp_def.h:820
ucp_err_handler_t err_handler
Definition: ucp_def.h:709
struct ucp_worker * ucp_worker_h
UCP Worker.
Definition: ucp_def.h:246
void * user_data
Definition: ucp_def.h:715
Definition: ucp_def.h:562
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:426
struct ucp_rkey * ucp_rkey_h
UCP Remote memory handle.
Definition: ucp_def.h:152
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:613
ucp_transport_entry_t * entries
Definition: ucp_def.h:852
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:540
Definition: ucp_def.h:561
Definition: ucp_def.h:122
const char * transport_name
Definition: ucp_def.h:826