NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
rdma_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 NVIDIA CORPORATION AND AFFILIATES. All rights reserved.
3  *
4  * Redistribution and use in source and binary forms, with or without modification, are permitted
5  * provided that the following conditions are met:
6  * * Redistributions of source code must retain the above copyright notice, this list of
7  * conditions and the following disclaimer.
8  * * Redistributions in binary form must reproduce the above copyright notice, this list of
9  * conditions and the following disclaimer in the documentation and/or other materials
10  * provided with the distribution.
11  * * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used
12  * to endorse or promote products derived from this software without specific prior written
13  * permission.
14  *
15  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
16  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
17  * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE
18  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
19  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
20  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
21  * STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23  *
24  */
25 
26 #ifndef RDMA_COMMON_H_
27 #define RDMA_COMMON_H_
28 
29 #include <stdbool.h>
30 #include <stddef.h>
31 #include <stdint.h>
32 #include <time.h>
33 #include <unistd.h>
34 
35 #include <doca_buf.h>
36 #include <doca_buf_inventory.h>
37 #include <doca_dev.h>
38 #include <doca_error.h>
39 #include <doca_mmap.h>
40 #include <doca_pe.h>
41 #include <doca_rdma.h>
42 #include <doca_sync_event.h>
43 
44 #include "common.h"
45 
46 #define MEM_RANGE_LEN (4096) /* DOCA mmap memory range length */
47 #define INVENTORY_NUM_INITIAL_ELEMENTS (16) /* Number of DOCA inventory initial elements */
48 #define MAX_USER_ARG_SIZE (256) /* Maximum size of user input argument */
49 #define MAX_ARG_SIZE (MAX_USER_ARG_SIZE + 1) /* Maximum size of input argument */
50 #define DEFAULT_STRING "Hi DOCA RDMA!" /* Default string to use in our samples */
51 /* Default path to save the local connection descriptor that should be passed to the other side */
52 #define DEFAULT_LOCAL_CONNECTION_DESC_PATH "/tmp/local_connection_desc_path.txt"
53 /* Default path to save the remote connection descriptor that should be passed from the other side */
54 #define DEFAULT_REMOTE_CONNECTION_DESC_PATH "/tmp/remote_connection_desc_path.txt"
55 /* Default path to read/save the remote mmap connection descriptor that should be passed to the other side */
56 #define DEFAULT_REMOTE_RESOURCE_CONNECTION_DESC_PATH "/tmp/remote_resource_desc_path.txt"
57 #define NUM_RDMA_TASKS (1) /* Number of RDMA tasks*/
58 #define SLEEP_IN_NANOS (10 * 1000) /* Sample the task every 10 microseconds */
59 #define MAX(a, b) (((a) > (b)) ? (a) : (b))
60 /* Server address length, long enough for converting from ascii to hex and including the ':' symbols */
61 #define SERVER_ADDR_LEN (128)
62 #define SERVER_ADDR_TYPE_LEN (6)
63 #define NUM_NEGOTIATION_RDMA_TASKS (1)
64 #define SERVER_NAME "Server"
65 #define CLIENT_NAME "Client"
66 #define DEFAULT_RDMA_CM_PORT (13579)
67 #define MAX_NUM_CONNECTIONS (8)
68 
69 /* Function to check if a given device is capable of executing some task */
70 typedef doca_error_t (*task_check)(const struct doca_devinfo *);
71 
72 /* Forward declaration */
73 struct rdma_resources;
74 
75 /* Function to call in the rdma-cm callback after peer info exchange finished */
77 
78 struct rdma_config {
79  char device_name[DOCA_DEVINFO_IBDEV_NAME_SIZE]; /* DOCA device name */
80  char send_string[MAX_ARG_SIZE]; /* String to send */
81  char read_string[MAX_ARG_SIZE]; /* String to read */
82  char write_string[MAX_ARG_SIZE]; /* String to write */
83  char local_connection_desc_path[MAX_ARG_SIZE]; /* Path to save the local connection information */
84  char remote_connection_desc_path[MAX_ARG_SIZE]; /* Path to read the remote connection information */
85  char remote_resource_desc_path[MAX_ARG_SIZE]; /* Path to read/save the remote mmap connection information */
86  bool is_gid_index_set; /* Is the set_index parameter passed */
87  uint32_t gid_index; /* GID index for DOCA RDMA */
88  uint32_t num_connections; /* The maximum number of allowed connections, only useful for server for multiple
89  connection samples */
90  enum doca_rdma_transport_type transport_type; /* RC or DC, RC is the default, only useful for single connection
91  out-of-band RDMA for now */
92 
93  /* The following fields are only related to rdma_cm */
94  bool use_rdma_cm; /* Whether test rdma-only or rdma-cm,
95  * Useful for both client and server
96  **/
97  int cm_port; /* RDMA_CM server listening port number,
98  * Useful for both client and server
99  **/
100  char cm_addr[SERVER_ADDR_LEN + 1]; /* RDMA_cm server IPv4/IPv6/GID address,
101  * Only useful for client to do its connection request
102  **/
103  enum doca_rdma_addr_type cm_addr_type; /* RDMA_CM server address type, IPv4, IPv6 or GID,
104  * Only useful for client
105  **/
106 };
107 
108 struct rdma_resources {
109  struct rdma_config *cfg; /* RDMA samples configuration parameters */
110  struct doca_dev *doca_device; /* DOCA device */
111  struct doca_pe *pe; /* DOCA progress engine */
112  struct doca_mmap *mmap; /* DOCA memory map */
113  struct doca_mmap *remote_mmap; /* DOCA remote memory map */
114  struct doca_sync_event *sync_event; /* DOCA sync event */
115  struct doca_sync_event_remote_net *remote_se; /* DOCA remote sync event */
116  char *mmap_memrange; /* DOCA remote memory map memory range */
117  struct doca_buf_inventory *buf_inventory; /* DOCA buffer inventory */
118  const void *mmap_descriptor; /* DOCA memory map descriptor */
119  size_t mmap_descriptor_size; /* DOCA memory map descriptor size */
120  struct doca_rdma *rdma; /* DOCA RDMA instance */
121  struct doca_ctx *rdma_ctx; /* DOCA context to be used with DOCA RDMA */
122  struct doca_buf *src_buf; /* DOCA source buffer */
123  struct doca_buf *dst_buf; /* DOCA destination buffer */
124  const void *rdma_conn_descriptor; /* DOCA RDMA connection descriptor */
125  size_t rdma_conn_descriptor_size; /* DOCA RDMA connection descriptor size */
126  void *remote_rdma_conn_descriptor; /* DOCA RDMA remote connection descriptor */
127  size_t remote_rdma_conn_descriptor_size; /* DOCA RDMA remote connection descriptor size */
128  void *remote_mmap_descriptor; /* DOCA RDMA remote memory map descriptor */
129  size_t remote_mmap_descriptor_size; /* DOCA RDMA remote memory map descriptor size */
130  void *sync_event_descriptor; /* DOCA RDMA remote sync event descriptor */
131  size_t sync_event_descriptor_size; /* DOCA RDMA remote sync event descriptor size */
132  doca_error_t first_encountered_error; /* Result of the first encountered error, if any */
133  bool run_pe_progress; /* Flag whether to keep progress the PE */
134  size_t num_remaining_tasks; /* Number of remaining tasks to submit */
135 
136  /* The following cmdline args are only related to rdma_cm */
137  struct doca_rdma_addr *cm_addr; /* Server address to connect by a client */
138  struct doca_rdma_connection *connections[MAX_NUM_CONNECTIONS]; /* The RDMA_CM connection instance */
139  bool connection_established[MAX_NUM_CONNECTIONS]; /* Indication whether the corresponding connection have been
140  estableshed */
141  uint32_t num_connection_established; /* Indicate how many connections has been established */
142  struct doca_mmap *mmap_descriptor_mmap; /* Used to send local mmap descriptor to remote peer */
143  struct doca_mmap *remote_mmap_descriptor_mmap; /* Used to receive remote peer mmap descriptor */
144  struct doca_mmap *sync_event_descriptor_mmap; /* Used to send and receive sync_event descriptor */
145  bool recv_sync_event_desc; /* If true, indicate a remote sync event should be received or otherwise a remote
146  mmap */
147  const char *self_name; /* Client or Server */
148  bool is_client; /* Client or Server */
149  bool is_requester; /* Responder or requester */
150  prepare_and_submit_task_fn task_fn; /* Function to execute in rdma_cm callback when peer info exchange finished
151  */
152  bool require_remote_mmap; /* Indicate whether need remote mmap information, for example for
153  rdma_task_read/write */
154 };
155 
156 /*
157  * Allocate DOCA RDMA resources
158  *
159  * @cfg [in]: Configuration parameters
160  * @mmap_permissions [in]: Access flags for DOCA mmap
161  * @rdma_permissions [in]: Access permission flags for DOCA RDMA
162  * @func [in]: Function to check if a given device is capable of executing some task
163  * @resources [in/out]: DOCA RDMA resources to allocate
164  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
165  */
167  const uint32_t mmap_permissions,
168  const uint32_t rdma_permissions,
169  task_check func,
170  struct rdma_resources *resources);
171 
172 /*
173  * Destroy DOCA RDMA resources
174  *
175  * @resources [in]: DOCA RDMA resources to destroy
176  * @cfg [in]: Configuration parameters
177  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
178  */
180 
181 /*
182  * Register the common command line parameters for the sample
183  *
184  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
185  */
187 
188 /*
189  * Register ARGP send string parameter
190  *
191  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
192  */
194 
195 /*
196  * Register ARGP read string parameter
197  *
198  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
199  */
201 
202 /*
203  * Register ARGP write string parameter
204  *
205  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
206  */
208 
209 /*
210  * Register ARGP max_num_connections parameter
211  *
212  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
213  */
215 
216 /*
217  * Write the string on a file
218  *
219  * @file_path [in]: The path of the file
220  * @string [in]: The string to write
221  * @string_len [in]: The length of the string
222  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
223  */
224 doca_error_t write_file(const char *file_path, const char *string, size_t string_len);
225 
226 /*
227  * Read a string from a file
228  *
229  * @file_path [in]: The path of the file we want to read
230  * @string [out]: The string we read
231  * @string_len [out]: The length of the string we read
232  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
233  */
234 doca_error_t read_file(const char *file_path, char **string, size_t *string_len);
235 
236 /*
237  * Delete file if exists
238  *
239  * @file_path [in]: The path of the file we want to delete
240  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
241  */
242 doca_error_t delete_file(const char *file_path);
243 
244 /*
245  * Using RDMA-CM to start a connection between RDMA server and client
246  *
247  * @resources [in]: The resource context for the rdma-cm connection
248  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
249  */
251 
252 /*
253  * Cut-off the RDMA-CM connection
254  *
255  * @resources [in]: The resource context for the rdma-cm connection
256  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
257  */
259 
260 /*
261  * Send a message to the peer using the RDMA send task, used in negotiation for peers
262  *
263  * @rdma [in]: The doca_rdma instance
264  * @rdma_connection [in]: The doca_rdma connection
265  * @mmap [in]: The doca_mmap instance of the message to be send
266  * @buf_inv [in]: The doca_buf_inventory instance for the doca_buf allocation
267  * @msg [in]: The message address
268  * @msg_len [in]: The message byte length
269  * @user_data [in]: The doca_data instance to be embedded into the doca_rdma_task_send
270  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
271  */
272 doca_error_t send_msg(struct doca_rdma *rdma,
273  struct doca_rdma_connection *rdma_connection,
274  struct doca_mmap *mmap,
275  struct doca_buf_inventory *buf_inv,
276  void *msg,
277  uint32_t msg_len,
278  void *user_data);
279 
280 /*
281  * Receive a message from the peer using the RDMA receive task, used in negotiation for peers
282  *
283  * @rdma [in]: The doca_rdma instance
284  * @mmap [in]: The doca_mmap instance of the message buffer to be used for storing incoming message
285  * @buf_inv [in]: The doca_buf_inventory instance for the doca_buf allocation
286  * @msg [in]: The message buffer address
287  * @msg_len [in]: The message buffer byte length
288  * @user_data [in]: The doca_data instance to be embedded into the doca_rdma_task_receive
289  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
290  */
291 doca_error_t recv_msg(struct doca_rdma *rdma,
292  struct doca_mmap *mmap,
293  struct doca_buf_inventory *buf_inv,
294  void *msg,
295  uint32_t msg_len,
296  void *user_data);
297 
298 /*
299  * Callback for the doca_rdma receive task successful completion used in recv_msg()
300  *
301  * @task [in]: The doca_rdma receive task
302  * @task_user_data [in]: The preset user_data for this task
303  * @ctx_user_data [in]: The preset ctx_data for this task
304  */
305 void receive_task_completion_cb(struct doca_rdma_task_receive *task,
306  union doca_data task_user_data,
307  union doca_data ctx_user_data);
308 
309 /*
310  * Callback for the doca_rdma receive task unsuccessful completion used in recv_msg()
311  *
312  * @task [in]: The doca_rdma receive task
313  * @task_user_data [in]: The preset user_data for this task
314  * @ctx_user_data [in]: The preset ctx_data for this task
315  */
316 void receive_task_error_cb(struct doca_rdma_task_receive *task,
317  union doca_data task_user_data,
318  union doca_data ctx_user_data);
319 
320 /*
321  * Callback for the doca_rdma send task successful completion used in send_msg()
322  *
323  * @task [in]: The doca_rdma receive task
324  * @task_user_data [in]: The preset user_data for this task
325  * @ctx_user_data [in]: The preset ctx_data for this task
326  */
327 void send_task_completion_cb(struct doca_rdma_task_send *task,
328  union doca_data task_user_data,
329  union doca_data ctx_user_data);
330 
331 /*
332  * Callback for the doca_rdma send task unsuccessful completion used in send_msg()
333  *
334  * @task [in]: The doca_rdma receive task
335  * @task_user_data [in]: The preset user_data for this task
336  * @ctx_user_data [in]: The preset ctx_data for this task
337  */
338 void send_task_error_cb(struct doca_rdma_task_send *task,
339  union doca_data task_user_data,
340  union doca_data ctx_user_data);
341 
342 /*
343  * Callback for the rdma_cm server receives the connect request from a client
344  *
345  * @connection [in]: The rdma_cm connection instance
346  * @ctx_user_data [in]: The preset ctx_data for this connection
347  */
348 void rdma_cm_connect_request_cb(struct doca_rdma_connection *connection, union doca_data ctx_user_data);
349 
350 /*
351  * Callback for the rdma_cm server accepts the connect request from a client
352  *
353  * @connection [in]: The rdma_cm connection instance
354  * @connection_user_data [in]: The preset user_data for this connection
355  * @ctx_user_data [in]: The preset ctx_data for this connection
356  */
357 void rdma_cm_connect_established_cb(struct doca_rdma_connection *connection,
358  union doca_data connection_user_data,
359  union doca_data ctx_user_data);
360 
361 /*
362  * Callback for the rdma_cm connection setup fails
363  *
364  * @connection [in]: The rdma_cm connection instance
365  * @connection_user_data [in]: The preset user_data for this connection
366  * @ctx_user_data [in]: The preset ctx_data for this connection
367  */
368 void rdma_cm_connect_failure_cb(struct doca_rdma_connection *connection,
369  union doca_data connection_user_data,
370  union doca_data ctx_user_data);
371 
372 /*
373  * Callback for the rdma_cm disconnection
374  *
375  * @connection [in]: The rdma_cm connection instance
376  * @connection_user_data [in]: The preset user_data for this connection
377  * @ctx_user_data [in]: The preset ctx_data for this connection
378  */
379 void rdma_cm_disconnect_cb(struct doca_rdma_connection *connection,
380  union doca_data connection_user_data,
381  union doca_data ctx_user_data);
382 
383 /*
384  * Set the default values (that not necessary specified in cmdline input) for test config
385  *
386  * @cfg [in]: The test configuration instance
387  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
388  */
390 
391 /*
392  * A wrapper for creating local mmap, used for negotiation between peers
393  *
394  * @mmap [in]: The mmap to be created
395  * @mmap_permissions [in]: Access flags for DOCA mmap
396  * @data_buffer [in]: The buffer address for this mmap
397  * @data_buffer_size [in]: The buffer byte length for this mmap
398  * @dev [in]: The doca device bound to this mmap
399  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
400  */
401 doca_error_t create_local_mmap(struct doca_mmap **mmap,
402  const uint32_t mmap_permissions,
403  void *data_buffer,
404  size_t data_buffer_size,
405  struct doca_dev *dev);
406 
407 /*
408  * Config callbacks needed for rdma cm connection setup, and config tasks used for negotiation between peers
409  *
410  * @resources [in]: The rdma test context
411  * @need_send_task [in]: Indicate whether need to config rdma_task_send
412  * @need_recv_task [in]: Indicate whether need to config rdma_task_receive
413  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
414  */
416  bool need_send_task,
417  bool need_recv_task);
418 
419 /*
420  * This function is a part of the negotiation functions between peers, used to receive remote peer's data.
421  *
422  * @resources [in]: The rdma test context
423  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
424  */
426 
427 /*
428  * This function is a part of the negotiation functions between peers, used to send data to remote peer.
429  *
430  * @resources [in]: The rdma test context
431  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
432  */
434 
435 /*
436  * This function is used for waiting for pressing anykey on the keyboard, purely for waiting/co-ordinating purpose.
437  */
438 void wait_for_enter(void);
439 
440 #endif /* RDMA_COMMON_H_ */
doca_dpa_dev_mmap_t mmap
doca_error_t destroy_rdma_resources(struct rdma_resources *resources)
Definition: rdma_common.c:470
doca_error_t(* prepare_and_submit_task_fn)(struct rdma_resources *)
Definition: rdma_common.h:76
#define MAX_NUM_CONNECTIONS
Definition: rdma_common.h:67
void wait_for_enter(void)
Definition: rdma_common.c:1771
doca_error_t register_rdma_num_connections_param(void)
Definition: rdma_common.c:338
void rdma_cm_connect_established_cb(struct doca_rdma_connection *connection, union doca_data connection_user_data, union doca_data ctx_user_data)
Definition: rdma_common.c:75
void rdma_cm_disconnect_cb(struct doca_rdma_connection *connection, union doca_data connection_user_data, union doca_data ctx_user_data)
Definition: rdma_common.c:128
doca_error_t rdma_responder_send_data_to_rdma_requester(struct rdma_resources *resources)
Definition: rdma_common.c:1387
doca_error_t delete_file(const char *file_path)
Definition: rdma_common.c:899
void receive_task_error_cb(struct doca_rdma_task_receive *task, union doca_data task_user_data, union doca_data ctx_user_data)
Definition: rdma_common.c:1510
doca_error_t write_file(const char *file_path, const char *string, size_t string_len)
Definition: rdma_common.c:1087
doca_error_t rdma_cm_connect(struct rdma_resources *resources)
Definition: rdma_common.c:1172
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)
Definition: rdma_common.c:758
void receive_task_completion_cb(struct doca_rdma_task_receive *task, union doca_data task_user_data, union doca_data ctx_user_data)
Definition: rdma_common.c:1477
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)
Definition: rdma_common.c:1262
#define MAX_ARG_SIZE
Definition: rdma_common.h:49
doca_error_t(* task_check)(const struct doca_devinfo *)
Definition: rdma_common.h:70
doca_error_t config_rdma_cm_callback_and_negotiation_task(struct rdma_resources *resources, bool need_send_task, bool need_recv_task)
Definition: rdma_common.c:1720
doca_error_t register_rdma_write_string_param(void)
Definition: rdma_common.c:288
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)
Definition: rdma_common.c:1297
void rdma_cm_connect_failure_cb(struct doca_rdma_connection *connection, union doca_data connection_user_data, union doca_data ctx_user_data)
Definition: rdma_common.c:101
doca_error_t register_rdma_read_string_param(void)
Definition: rdma_common.c:260
doca_error_t rdma_cm_disconnect(struct rdma_resources *resources)
Definition: rdma_common.c:1244
doca_error_t rdma_requester_recv_data_from_rdma_responder(struct rdma_resources *resources)
Definition: rdma_common.c:1332
void send_task_completion_cb(struct doca_rdma_task_send *task, union doca_data task_user_data, union doca_data ctx_user_data)
Definition: rdma_common.c:1525
doca_error_t register_rdma_send_string_param(void)
Definition: rdma_common.c:232
void rdma_cm_connect_request_cb(struct doca_rdma_connection *connection, union doca_data ctx_user_data)
Definition: rdma_common.c:47
doca_error_t read_file(const char *file_path, char **string, size_t *string_len)
Definition: utils.c:56
doca_error_t set_default_config_value(struct rdma_config *cfg)
Definition: rdma_common.c:1640
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)
Definition: rdma_common.c:1665
#define SERVER_ADDR_LEN
Definition: rdma_common.h:61
void send_task_error_cb(struct doca_rdma_task_send *task, union doca_data task_user_data, union doca_data ctx_user_data)
Definition: rdma_common.c:1541
doca_error_t register_rdma_common_params(void)
Definition: rdma_common.c:580
struct rdma_resources resources
#define DOCA_DEVINFO_IBDEV_NAME_SIZE
Buffer size to hold Infiniband/RoCE device name. Including a null terminator.
Definition: doca_dev.h:309
enum doca_error doca_error_t
DOCA API return codes.
doca_rdma_addr_type
Definition: doca_rdma.h:56
doca_rdma_transport_type
Definition: doca_rdma.h:45
const struct ip_frag_config * cfg
Definition: ip_frag_dp.c:0
enum doca_rdma_addr_type cm_addr_type
Definition: rdma_common.h:74
uint32_t num_connections
Definition: rdma_common.h:88
enum doca_rdma_transport_type transport_type
Definition: rdma_common.h:90
char device_name[DOCA_DEVINFO_IBDEV_NAME_SIZE]
Definition: rdma_common.h:65
char send_string[MAX_ARG_SIZE]
Definition: rdma_common.h:80
char cm_addr[SERVER_ADDR_LEN+1]
Definition: rdma_common.h:73
uint32_t gid_index
Definition: rdma_common.h:70
char remote_resource_desc_path[MAX_ARG_SIZE]
Definition: rdma_common.h:85
bool use_rdma_cm
Definition: rdma_common.h:71
char local_connection_desc_path[MAX_ARG_SIZE]
Definition: rdma_common.h:83
char read_string[MAX_ARG_SIZE]
Definition: rdma_common.h:81
char remote_connection_desc_path[MAX_ARG_SIZE]
Definition: rdma_common.h:84
bool is_gid_index_set
Definition: rdma_common.h:69
char write_string[MAX_ARG_SIZE]
Definition: rdma_common.h:82
struct doca_sync_event * sync_event
Definition: rdma_common.h:114
size_t remote_rdma_conn_descriptor_size
Definition: rdma_common.h:127
doca_error_t first_encountered_error
Definition: rdma_common.h:132
bool require_remote_mmap
Definition: rdma_common.h:152
struct doca_ctx * rdma_ctx
Definition: rdma_common.h:85
struct doca_mmap * remote_mmap
Definition: rdma_common.h:113
uint32_t num_connection_established
Definition: rdma_common.h:141
size_t sync_event_descriptor_size
Definition: rdma_common.h:131
const void * mmap_descriptor
Definition: rdma_common.h:118
size_t num_remaining_tasks
Definition: rdma_common.h:134
prepare_and_submit_task_fn task_fn
Definition: rdma_common.h:150
const void * rdma_conn_descriptor
Definition: rdma_common.h:124
bool recv_sync_event_desc
Definition: rdma_common.h:145
struct doca_mmap * mmap_descriptor_mmap
Definition: rdma_common.h:142
size_t remote_mmap_descriptor_size
Definition: rdma_common.h:129
void * remote_mmap_descriptor
Definition: rdma_common.h:128
struct doca_sync_event_remote_net * remote_se
Definition: rdma_common.h:115
void * remote_rdma_conn_descriptor
Definition: rdma_common.h:126
struct doca_rdma_connection * connections[MAX_NUM_CONNECTIONS]
Definition: rdma_common.h:138
struct doca_buf * dst_buf
Definition: rdma_common.h:123
struct rdma_config * cfg
Definition: rdma_common.h:80
struct doca_rdma_addr * cm_addr
Definition: rdma_common.h:91
struct doca_rdma * rdma
Definition: rdma_common.h:83
size_t mmap_descriptor_size
Definition: rdma_common.h:119
struct doca_pe * pe
Definition: rdma_common.h:86
struct doca_mmap * sync_event_descriptor_mmap
Definition: rdma_common.h:144
struct doca_mmap * mmap
Definition: rdma_common.h:112
bool run_pe_progress
Definition: rdma_common.h:133
struct doca_mmap * remote_mmap_descriptor_mmap
Definition: rdma_common.h:143
const char * self_name
Definition: rdma_common.h:147
struct doca_dev * doca_device
Definition: rdma_common.h:81
struct doca_buf * src_buf
Definition: rdma_common.h:122
struct doca_buf_inventory * buf_inventory
Definition: rdma_common.h:117
size_t rdma_conn_descriptor_size
Definition: rdma_common.h:125
void * sync_event_descriptor
Definition: rdma_common.h:130
char * mmap_memrange
Definition: rdma_common.h:116
bool connection_established
Definition: rdma_common.h:93
Convenience type for representing opaque data.
Definition: doca_types.h:56