NVIDIA DOCA SDK Data Center on a Chip Framework Documentation
rdma_sync_event_responder_sample.c
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 #include <doca_error.h>
27 #include <doca_log.h>
28 #include <doca_buf_inventory.h>
29 #include <doca_buf.h>
30 #include <doca_ctx.h>
31 
32 #include "rdma_common.h"
33 
34 DOCA_LOG_REGISTER(RDMA_READ_RESPONDER::SAMPLE);
35 
36 #define EXAMPLE_SET_VALUE (0xD0CA) /* Example value to use for setting sync event */
37 
38 /*
39  * Destroy DOCA sync event resources
40  *
41  * @resources [in]: DOCA RDMA resources, including the sync_event to destroy
42  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
43  */
45 {
46  doca_error_t tmp_result, result = DOCA_SUCCESS;
47 
49 
50  /* Stop and destroy sync event if exists */
51  if (resources->sync_event != NULL) {
53  if (tmp_result != DOCA_SUCCESS) {
54  DOCA_LOG_ERR("Failed to stop DOCA sync event: %s", doca_error_get_descr(tmp_result));
55  DOCA_ERROR_PROPAGATE(result, tmp_result);
56  }
57 
59  if (tmp_result != DOCA_SUCCESS) {
60  DOCA_LOG_ERR("Failed to destroy DOCA sync event: %s", doca_error_get_descr(tmp_result));
61  DOCA_ERROR_PROPAGATE(result, tmp_result);
62  }
63 
65  }
66 
67  return result;
68 }
69 
70 /*
71  * Allocate DOCA sync event resources
72  *
73  * @resources [in/out]: DOCA RDMA resources, including the sync_event to allocate
74  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
75  */
77 {
79 
81  if (result != DOCA_SUCCESS) {
82  DOCA_LOG_ERR("Failed to create DOCA sync event: %s", doca_error_get_descr(result));
83  goto destroy_se;
84  }
85 
87  if (result != DOCA_SUCCESS) {
88  DOCA_LOG_ERR("Failed to set publisher for DOCA sync event: %s", doca_error_get_descr(result));
89  goto destroy_se;
90  }
91 
93  if (result != DOCA_SUCCESS) {
94  DOCA_LOG_ERR("Failed to set subscriber for DOCA sync event: %s", doca_error_get_descr(result));
95  goto destroy_se;
96  }
97 
99  if (result != DOCA_SUCCESS) {
100  DOCA_LOG_ERR("Failed to start DOCA sync event: %s", doca_error_get_descr(result));
101  goto destroy_se;
102  }
103 
104  return DOCA_SUCCESS;
105 
106 destroy_se:
108 
109  return result;
110 }
111 
112 /*
113  * Write the connection details and the mmap details for the requester to read,
114  * and read the connection details of the requester
115  * In DC transport mode it is only needed to read the remote connection details
116  *
117  * @cfg [in]: Configuration parameters
118  * @resources [in/out]: DOCA RDMA resources
119  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
120  */
122 {
124 
125  /* Write the RDMA connection details */
126  result = write_file(cfg->local_connection_desc_path,
129  if (result != DOCA_SUCCESS) {
130  DOCA_LOG_ERR("Failed to write the RDMA connection details: %s", doca_error_get_descr(result));
131  return result;
132  }
133 
134  /* Write the RDMA connection details */
135  result = write_file(cfg->remote_resource_desc_path,
138  if (result != DOCA_SUCCESS) {
139  DOCA_LOG_ERR("Failed to write sync event export blob: %s", doca_error_get_descr(result));
140  return result;
141  }
142 
143  DOCA_LOG_INFO("You can now copy %s and %s to the requester",
144  cfg->local_connection_desc_path,
145  cfg->remote_resource_desc_path);
146 
147  if (cfg->transport_type == DOCA_RDMA_TRANSPORT_TYPE_DC) {
148  return result;
149  }
150  DOCA_LOG_INFO("Please copy %s from the requester and then press enter", cfg->remote_connection_desc_path);
151 
152  /* Wait for enter */
153  wait_for_enter();
154 
155  /* Read the remote RDMA connection details */
156  result = read_file(cfg->remote_connection_desc_path,
159  if (result != DOCA_SUCCESS)
160  DOCA_LOG_ERR("Failed to read the remote RDMA connection details: %s", doca_error_get_descr(result));
161 
162  return result;
163 }
164 
165 /*
166  * Export and receive connection and sync event details, and connect to the remote RDMA
167  *
168  * @resources [in]: RDMA resources
169  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
170  */
172 {
174 
175  if (resources->cfg->use_rdma_cm == true)
176  return rdma_cm_connect(resources);
177 
178  /* Export DOCA RDMA */
182  &(resources->connections[0]));
183  if (result != DOCA_SUCCESS) {
184  DOCA_LOG_ERR("Failed to export DOCA RDMA: %s", doca_error_get_descr(result));
185  return result;
186  }
187 
188  /* Export RDMA sync event */
190  (const uint8_t **)&(resources->sync_event_descriptor),
192  if (result != DOCA_SUCCESS) {
193  DOCA_LOG_ERR("Failed to export DOCA sync event for RDMA: %s", doca_error_get_descr(result));
194  return result;
195  }
196 
197  /* write and read connection details from the requester */
199  if (result != DOCA_SUCCESS) {
200  DOCA_LOG_ERR("Failed to write and read connection details from the requester: %s",
202  return result;
203  }
204 
206  return result;
207  }
208  /* Connect RDMA */
212  resources->connections[0]);
213  if (result != DOCA_SUCCESS) {
214  DOCA_LOG_ERR("Failed to connect the responder's DOCA RDMA to the requester's DOCA RDMA: %s",
216  return result;
217  }
218 
219  return DOCA_SUCCESS;
220 }
221 
222 /*
223  * Handle the event - wait for a signal, update the sync even and wait for completion.
224  *
225  * @sync_event [in]: DOCA sync event
226  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
227  */
228 static doca_error_t rdma_sync_event_responder_handle_event(struct doca_sync_event *sync_event)
229 {
231 
232  DOCA_LOG_INFO("Waiting for sync event to be signaled from remote");
233  result = doca_sync_event_wait_gt(sync_event, EXAMPLE_SET_VALUE - 1, UINT64_MAX);
234  if (result != DOCA_SUCCESS) {
235  DOCA_LOG_ERR("Waiting for sync event to be signaled from remote failed");
236  return result;
237  }
238 
239  DOCA_LOG_INFO("Signaling sync event");
241  if (result != DOCA_SUCCESS) {
242  DOCA_LOG_ERR("Signaling sync event failed");
243  return result;
244  }
245 
246  DOCA_LOG_INFO("Waiting for sync event to be notified for completion");
247  result = doca_sync_event_wait_gt(sync_event, UINT64_MAX - 1, UINT64_MAX);
248  if (result != DOCA_SUCCESS) {
249  DOCA_LOG_ERR("Waiting for sync event to be notified for completion failed");
250  return result;
251  }
252 
253  return DOCA_SUCCESS;
254 }
255 
256 /*
257  * Responder wait for requester to finish
258  *
259  * @resources [in]: RDMA resources
260  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
261  */
263 {
264  doca_error_t result = DOCA_SUCCESS, tmp_result;
265 
267  if (tmp_result != DOCA_SUCCESS) {
268  DOCA_LOG_ERR("Rdma_sync_event_responder_handle_event() failed: %s", doca_error_get_descr(tmp_result));
269  DOCA_ERROR_PROPAGATE(result, tmp_result);
270  }
271 
272  if (resources->cfg->use_rdma_cm == true) {
273  tmp_result = rdma_cm_disconnect(resources);
274  if (tmp_result != DOCA_SUCCESS) {
275  DOCA_LOG_ERR("Failed to disconnect RDMA connection: %s", doca_error_get_descr(tmp_result));
276  DOCA_ERROR_PROPAGATE(result, tmp_result);
277  }
278  }
279 
280  /* Stop the context */
281  tmp_result = doca_ctx_stop(resources->rdma_ctx);
282  if ((tmp_result != DOCA_SUCCESS) && (tmp_result != DOCA_ERROR_IN_PROGRESS)) {
283  DOCA_LOG_ERR("Doca_ctx_stop() failed: %s", doca_error_get_descr(tmp_result));
284  DOCA_ERROR_PROPAGATE(result, tmp_result);
285  }
286 
287  return result;
288 }
289 
290 /*
291  * RDMA sync event responder state change callback
292  * This function represents the state machine for this RDMA program
293  *
294  * @user_data [in]: doca_data from the context
295  * @ctx [in]: DOCA context
296  * @prev_state [in]: Previous DOCA context state
297  * @next_state [in]: Next DOCA context state
298  */
300  struct doca_ctx *ctx,
301  enum doca_ctx_states prev_state,
302  enum doca_ctx_states next_state)
303 {
304  struct rdma_resources *resources = (struct rdma_resources *)user_data.ptr;
306  (void)prev_state;
307  (void)ctx;
308 
309  switch (next_state) {
311  DOCA_LOG_INFO("RDMA context entered starting state");
312  break;
314  DOCA_LOG_INFO("RDMA context is running");
315 
317  if (result != DOCA_SUCCESS) {
318  DOCA_LOG_ERR("rdma_sync_event_responder_export_and_connect() failed: %s",
320  break;
321  } else
322  DOCA_LOG_INFO("RDMA context finished initialization");
323 
324  if (resources->cfg->use_rdma_cm == true)
325  break;
326 
328  if (result != DOCA_SUCCESS) {
329  DOCA_LOG_ERR("responder_wait_for_requester_finish() failed: %s", doca_error_get_descr(result));
330  }
331  break;
340  DOCA_LOG_INFO("RDMA context entered into stopping state. Any inflight tasks will be flushed");
341  break;
342  case DOCA_CTX_STATE_IDLE:
343  DOCA_LOG_INFO("RDMA context has been stopped");
344 
345  /* We can stop progressing the PE */
346  resources->run_pe_progress = false;
347  break;
348  default:
349  break;
350  }
351 
352  /* If something failed - update that an error was encountered and stop the ctx */
353  if (result != DOCA_SUCCESS) {
355  (void)doca_ctx_stop(ctx);
356  }
357 }
358 
359 /*
360  * Responder side
361  *
362  * @cfg [in]: Configuration parameters
363  * @return: DOCA_SUCCESS on success and DOCA_ERROR otherwise
364  */
366 {
367  struct rdma_resources resources = {0};
368  union doca_data ctx_user_data = {0};
369  const uint32_t mmap_permissions = DOCA_ACCESS_FLAG_LOCAL_READ_WRITE | DOCA_ACCESS_FLAG_RDMA_READ |
371  const uint32_t rdma_permissions = DOCA_ACCESS_FLAG_RDMA_READ | DOCA_ACCESS_FLAG_RDMA_WRITE;
372  doca_error_t result, tmp_result;
373  struct timespec ts = {
374  .tv_sec = 0,
375  .tv_nsec = SLEEP_IN_NANOS,
376  };
377 
378  /* Allocating resources */
379  result = allocate_rdma_resources(cfg, mmap_permissions, rdma_permissions, NULL, &resources);
380  if (result != DOCA_SUCCESS) {
381  DOCA_LOG_ERR("Failed to allocate RDMA resources: %s", doca_error_get_descr(result));
382  return result;
383  }
384 
386  if (result != DOCA_SUCCESS) {
387  DOCA_LOG_ERR("Failed to allocate sync event resources: %s", doca_error_get_descr(result));
389  }
390 
392  if (result != DOCA_SUCCESS) {
393  DOCA_LOG_ERR("Unable to set state change callback for RDMA context: %s", doca_error_get_descr(result));
394  goto destroy_sync_event_resources;
395  }
396 
397  /* Include the program's resources in user data of context to be used in callbacks */
398  ctx_user_data.ptr = &(resources);
400  if (result != DOCA_SUCCESS) {
401  DOCA_LOG_ERR("Failed to set context user data: %s", doca_error_get_descr(result));
402  goto destroy_sync_event_resources;
403  }
404 
405  if (cfg->use_rdma_cm == true) {
407  resources.is_requester = false;
411  /* need_send_mmap_info */ true,
412  /* need_recv_mmap_info */ false);
413  if (result != DOCA_SUCCESS) {
414  DOCA_LOG_ERR("Failed to config RDMA CM callbacks and negotiation functions: %s",
416  goto destroy_sync_event_resources;
417  }
418  }
419 
420  /* Start RDMA context */
422  if (result != DOCA_SUCCESS) {
423  DOCA_LOG_ERR("Failed to start RDMA context: %s", doca_error_get_descr(result));
424  goto destroy_sync_event_resources;
425  }
426 
427  /*
428  * Run the progress engine which will run the state machine defined in
429  * rdma_sync_event_responder_state_change_callback().
430  * When the context moves to idle, the context change callback call will signal to stop running the progress
431  * engine.
432  */
433  while (resources.run_pe_progress) {
434  if (doca_pe_progress(resources.pe) == 0)
435  nanosleep(&ts, &ts);
436  }
437 
438  /* Assign the result we update in the callback */
440 
442  if (tmp_result != DOCA_SUCCESS) {
443  DOCA_LOG_ERR("Failed to stop DOCA RDMA context: %s", doca_error_get_descr(tmp_result));
444  DOCA_ERROR_PROPAGATE(result, tmp_result);
445  }
446 
447 destroy_sync_event_resources:
449  if (tmp_result != DOCA_SUCCESS) {
450  DOCA_LOG_ERR("Failed to destroy DOCA Sync Event resources: %s", doca_error_get_descr(tmp_result));
451  DOCA_ERROR_PROPAGATE(result, tmp_result);
452  }
454  if (resources.buf_inventory != NULL) {
456  if (tmp_result != DOCA_SUCCESS) {
457  DOCA_LOG_ERR("Failed to stop DOCA buffer inventory: %s", doca_error_get_descr(tmp_result));
458  DOCA_ERROR_PROPAGATE(result, tmp_result);
459  }
461  if (tmp_result != DOCA_SUCCESS) {
462  DOCA_LOG_ERR("Failed to destroy DOCA buffer inventory: %s", doca_error_get_descr(tmp_result));
463  DOCA_ERROR_PROPAGATE(result, tmp_result);
464  }
465  }
466  tmp_result = destroy_rdma_resources(&resources, cfg);
467  if (tmp_result != DOCA_SUCCESS) {
468  DOCA_LOG_ERR("Failed to destroy DOCA RDMA resources: %s", doca_error_get_descr(tmp_result));
469  DOCA_ERROR_PROPAGATE(result, tmp_result);
470  }
471  return result;
472 }
#define NULL
Definition: __stddef_null.h:26
int32_t result
#define SLEEP_IN_NANOS
Definition: comch_utils.c:40
doca_error_t request_stop_ctx(struct doca_pe *pe, struct doca_ctx *ctx)
Definition: common.c:367
doca_error_t destroy_rdma_resources(struct rdma_resources *resources)
Definition: rdma_common.c:470
void wait_for_enter(void)
Definition: rdma_common.c:1771
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
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 rdma_cm_disconnect(struct rdma_resources *resources)
Definition: rdma_common.c:1244
struct rdma_resources resources
DOCA_STABLE doca_error_t doca_buf_inventory_destroy(struct doca_buf_inventory *inventory)
Destroy buffer inventory structure.
DOCA_STABLE doca_error_t doca_buf_inventory_stop(struct doca_buf_inventory *inventory)
Stop element retrieval from inventory.
DOCA_STABLE doca_error_t doca_ctx_start(struct doca_ctx *ctx)
Finalizes all configurations, and starts the DOCA CTX.
DOCA_STABLE doca_error_t doca_ctx_set_state_changed_cb(struct doca_ctx *ctx, doca_ctx_state_changed_callback_t cb)
Set state changed callback.
DOCA_STABLE doca_error_t doca_ctx_set_user_data(struct doca_ctx *ctx, union doca_data user_data)
set user data to context
DOCA_STABLE doca_error_t doca_ctx_stop(struct doca_ctx *ctx)
Stops the context allowing reconfiguration.
doca_ctx_states
This enum defines the states of a context.
Definition: doca_ctx.h:83
@ DOCA_CTX_STATE_STARTING
Definition: doca_ctx.h:93
@ DOCA_CTX_STATE_STOPPING
Definition: doca_ctx.h:106
@ DOCA_CTX_STATE_IDLE
Definition: doca_ctx.h:88
@ DOCA_CTX_STATE_RUNNING
Definition: doca_ctx.h:98
#define DOCA_ERROR_PROPAGATE(r, t)
Save the first encountered doca_error_t.
Definition: doca_error.h:83
enum doca_error doca_error_t
DOCA API return codes.
DOCA_STABLE const char * doca_error_get_descr(doca_error_t error)
Returns the description string of an error code.
@ DOCA_SUCCESS
Definition: doca_error.h:38
@ DOCA_ERROR_IN_PROGRESS
Definition: doca_error.h:64
#define DOCA_LOG_ERR(format,...)
Generates an ERROR application log message.
Definition: doca_log.h:466
#define DOCA_LOG_INFO(format,...)
Generates an INFO application log message.
Definition: doca_log.h:486
DOCA_STABLE uint8_t doca_pe_progress(struct doca_pe *pe)
Run the progress engine.
DOCA_EXPERIMENTAL doca_error_t doca_rdma_export(struct doca_rdma *rdma, const void **local_rdma_conn_details, size_t *local_rdma_conn_details_size, struct doca_rdma_connection **rdma_connection)
Export doca_rdma connection details object The doca_rdma_conn_details are used in doca_rdma_connect()...
DOCA_EXPERIMENTAL doca_error_t doca_rdma_connect(struct doca_rdma *rdma, const void *remote_rdma_conn_details, size_t remote_rdma_conn_details_size, struct doca_rdma_connection *rdma_connection)
Connect to remote doca_rdma peer. Can only be called when the ctx is in DOCA_CTX_STATE_STARTING state...
@ DOCA_RDMA_TRANSPORT_TYPE_DC
Definition: doca_rdma.h:47
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_start(struct doca_sync_event *event)
Start a Sync Event to be operate as stand-alone DOCA Core object only.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_create(struct doca_sync_event **event)
Create a Sync Event handle.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_update_set(struct doca_sync_event *event, uint64_t value)
Set the value of a Sync Event to some value synchronously.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_wait_gt(struct doca_sync_event *event, uint64_t value, uint64_t mask)
Wait for the value of a Sync Event to be grater than some threshold value synchronously in a polling ...
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_stop(struct doca_sync_event *event)
Stop a Sync Event which has been previously started with 'doca_sync_event_start'.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_publisher_location_remote_net(struct doca_sync_event *event)
Declare Sync Event publisher as a remote peer.
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_add_subscriber_location_cpu(struct doca_sync_event *event, struct doca_dev *dev)
DOCA_EXPERIMENTAL doca_error_t doca_sync_event_destroy(struct doca_sync_event *event)
Destroy a Sync Event instance.
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
Definition: doca_types.h:83
@ DOCA_ACCESS_FLAG_RDMA_READ
Definition: doca_types.h:84
@ DOCA_ACCESS_FLAG_RDMA_WRITE
Definition: doca_types.h:85
const struct ip_frag_config * cfg
Definition: ip_frag_dp.c:0
doca_error_t rdma_sync_event_responder(struct rdma_config *cfg)
DOCA_LOG_REGISTER(RDMA_READ_RESPONDER::SAMPLE)
doca_error_t rdma_sync_event_responder_destroy_sync_event_resources(struct rdma_resources *resources)
static void rdma_sync_event_responder_state_change_callback(const union doca_data user_data, struct doca_ctx *ctx, enum doca_ctx_states prev_state, enum doca_ctx_states next_state)
static doca_error_t responder_wait_for_requester_finish(struct rdma_resources *resources)
static doca_error_t write_read_connection(struct rdma_config *cfg, struct rdma_resources *resources)
static doca_error_t rdma_sync_event_responder_export_and_connect(struct rdma_resources *resources)
static doca_error_t rdma_sync_event_responder_handle_event(struct doca_sync_event *sync_event)
doca_error_t rdma_sync_event_responder_allocate_sync_event_resources(struct rdma_resources *resources)
#define EXAMPLE_SET_VALUE
enum doca_rdma_transport_type transport_type
Definition: rdma_common.h:90
bool use_rdma_cm
Definition: rdma_common.h:71
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
size_t sync_event_descriptor_size
Definition: rdma_common.h:131
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
void * remote_rdma_conn_descriptor
Definition: rdma_common.h:126
struct doca_rdma_connection * connections[MAX_NUM_CONNECTIONS]
Definition: rdma_common.h:138
struct rdma_config * cfg
Definition: rdma_common.h:80
struct doca_rdma * rdma
Definition: rdma_common.h:83
struct doca_pe * pe
Definition: rdma_common.h:86
bool run_pe_progress
Definition: rdma_common.h:133
struct doca_dev * doca_device
Definition: rdma_common.h:81
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
Convenience type for representing opaque data.
Definition: doca_types.h:56
void * ptr
Definition: doca_types.h:57
struct upf_accel_ctx * ctx
doca_error_t read_file(char const *path, char **out_bytes, size_t *out_bytes_len)
Definition: utils.c:56