55 DOCA_LOG_ERR(
"Entered IB device name exceeding the maximum size of %d",
146 const char *
path = (
char *)param;
171 const char *
path = (
char *)param;
195 const char *
path = (
char *)param;
219 const int gid_index = *(uint32_t *)param;
222 DOCA_LOG_ERR(
"GID index for DOCA RDMA must be non-negative");
234 struct doca_argp_param *send_string_param;
247 "String to send (optional). If not provided then \"" DEFAULT_STRING
248 "\" will be chosen");
262 struct doca_argp_param *read_string_param;
275 "String to read (optional). If not provided then \"" DEFAULT_STRING
276 "\" will be chosen");
290 struct doca_argp_param *write_string_param;
303 "String to write (optional). If not provided then \"" DEFAULT_STRING
304 "\" will be chosen");
340 struct doca_argp_param *num_connections_param;
355 "num_connections for DOCA RDMA (optional), max connections number must be <= ",
379 const char *
type = (
char *)param;
381 if (strcasecmp(
type,
"RC") == 0)
383 else if (strcasecmp(
type,
"DC") == 0)
386 DOCA_LOG_ERR(
"Entered wrong RDMA transport_type, the accepted RDMA transport_type are: "
422 const int cm_port = *(uint32_t *)param;
425 DOCA_LOG_ERR(
"Server listening port number for DOCA RDMA-CM must be non-negative");
444 const char *
addr = (
char *)param;
468 const char *
type = (
char *)param;
476 if (strcasecmp(
type,
"ip4") == 0 || strcasecmp(
type,
"ipv4") == 0)
478 else if (strcasecmp(
type,
"ip6") == 0 || strcasecmp(
type,
"ipv6") == 0)
480 else if (strcasecmp(
type,
"gid") == 0)
483 DOCA_LOG_ERR(
"Entered wrong server address type, the accepted server address type are: "
484 "ip4, ipv4, IP4, IPv4, IPV4, "
485 "ip6, ipv6, IP6, IPv6, IPV6, "
501 struct doca_argp_param *use_rdma_cm_param;
502 struct doca_argp_param *cm_port_param;
503 struct doca_argp_param *cm_addr_param;
504 struct doca_argp_param *cm_addr_type_param;
583 struct doca_argp_param *device_param;
584 struct doca_argp_param *local_desc_path_param;
585 struct doca_argp_param *remote_desc_path_param;
586 struct doca_argp_param *remote_resource_desc_path;
587 struct doca_argp_param *gid_index_param;
588 struct doca_argp_param *transport_type_param;
618 local_desc_path_param,
619 "Local descriptor file path that includes the local connection descriptor, to be copied to the remote program, "
620 "used only when not using the use-rdma-cm flag");
638 remote_desc_path_param,
639 "Remote descriptor file path that includes the remote connection descriptor, to be copied from the remote program, "
640 "used only when not using the use-rdma-cm flag");
658 remote_resource_desc_path,
659 "Remote descriptor file path that includes the remote mmap connection descriptor, to be copied from the remote program, "
660 "used only when not using the use-rdma-cm flag");
695 transport_type_param,
696 "transport_type for DOCA RDMA (RC or DC, optional), only useful for single connection out-of-band RDMA for now");
718 struct doca_devinfo **dev_list;
719 uint32_t nb_devs = 0;
731 for (i = 0; i < nb_devs; i++) {
750 if (*doca_device ==
NULL) {
759 const uint32_t mmap_permissions,
760 const uint32_t rdma_permissions,
772 if (((
cfg->num_connections > 1) || (
cfg->use_rdma_cm ==
true)) &&
775 "Failed to allocate RDMA resources: due to DOCA_RDMA_TRANSPORT_TYPE_DC is only supported for out-of-band single connection case for now");
808 goto destroy_doca_mmap;
823 goto destroy_doca_rdma;
830 goto destroy_doca_rdma;
834 if (
cfg->is_gid_index_set) {
839 goto destroy_doca_rdma;
847 goto destroy_doca_rdma;
854 goto destroy_doca_rdma;
860 goto destroy_doca_rdma;
906 fp = fopen(file_path,
"r");
909 res = unlink(file_path);
933 cfg->local_connection_desc_path,
941 cfg->remote_connection_desc_path,
949 cfg->remote_resource_desc_path,
977 DOCA_LOG_ERR(
"Failed to destroy DOCA local mmap descriptor mmap: %s",
985 DOCA_LOG_ERR(
"Failed to destroy DOCA remote mmap descriptor mmap: %s",
993 DOCA_LOG_ERR(
"Failed to destroy DOCA local sync_event descriptor mmap: %s",
1093 fp = fopen(file_path,
"r");
1095 DOCA_LOG_ERR(
"File %s already exists. Please delete it prior to running the sample", file_path);
1100 fp = fopen(file_path,
"wb");
1107 if (fwrite(
string, 1, string_len, fp) != string_len) {
1126 fp = fopen(file_path,
"r");
1128 DOCA_LOG_ERR(
"Failed to open the file %s for reading", file_path);
1133 if (fseek(fp, 0, SEEK_END) != 0) {
1139 file_size = ftell(fp);
1140 if (file_size == -1) {
1147 if (fseek(fp, 0, SEEK_SET) != 0) {
1153 *string_len = file_size;
1154 *
string = malloc(file_size);
1155 if (*
string ==
NULL) {
1156 DOCA_LOG_ERR(
"Failed to allocate memory of size %lu", file_size);
1162 if (fread(*
string, 1, file_size, fp) != (
size_t)file_size) {
1180 if (
cfg->use_rdma_cm ==
true) {
1184 if (
cfg->cm_addr[0] !=
'\0') {
1189 DOCA_LOG_ERR(
"Client only support single connection, but input num_connections is [%u]",
1190 cfg->num_connections);
1194 DOCA_LOG_INFO(
"Using Out-Of-Band to setup RDMA connection");
1196 DOCA_LOG_INFO(
"-----------------------------------------------");
1203 DOCA_LOG_INFO(
"-----------------------------------------------");
1209 DOCA_LOG_INFO(
"Server calling doca_rdma_start_listen_to_port");
1212 DOCA_LOG_ERR(
"Server failed to call doca_rdma_start_listen_to_port");
1218 DOCA_LOG_ERR(
"Failed to create rdma cm connection address");
1222 DOCA_LOG_ERR(
"RDMA_CM client must be given a valid server address (ipv4, ipv6 or gid)");
1231 DOCA_LOG_ERR(
"Client failed to call doca_rdma_connect_to_addr");
1252 DOCA_LOG_ERR(
"[%s] cannot disconnect rdma-cm connection: %s",
1263 struct doca_rdma_connection *rdma_connection,
1264 struct doca_mmap *
mmap,
1265 struct doca_buf_inventory *buf_inv,
1271 struct doca_buf *src_buf;
1272 struct doca_rdma_task_send *rdma_send_task;
1274 task_user_data.
ptr = user_data;
1298 struct doca_mmap *
mmap,
1299 struct doca_buf_inventory *buf_inv,
1305 struct doca_buf *dst_buf;
1306 struct doca_rdma_task_receive *rdma_recv_task;
1308 task_user_data.
ptr = user_data;
1327 DOCA_LOG_INFO(
"Negotiation receive task submission completed\n");
1335 struct doca_mmap *recv_descriptor_mmap =
NULL;
1336 void *recv_descriptor =
NULL;
1339 DOCA_LOG_INFO(
"Start to exchange data resource between client and server");
1342 recv_descriptor = malloc(
sizeof(uint8_t) * recv_descriptor_size);
1343 if (recv_descriptor ==
NULL) {
1352 recv_descriptor_size,
1356 goto free_recv_descriptor;
1360 recv_descriptor_mmap,
1363 recv_descriptor_size,
1367 goto destroy_recv_descriptor_mmap;
1380 destroy_recv_descriptor_mmap:
1382 free_recv_descriptor:
1383 free(recv_descriptor);
1390 struct doca_mmap *send_descriptor_mmap =
NULL;
1391 void *send_descriptor =
NULL;
1392 size_t send_descriptor_size = 0;
1394 DOCA_LOG_INFO(
"Start to exchange data resource between client and server");
1432 goto destroy_buf_inv;
1439 send_descriptor_size,
1443 goto destroy_buf_inv;
1452 "Wait till the requester has finished the submission of the receive task for negotiation and press enter");
1457 send_descriptor_mmap,
1460 send_descriptor_size,
1464 goto destroy_send_descriptor_mmap;
1469 destroy_send_descriptor_mmap:
1481 (void)task_user_data;
1482 unsigned long int dst_buf_data_len = 0;
1486 bool cm_error_occur =
false;
1491 cm_error_occur =
true;
1496 if (cm_error_occur ==
false) {
1504 cm_error_occur =
true;
1506 if (cm_error_occur ==
true)
1514 (void)task_user_data;
1529 (void)task_user_data;
1545 (void)task_user_data;
1569 connection_user_data.ptr = ctx_user_data.
ptr;
1581 (void)connection_user_data;
1608 uint16_t connection_index = (uint16_t)(connection_user_data.
u64);
1626 (void)connection_user_data;
1652 cfg->is_gid_index_set =
false;
1653 cfg->num_connections = 1;
1657 cfg->use_rdma_cm =
false;
1666 const uint32_t mmap_permissions,
1668 size_t data_buffer_size,
1669 struct doca_dev *dev)
1721 bool need_send_task,
1722 bool need_recv_task)
1737 if (need_recv_task ==
true) {
1747 if (need_send_task ==
true) {
1776 while (enter !=
'\r' && enter !=
'\n')
char path[MAX_PATH_LEN+1]
doca_error_t destroy_rdma_resources(struct rdma_resources *resources)
void rdma_cm_connect_established_cb(struct doca_rdma_connection *connection, union doca_data connection_user_data, union doca_data ctx_user_data)
void rdma_cm_disconnect_cb(struct doca_rdma_connection *connection, union doca_data connection_user_data, union doca_data ctx_user_data)
void rdma_cm_connect_failure_cb(struct doca_rdma_connection *connection, union doca_data connection_user_data, union doca_data ctx_user_data)
void rdma_cm_connect_request_cb(struct doca_rdma_connection *connection, union doca_data ctx_user_data)
DOCA_LOG_REGISTER(GPURDMA::COMMON)
#define SERVER_ADDR_TYPE_LEN
static doca_error_t destroy_rdma_cm_resources(struct rdma_resources *resources)
void send_task_error_cb(struct doca_rdma_task_send *rdma_send_task, union doca_data task_user_data, union doca_data ctx_user_data)
static doca_error_t read_string_callback(void *param, void *config)
static doca_error_t num_connections_param_callback(void *param, void *config)
void receive_task_error_cb(struct doca_rdma_task_receive *rdma_recv_task, union doca_data task_user_data, union doca_data ctx_user_data)
void wait_for_enter(void)
doca_error_t register_rdma_num_connections_param(void)
static doca_error_t remote_descriptor_path_callback(void *param, void *config)
static doca_error_t transport_type_param_callback(void *param, void *config)
doca_error_t rdma_responder_send_data_to_rdma_requester(struct rdma_resources *resources)
doca_error_t delete_file(const char *file_path)
doca_error_t write_file(const char *file_path, const char *string, size_t string_len)
static doca_error_t register_rdma_cm_params(void)
doca_error_t rdma_cm_connect(struct rdma_resources *resources)
doca_error_t allocate_rdma_resources(struct rdma_config *cfg, const uint32_t mmap_permissions, const uint32_t rdma_permissions, task_check func, struct rdma_resources *resources)
static doca_error_t mmap_descriptor_path_callback(void *param, void *config)
void receive_task_completion_cb(struct doca_rdma_task_receive *task, union doca_data task_user_data, union doca_data ctx_user_data)
doca_error_t send_msg(struct doca_rdma *rdma, struct doca_rdma_connection *rdma_connection, struct doca_mmap *mmap, struct doca_buf_inventory *buf_inv, void *msg, uint32_t msg_len, void *user_data)
static doca_error_t write_string_callback(void *param, void *config)
doca_error_t config_rdma_cm_callback_and_negotiation_task(struct rdma_resources *resources, bool need_send_task, bool need_recv_task)
static doca_error_t cm_addr_type_param_callback(void *param, void *config)
static doca_error_t local_descriptor_path_callback(void *param, void *config)
doca_error_t register_rdma_write_string_param(void)
doca_error_t recv_msg(struct doca_rdma *rdma, struct doca_mmap *mmap, struct doca_buf_inventory *buf_inv, void *msg, uint32_t msg_len, void *user_data)
static doca_error_t device_address_callback(void *param, void *config)
doca_error_t register_rdma_read_string_param(void)
doca_error_t rdma_cm_disconnect(struct rdma_resources *resources)
static doca_error_t gid_index_param_callback(void *param, void *config)
static doca_error_t use_rdma_cm_param_callback(void *param, void *config)
static doca_error_t send_string_callback(void *param, void *config)
doca_error_t rdma_requester_recv_data_from_rdma_responder(struct rdma_resources *resources)
static doca_error_t cm_addr_param_callback(void *param, void *config)
static doca_error_t clean_up_files(struct rdma_config *cfg)
void send_task_completion_cb(struct doca_rdma_task_send *task, union doca_data task_user_data, union doca_data ctx_user_data)
doca_error_t register_rdma_send_string_param(void)
static doca_error_t cm_port_param_callback(void *param, void *config)
doca_error_t read_file(const char *file_path, char **string, size_t *string_len)
doca_error_t set_default_config_value(struct rdma_config *cfg)
doca_error_t create_local_mmap(struct doca_mmap **mmap, const uint32_t mmap_permissions, void *data_buffer, size_t data_buffer_size, struct doca_dev *dev)
static doca_error_t open_doca_device(const char *device_name, task_check func, struct doca_dev **doca_device)
doca_error_t register_rdma_common_params(void)
#define DEFAULT_LOCAL_CONNECTION_DESC_PATH
#define MAX_NUM_CONNECTIONS
#define DEFAULT_RDMA_CM_PORT
doca_error_t(* task_check)(const struct doca_devinfo *)
#define INVENTORY_NUM_INITIAL_ELEMENTS
#define NUM_NEGOTIATION_RDMA_TASKS
#define DEFAULT_REMOTE_CONNECTION_DESC_PATH
#define DEFAULT_REMOTE_RESOURCE_CONNECTION_DESC_PATH
if(bitoffset % 64+bitlength > 64) result|
struct rdma_resources resources
DOCA_EXPERIMENTAL void doca_argp_param_set_description(struct doca_argp_param *param, const char *description)
Set the description of the program param, used during program usage.
DOCA_EXPERIMENTAL void doca_argp_param_set_long_name(struct doca_argp_param *param, const char *name)
Set the long name of the program param.
DOCA_EXPERIMENTAL void doca_argp_param_set_arguments(struct doca_argp_param *param, const char *arguments)
Set the description of the expected arguments of the program param, used during program usage.
DOCA_EXPERIMENTAL void doca_argp_param_set_callback(struct doca_argp_param *param, doca_argp_param_cb_t callback)
Set the callback function of the program param.
DOCA_EXPERIMENTAL void doca_argp_param_set_mandatory(struct doca_argp_param *param)
Mark the program param as mandatory.
DOCA_EXPERIMENTAL doca_error_t doca_argp_param_create(struct doca_argp_param **param)
Create new program param.
DOCA_EXPERIMENTAL void doca_argp_param_set_type(struct doca_argp_param *param, enum doca_argp_type type)
Set the type of the param arguments.
DOCA_EXPERIMENTAL void doca_argp_param_set_short_name(struct doca_argp_param *param, const char *name)
Set the short name of the program param.
DOCA_EXPERIMENTAL doca_error_t doca_argp_register_param(struct doca_argp_param *input_param)
Register a program flag.
DOCA_STABLE doca_error_t doca_buf_inventory_destroy(struct doca_buf_inventory *inventory)
Destroy buffer inventory structure.
static doca_error_t doca_buf_inventory_buf_get_by_addr(struct doca_buf_inventory *inventory, struct doca_mmap *mmap, void *addr, size_t len, struct doca_buf **buf)
Allocate single element from buffer inventory and point it to the buffer defined by addr & len argume...
static doca_error_t doca_buf_inventory_buf_get_by_data(struct doca_buf_inventory *inventory, struct doca_mmap *mmap, void *data, size_t data_len, struct doca_buf **buf)
Allocate single element from buffer inventory and point it to the buffer defined by data & data_len a...
DOCA_STABLE doca_error_t doca_buf_inventory_start(struct doca_buf_inventory *inventory)
Start element retrieval from inventory.
DOCA_STABLE doca_error_t doca_buf_inventory_create(size_t num_elements, struct doca_buf_inventory **inventory)
Allocates buffer inventory with default/unset attributes.
DOCA_STABLE doca_error_t doca_buf_dec_refcount(struct doca_buf *buf, uint16_t *refcount)
Decrease the object reference count by 1, if 0 reached, return the element back to the inventory.
DOCA_STABLE doca_error_t doca_buf_get_data_len(const struct doca_buf *buf, size_t *data_len)
Get buffer's data length.
DOCA_STABLE doca_error_t doca_ctx_stop(struct doca_ctx *ctx)
Stops the context allowing reconfiguration.
DOCA_STABLE doca_error_t doca_devinfo_create_list(struct doca_devinfo ***dev_list, uint32_t *nb_devs)
Creates list of all available local devices.
DOCA_STABLE doca_error_t doca_devinfo_get_ibdev_name(const struct doca_devinfo *devinfo, char *ibdev_name, uint32_t size)
Get the name of the IB device represented by a DOCA devinfo.
#define DOCA_DEVINFO_IBDEV_NAME_SIZE
Buffer size to hold Infiniband/RoCE device name. Including a null terminator.
DOCA_STABLE doca_error_t doca_devinfo_destroy_list(struct doca_devinfo **dev_list)
Destroy list of local device info structures.
DOCA_STABLE doca_error_t doca_dev_open(struct doca_devinfo *devinfo, struct doca_dev **dev)
Initialize local device for use.
DOCA_STABLE doca_error_t doca_dev_close(struct doca_dev *dev)
Destroy allocated local device instance.
#define DOCA_ERROR_PROPAGATE(r, t)
Save the first encountered doca_error_t.
#define DOCA_IS_ERROR(r)
Compiler optimized macro to check if we have an error.
enum doca_error doca_error_t
DOCA API return codes.
DOCA_STABLE const char * doca_error_get_name(doca_error_t error)
Returns the string representation of an error code name.
DOCA_STABLE const char * doca_error_get_descr(doca_error_t error)
Returns the description string of an error code.
@ DOCA_ERROR_CONNECTION_ABORTED
@ DOCA_ERROR_INVALID_VALUE
#define DOCA_LOG_ERR(format,...)
Generates an ERROR application log message.
#define DOCA_LOG_INFO(format,...)
Generates an INFO application log message.
DOCA_STABLE doca_error_t doca_mmap_set_memrange(struct doca_mmap *mmap, void *addr, size_t len)
Set the memory range of DOCA memory map.
DOCA_STABLE doca_error_t doca_mmap_destroy(struct doca_mmap *mmap)
Destroy DOCA Memory Map structure.
DOCA_STABLE doca_error_t doca_mmap_create(struct doca_mmap **mmap)
Allocates zero size memory map object with default/unset attributes.
DOCA_STABLE doca_error_t doca_mmap_set_permissions(struct doca_mmap *mmap, uint32_t access_mask)
Set access flags of the registered memory.
DOCA_STABLE doca_error_t doca_mmap_start(struct doca_mmap *mmap)
Start DOCA Memory Map.
DOCA_STABLE doca_error_t doca_mmap_stop(struct doca_mmap *mmap)
Stop DOCA Memory Map.
DOCA_STABLE doca_error_t doca_mmap_add_dev(struct doca_mmap *mmap, struct doca_dev *dev)
Register DOCA memory map on a given device.
DOCA_STABLE doca_error_t doca_mmap_export_rdma(struct doca_mmap *mmap, const struct doca_dev *dev, const void **export_desc, size_t *export_desc_len)
Compose memory map representation for later import with doca_mmap_create_from_export() for one of the...
DOCA_STABLE doca_error_t doca_pe_destroy(struct doca_pe *pe)
Destroy doca progress engine.
DOCA_STABLE doca_error_t doca_task_get_status(const struct doca_task *task)
Get task status.
DOCA_STABLE doca_error_t doca_pe_connect_ctx(struct doca_pe *pe, struct doca_ctx *ctx)
This method connects a context to a progress engine.
DOCA_STABLE doca_error_t doca_task_submit(struct doca_task *task)
Submit a task to a progress engine.
DOCA_STABLE doca_error_t doca_pe_create(struct doca_pe **pe)
Creates DOCA progress engine.
DOCA_STABLE void doca_task_free(struct doca_task *task)
Free a task back to where it was allocated from.
DOCA_EXPERIMENTAL struct doca_buf * doca_rdma_task_receive_get_dst_buf(const struct doca_rdma_task_receive *task)
This method gets the destination buffer of a receive task.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_set_transport_type(struct doca_rdma *rdma, enum doca_rdma_transport_type transport_type)
Set transport type for doca_rdma. The value can be queried using doca_rdma_get_transport_type()....
DOCA_EXPERIMENTAL doca_error_t doca_rdma_task_send_set_conf(struct doca_rdma *rdma, doca_rdma_task_send_completion_cb_t successful_task_completion_cb, doca_rdma_task_send_completion_cb_t error_task_completion_cb, uint32_t num_tasks)
This method sets the send tasks configuration.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_destroy(struct doca_rdma *rdma)
Destroy a DOCA RDMA instance.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_connect_to_addr(struct doca_rdma *rdma, struct doca_rdma_addr *addr, union doca_data connection_user_data)
Connect to a remote doca_rdma peer listening for a connection. Can be called when the ctx is in DOCA_...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_addr_destroy(struct doca_rdma_addr *addr)
Destroy connection address object for doca_rdma.
DOCA_EXPERIMENTAL const struct doca_buf * doca_rdma_task_send_get_src_buf(const struct doca_rdma_task_send *task)
This method gets the source buffer of a send task.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_set_connection_state_callbacks(struct doca_rdma *rdma, doca_rdma_connection_request_cb_t doca_rdma_connect_request_cb, doca_rdma_connection_established_cb_t doca_rdma_connect_established_cb, doca_rdma_connection_failure_cb_t doca_rdma_connect_failure_cb, doca_rdma_connection_disconnection_cb_t doca_rdma_disconnect_cb)
This method set the function executed on RDMA connection events.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_set_permissions(struct doca_rdma *rdma, uint32_t permissions)
Set rdma permissions for doca_rdma. The value can be queried using doca_rdma_get_permissions()....
DOCA_EXPERIMENTAL struct doca_task * doca_rdma_task_receive_as_task(struct doca_rdma_task_receive *task)
This method converts a receive task to a doca_task.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_task_receive_set_conf(struct doca_rdma *rdma, doca_rdma_task_receive_completion_cb_t successful_task_completion_cb, doca_rdma_task_receive_completion_cb_t error_task_completion_cb, uint32_t num_tasks)
This method sets the receive tasks configuration.
DOCA_EXPERIMENTAL struct doca_task * doca_rdma_task_send_as_task(struct doca_rdma_task_send *task)
This method converts a send task to a doca_task.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_task_receive_allocate_init(struct doca_rdma *rdma, struct doca_buf *dst_buf, union doca_data user_data, struct doca_rdma_task_receive **task)
This method allocates and initializes a receive task.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_addr_create(enum doca_rdma_addr_type addr_type, const char *address, uint16_t port, struct doca_rdma_addr **addr)
Set connection address object for doca_rdma. The object can be queried using doca_rdma_connection_get...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_set_max_num_connections(struct doca_rdma *rdma, uint16_t max_num_connections)
Set the maximum number of connections property for a context. The value can be queried using doca_rdm...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_start_listen_to_port(struct doca_rdma *rdma, uint16_t port)
Start listening for a connection from a remote doca_rdma peer. Can be called when the ctx is in DOCA_...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_connection_disconnect(struct doca_rdma_connection *rdma_connection)
Finalize a connection with a remote doca_rdma peer. Can be called when the ctx is in DOCA_CTX_STATE_R...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_set_gid_index(struct doca_rdma *rdma, uint32_t gid_index)
Set GID index for doca_rdma. The value can be queried using doca_rdma_get_gid_index()....
DOCA_EXPERIMENTAL doca_error_t doca_rdma_task_send_allocate_init(struct doca_rdma *rdma, struct doca_rdma_connection *rdma_connection, const struct doca_buf *src_buf, union doca_data user_data, struct doca_rdma_task_send **task)
This method allocates and initializes a send task.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_connection_accept(struct doca_rdma_connection *rdma_connection, void *private_data, uint8_t private_data_len)
Accept an incoming connection request from remote doca_rdma peer. Can be called when the ctx is in DO...
DOCA_EXPERIMENTAL struct doca_ctx * doca_rdma_as_ctx(struct doca_rdma *rdma)
Convert doca_rdma instance into a generalized context for use with doca core objects.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_create(struct doca_dev *dev, struct doca_rdma **rdma)
Create a DOCA RDMA instance.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_connection_set_user_data(struct doca_rdma_connection *rdma_connection, union doca_data connection_user_data)
Set user data to include in each connection.
@ DOCA_RDMA_ADDR_TYPE_IPv6
@ DOCA_RDMA_ADDR_TYPE_IPv4
@ DOCA_RDMA_ADDR_TYPE_GID
@ DOCA_RDMA_TRANSPORT_TYPE_RC
@ DOCA_RDMA_TRANSPORT_TYPE_DC
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_export_to_remote_net(struct doca_sync_event *event, const uint8_t **data, size_t *sz)
Export Sync Event to be shared with a remote peer.
@ DOCA_ACCESS_FLAG_LOCAL_READ_WRITE
const struct ip_frag_config * cfg
#define MAX_USER_ARG_SIZE
enum doca_rdma_addr_type cm_addr_type
enum doca_rdma_transport_type transport_type
char device_name[DOCA_DEVINFO_IBDEV_NAME_SIZE]
char send_string[MAX_ARG_SIZE]
char cm_addr[SERVER_ADDR_LEN+1]
char remote_resource_desc_path[MAX_ARG_SIZE]
char local_connection_desc_path[MAX_ARG_SIZE]
char read_string[MAX_ARG_SIZE]
char remote_connection_desc_path[MAX_ARG_SIZE]
char write_string[MAX_ARG_SIZE]
struct doca_sync_event * sync_event
doca_error_t first_encountered_error
struct doca_rdma_connection * connection
struct doca_ctx * rdma_ctx
struct doca_mmap * remote_mmap
uint32_t num_connection_established
size_t sync_event_descriptor_size
const void * mmap_descriptor
size_t num_remaining_tasks
prepare_and_submit_task_fn task_fn
bool recv_sync_event_desc
struct doca_mmap * mmap_descriptor_mmap
size_t remote_mmap_descriptor_size
void * remote_mmap_descriptor
void * remote_rdma_conn_descriptor
struct doca_rdma_connection * connections[MAX_NUM_CONNECTIONS]
struct doca_buf * dst_buf
struct doca_rdma_addr * cm_addr
size_t mmap_descriptor_size
struct doca_mmap * sync_event_descriptor_mmap
struct doca_mmap * remote_mmap_descriptor_mmap
struct doca_dev * doca_device
struct doca_buf_inventory * buf_inventory
void * sync_event_descriptor
bool connection_established
Convenience type for representing opaque data.