UCX 1.22
Unified Communication X
Loading...
Searching...
No Matches
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
60typedef struct ucp_context *ucp_context_h;
61
62
77typedef struct ucp_config ucp_config_t;
78
79
92typedef struct ucp_ep *ucp_ep_h;
93
94
102typedef struct ucp_conn_request *ucp_conn_request_h;
103
104
112typedef struct ucp_address ucp_address_t;
113
114
145
146
157typedef struct ucp_rkey *ucp_rkey_h;
158
159
168#define UCP_REMOTE_ADDR_INVALID UINT64_MAX
169
170
179#define UCP_RKEY_INVALID NULL
180
181
194typedef struct ucp_mem *ucp_mem_h;
195
196
204typedef struct ucp_listener *ucp_listener_h;
205
206
235
236
249
250
273 typedef struct ucp_worker *ucp_worker_h;
274
275
284typedef uint64_t ucp_tag_t;
285
286
295typedef struct ucp_recv_desc *ucp_tag_message_h;
296
297
305typedef uint64_t ucp_datatype_t;
306
307
316typedef void (*ucp_request_init_callback_t)(void *request);
317
318
328typedef void (*ucp_request_cleanup_callback_t)(void *request);
329
330
346typedef void (*ucp_send_callback_t)(void *request, ucs_status_t status);
347
348
367typedef void (*ucp_send_nbx_callback_t)(void *request, ucs_status_t status,
368 void *user_data);
369
370
384typedef void (*ucp_err_handler_cb_t)(void *arg, ucp_ep_h ep, ucs_status_t status);
385
386
401
402
417typedef void (*ucp_listener_accept_callback_t)(ucp_ep_h ep, void *arg);
418
419
433typedef void
434(*ucp_listener_conn_callback_t)(ucp_conn_request_h conn_request, void *arg);
435
436
458
459
475typedef void (*ucp_stream_recv_callback_t)(void *request, ucs_status_t status,
476 size_t length);
477
478
497typedef void (*ucp_stream_recv_nbx_callback_t)(void *request, ucs_status_t status,
498 size_t length, void *user_data);
499
500
520typedef void (*ucp_tag_recv_callback_t)(void *request, ucs_status_t status,
521 ucp_tag_recv_info_t *info);
522
523
545typedef void (*ucp_tag_recv_nbx_callback_t)(void *request, ucs_status_t status,
546 const ucp_tag_recv_info_t *tag_info,
547 void *user_data);
548
549
567typedef void (*ucp_am_recv_data_nbx_callback_t)(void *request,
568 ucs_status_t status,
569 size_t length, void *user_data);
570
571
586 UCP_WAKEUP_RMA = UCS_BIT(0),
587 UCP_WAKEUP_AMO = UCS_BIT(1),
588 UCP_WAKEUP_TAG_SEND = UCS_BIT(2),
589 UCP_WAKEUP_TAG_RECV = UCS_BIT(3),
590 UCP_WAKEUP_TX = UCS_BIT(10),
597 UCP_WAKEUP_RX = UCS_BIT(11),
602 UCP_WAKEUP_EDGE = UCS_BIT(16)
607
608
640typedef ucs_status_t (*ucp_am_callback_t)(void *arg, void *data, size_t length,
641 ucp_ep_h reply_ep, unsigned flags);
642
643
697typedef ucs_status_t (*ucp_am_recv_callback_t)(void *arg, const void *header,
698 size_t header_length,
699 void *data, size_t length,
700 const ucp_am_recv_param_t *param);
701
702
792
793
799#define UCP_ENTITY_NAME_MAX 32
800
847typedef struct {
853 const char *transport_name;
854
860 const char *device_name;
861
863
864
873typedef struct {
880
887 unsigned num_entries;
888
896
898
899
900typedef struct ucp_device_local_mem_list *ucp_device_local_mem_list_h;
901typedef struct ucp_device_remote_mem_list *ucp_device_remote_mem_list_h;
902
903#endif
ucp_err_handler_cb_t cb
Definition ucp_def.h:394
void * arg
Definition ucp_def.h:396
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:520
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:567
uint64_t ucp_tag_t
UCP Tag Identifier.
Definition ucp_def.h:284
struct ucp_err_handler ucp_err_handler_t
UCP endpoint error handling context.
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:475
struct ucp_recv_desc * ucp_tag_message_h
UCP Message descriptor.
Definition ucp_def.h:295
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:545
void(* ucp_send_callback_t)(void *request, ucs_status_t status)
Completion callback for non-blocking sends.
Definition ucp_def.h:346
uint64_t ucp_datatype_t
UCP Datatype Identifier.
Definition ucp_def.h:305
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: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:384
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:497
UCP endpoint error handling context.
Definition ucp_def.h:393
struct ucp_config ucp_config_t
UCP configuration descriptor.
Definition ucp_def.h:77
void(* ucp_request_init_callback_t)(void *request)
Request initialization callback.
Definition ucp_def.h:316
struct ucp_context * ucp_context_h
UCP Application Context.
Definition ucp_def.h:60
void(* ucp_request_cleanup_callback_t)(void *request)
Request cleanup callback.
Definition ucp_def.h:328
UCP receive information descriptor.
Definition ucp.h:1831
size_t entry_size
Definition ucp_def.h:895
const char * transport_name
Definition ucp_def.h:853
unsigned num_entries
Definition ucp_def.h:887
const char * name
Definition ucp_def.h:780
ucp_transport_entry_t * entries
Definition ucp_def.h:879
ucp_err_handling_mode_t err_mode
Definition ucp_def.h:731
const char * device_name
Definition ucp_def.h:860
const ucp_address_t * address
Definition ucp_def.h:725
unsigned flags
Definition ucp_def.h:751
ucp_conn_request_h conn_request
Definition ucp_def.h:770
ucs_sock_addr_t sockaddr
Definition ucp_def.h:760
ucp_err_handler_t err_handler
Definition ucp_def.h:736
uint64_t field_mask
Definition ucp_def.h:717
ucs_sock_addr_t local_sockaddr
Definition ucp_def.h:789
void * user_data
Definition ucp_def.h:742
struct ucp_conn_request * ucp_conn_request_h
UCP connection request.
Definition ucp_def.h:102
ucp_err_handling_mode_t
Error handling mode for the UCP endpoint.
Definition ucp_def.h:121
struct ucp_ep * ucp_ep_h
UCP Endpoint.
Definition ucp_def.h:92
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:697
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:640
struct ucp_ep_params ucp_ep_params_t
Tuning parameters for the UCP endpoint.
@ UCP_ERR_HANDLING_MODE_NONE
Definition ucp_def.h:127
@ UCP_ERR_HANDLING_MODE_FAILOVER
Definition ucp_def.h:143
@ UCP_ERR_HANDLING_MODE_PEER
Definition ucp_def.h:135
Tuning parameters for the UCP endpoint.
Definition ucp_def.h:710
The ucp_transports_t and ucp_transport_entry_t structures are used when ucp_ep_query is called to ret...
Definition ucp_def.h:847
Structure containing an array of transport layers and device names used by an endpoint.
Definition ucp_def.h:873
void * address
Definition ucp_def.h:223
uint64_t field_mask
Definition ucp_def.h:218
ucs_memory_type_t mem_type
Definition ucp_def.h:233
size_t length
Definition ucp_def.h:228
struct ucp_mem_attr ucp_mem_attr_t
Attributes of the UCP Memory handle, filled by ucp_mem_query function.
ucp_mem_attr_field
UCP Memory handle attributes field mask.
Definition ucp_def.h:244
struct ucp_mem * ucp_mem_h
UCP Memory handle.
Definition ucp_def.h:194
struct ucp_rkey * ucp_rkey_h
UCP Remote memory handle.
Definition ucp_def.h:157
@ UCP_MEM_ATTR_FIELD_ADDRESS
Definition ucp_def.h:245
@ UCP_MEM_ATTR_FIELD_MEM_TYPE
Definition ucp_def.h:247
@ UCP_MEM_ATTR_FIELD_LENGTH
Definition ucp_def.h:246
Attributes of the UCP Memory handle, filled by ucp_mem_query function.
Definition ucp_def.h:212
ucp_listener_conn_callback_t cb
Definition ucp_def.h:454
void * arg
Definition ucp_def.h:455
enum ucp_wakeup_event_types ucp_wakeup_event_t
UCP worker wakeup events mask.
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:434
struct ucp_worker * ucp_worker_h
UCP Worker.
Definition ucp_def.h:273
ucp_wakeup_event_types
UCP worker wakeup events mask.
Definition ucp_def.h:585
struct ucp_address ucp_address_t
UCP worker address.
Definition ucp_def.h:112
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:417
struct ucp_listener * ucp_listener_h
UCP listen handle.
Definition ucp_def.h:204
struct ucp_listener_conn_handler ucp_listener_conn_handler_t
UCP callback to handle the connection request in a client-server connection establishment flow.
@ UCP_WAKEUP_TAG_SEND
Definition ucp_def.h:588
@ UCP_WAKEUP_TAG_RECV
Definition ucp_def.h:589
@ UCP_WAKEUP_RX
Definition ucp_def.h:597
@ UCP_WAKEUP_AMO
Definition ucp_def.h:587
@ UCP_WAKEUP_EDGE
Definition ucp_def.h:602
@ UCP_WAKEUP_RMA
Definition ucp_def.h:586
@ UCP_WAKEUP_TX
Definition ucp_def.h:590
Operation parameters provided in ucp_am_recv_callback_t callback.
Definition ucp.h:2070
UCP callback to handle the connection request in a client-server connection establishment flow.
Definition ucp_def.h:453
enum ucs_memory_type ucs_memory_type_t
Memory types.
ucs_status_t
Status codes.
Definition status.h:45
Definition types.h:151